Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertProvider ¶
type AlertProvider struct { URL string `yaml:"url"` Method string `yaml:"method,omitempty"` Insecure bool `yaml:"insecure,omitempty"` Body string `yaml:"body,omitempty"` Headers map[string]string `yaml:"headers,omitempty"` }
AlertProvider is the configuration necessary for sending an alert using a custom HTTP request Technically, all alert providers should be reachable using the custom alert provider
func (*AlertProvider) IsValid ¶
func (provider *AlertProvider) IsValid() bool
IsValid returns whether the provider's configuration is valid
func (*AlertProvider) Send ¶
func (provider *AlertProvider) Send(serviceName, alertDescription string, resolved bool) ([]byte, error)
Send a request to the alert provider and return the body
func (*AlertProvider) ToCustomAlertProvider ¶ added in v1.0.1
func (provider *AlertProvider) ToCustomAlertProvider(service *core.Service, alert *core.Alert, result *core.Result, resolved bool) *AlertProvider
ToCustomAlertProvider converts the provider into a custom.AlertProvider
Click to show internal directories.
Click to hide internal directories.