Documentation
¶
Index ¶
- Constants
- type AlarmsServer
- func (a *AlarmsServer) AmNotification(ctx context.Context, request api.AmNotificationRequestObject) (api.AmNotificationResponseObject, error)
- func (a *AlarmsServer) CreateSubscription(ctx context.Context, request api.CreateSubscriptionRequestObject) (api.CreateSubscriptionResponseObject, error)
- func (a *AlarmsServer) DeleteSubscription(ctx context.Context, request api.DeleteSubscriptionRequestObject) (api.DeleteSubscriptionResponseObject, error)
- func (a *AlarmsServer) GetAlarm(ctx context.Context, request api.GetAlarmRequestObject) (api.GetAlarmResponseObject, error)
- func (a *AlarmsServer) GetAlarms(ctx context.Context, request api.GetAlarmsRequestObject) (api.GetAlarmsResponseObject, error)
- func (a *AlarmsServer) GetAllVersions(ctx context.Context, request api.GetAllVersionsRequestObject) (api.GetAllVersionsResponseObject, error)
- func (a *AlarmsServer) GetMinorVersions(ctx context.Context, request api.GetMinorVersionsRequestObject) (api.GetMinorVersionsResponseObject, error)
- func (a *AlarmsServer) GetServiceConfiguration(ctx context.Context, _ api.GetServiceConfigurationRequestObject) (api.GetServiceConfigurationResponseObject, error)
- func (a *AlarmsServer) GetSubscription(ctx context.Context, request api.GetSubscriptionRequestObject) (api.GetSubscriptionResponseObject, error)
- func (a *AlarmsServer) GetSubscriptions(ctx context.Context, request api.GetSubscriptionsRequestObject) (api.GetSubscriptionsResponseObject, error)
- func (a *AlarmsServer) HwNotification(ctx context.Context, request api.HwNotificationRequestObject) (api.HwNotificationResponseObject, error)
- func (a *AlarmsServer) PatchAlarm(ctx context.Context, request api.PatchAlarmRequestObject) (api.PatchAlarmResponseObject, error)
- func (a *AlarmsServer) PatchAlarmServiceConfiguration(ctx context.Context, request api.PatchAlarmServiceConfigurationRequestObject) (api.PatchAlarmServiceConfigurationResponseObject, error)
- func (a *AlarmsServer) UpdateAlarmServiceConfiguration(ctx context.Context, request api.UpdateAlarmServiceConfigurationRequestObject) (api.UpdateAlarmServiceConfigurationResponseObject, error)
- type AlarmsServerConfig
Constants ¶
const (
DefaultRetentionPeriod = 1 // Default retention of resolved alarms in days
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmsServer ¶
type AlarmsServer struct { // GlobalCloudID is the global O-Cloud identifier. Create subscription requests are blocked if the global O-Cloud identifier is not set GlobalCloudID uuid.UUID // AlarmsRepository is the repository for the alarms AlarmsRepository repo.AlarmRepositoryInterface // Infrastructure clients Infrastructure *infrastructure.Infrastructure // Wg to allow alarm server level background tasks to finish before graceful exit Wg sync.WaitGroup // NotificationProvider to handle new events NotificationProvider notifier.NotificationProvider // Notifier to notify subscribers with new events Notifier *notifier.Notifier // ServiceConfig config needed to manage ServiceConfig ServiceConfig serviceconfig.Config }
func (*AlarmsServer) AmNotification ¶
func (a *AlarmsServer) AmNotification(ctx context.Context, request api.AmNotificationRequestObject) (api.AmNotificationResponseObject, error)
AmNotification handles an API request coming from AlertManager with CaaS alerts. This api is used internally. Note: the errors returned can also be view under alertmanager pod logs but also logging here for convenience
func (*AlarmsServer) CreateSubscription ¶
func (a *AlarmsServer) CreateSubscription(ctx context.Context, request api.CreateSubscriptionRequestObject) (api.CreateSubscriptionResponseObject, error)
CreateSubscription handles an API request to create an Alarm Subscription
func (*AlarmsServer) DeleteSubscription ¶
func (a *AlarmsServer) DeleteSubscription(ctx context.Context, request api.DeleteSubscriptionRequestObject) (api.DeleteSubscriptionResponseObject, error)
DeleteSubscription handles an API request to delete an Alarm Subscription
func (*AlarmsServer) GetAlarm ¶
func (a *AlarmsServer) GetAlarm(ctx context.Context, request api.GetAlarmRequestObject) (api.GetAlarmResponseObject, error)
GetAlarm handles an API request to retrieve an Alarm Event Record
func (*AlarmsServer) GetAlarms ¶
func (a *AlarmsServer) GetAlarms(ctx context.Context, request api.GetAlarmsRequestObject) (api.GetAlarmsResponseObject, error)
GetAlarms handles an API request to fetch Alarm Event Records
func (*AlarmsServer) GetAllVersions ¶
func (a *AlarmsServer) GetAllVersions(ctx context.Context, request api.GetAllVersionsRequestObject) (api.GetAllVersionsResponseObject, error)
GetAllVersions receives the API request to this endpoint, executes the request, and responds appropriately
func (*AlarmsServer) GetMinorVersions ¶
func (a *AlarmsServer) GetMinorVersions(ctx context.Context, request api.GetMinorVersionsRequestObject) (api.GetMinorVersionsResponseObject, error)
GetMinorVersions receives the API request to this endpoint, executes the request, and responds appropriately
func (*AlarmsServer) GetServiceConfiguration ¶
func (a *AlarmsServer) GetServiceConfiguration(ctx context.Context, _ api.GetServiceConfigurationRequestObject) (api.GetServiceConfigurationResponseObject, error)
GetServiceConfiguration handles an API request to fetch the Alarm Service Configuration
func (*AlarmsServer) GetSubscription ¶
func (a *AlarmsServer) GetSubscription(ctx context.Context, request api.GetSubscriptionRequestObject) (api.GetSubscriptionResponseObject, error)
GetSubscription handles an API request to retrieve an Alarm Subscription
func (*AlarmsServer) GetSubscriptions ¶
func (a *AlarmsServer) GetSubscriptions(ctx context.Context, request api.GetSubscriptionsRequestObject) (api.GetSubscriptionsResponseObject, error)
GetSubscriptions handles an API request to fetch Alarm Subscriptions
func (*AlarmsServer) HwNotification ¶
func (a *AlarmsServer) HwNotification(ctx context.Context, request api.HwNotificationRequestObject) (api.HwNotificationResponseObject, error)
func (*AlarmsServer) PatchAlarm ¶
func (a *AlarmsServer) PatchAlarm(ctx context.Context, request api.PatchAlarmRequestObject) (api.PatchAlarmResponseObject, error)
PatchAlarm handles an API request to patch an Alarm Event Record
func (*AlarmsServer) PatchAlarmServiceConfiguration ¶
func (a *AlarmsServer) PatchAlarmServiceConfiguration(ctx context.Context, request api.PatchAlarmServiceConfigurationRequestObject) (api.PatchAlarmServiceConfigurationResponseObject, error)
PatchAlarmServiceConfiguration handles an API request to patch the Alarm Service Configuration
func (*AlarmsServer) UpdateAlarmServiceConfiguration ¶
func (a *AlarmsServer) UpdateAlarmServiceConfiguration(ctx context.Context, request api.UpdateAlarmServiceConfigurationRequestObject) (api.UpdateAlarmServiceConfigurationResponseObject, error)
type AlarmsServerConfig ¶
type AlarmsServerConfig struct { utils.CommonServerConfig Address string GlobalCloudID string }
AlarmsServerConfig defines the configuration attributes for the alarms server