2024-11-12 12:26:00 +05:30
|
|
|
package monitoringService
|
|
|
|
|
|
2024-11-12 16:24:06 +05:30
|
|
|
import (
|
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
|
"houston/contracts"
|
|
|
|
|
"houston/pkg/rest"
|
|
|
|
|
)
|
2024-11-12 12:26:00 +05:30
|
|
|
|
|
|
|
|
type EEMonitoringServiceClient interface {
|
|
|
|
|
TriggerSeverityUpdateWebhook(
|
2024-11-29 18:38:26 +05:30
|
|
|
incidentId uint, triggerredBy string, requestId string, currentSeverity contracts.SeverityInfo,
|
|
|
|
|
responderTeam string, slackChannelId string,
|
2024-11-12 12:26:00 +05:30
|
|
|
) error
|
|
|
|
|
}
|
2024-11-12 16:24:06 +05:30
|
|
|
|
|
|
|
|
func NewEEMonitoringServiceClient(client rest.HttpRestClient) EEMonitoringServiceClient {
|
|
|
|
|
return &EEMonitoringServiceClientImpl{
|
|
|
|
|
Client: client,
|
|
|
|
|
BaseURL: viper.GetString("EE_MONITORING_SERVICE_BASEURL"),
|
|
|
|
|
DefaultTimeout: viper.GetDuration("DEFAULT_EE_MONITORING_SERVICE_TIMEOUT"),
|
|
|
|
|
WebhookAPIPath: viper.GetString("EE_MONITORING_SERVICE_WEBHOOK_API_PATH"),
|
|
|
|
|
}
|
|
|
|
|
}
|