Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Resource string `json:"resource"` // warehouse-upload-aborted Event string `json:"event"` // <tags_list> Environment Environment `json:"environment"` // [PRODUCTION,DEVELOPMENT,PROXYMODE,CARBONCOPY] Severity Severity `json:"severity"` // warning,critical,normal // Get the full list from https://docs.alerta.io/api/alert.html#severity-table Text string `json:"text"` // <event> is critical Timeout int `json:"timeout"` // 86400 TagList []string `json:"tags"` // {priority=P1,destID=27CHciD6leAhurSyFAeN4dp14qZ,destType=RS,namespace=hosted,cluster=rudder} }
type AlertSender ¶
type AlertSender interface {
SendAlert(ctx context.Context, resource string, opts SendAlertOpts) error
}
func NewClient ¶
func NewClient(baseURL string, fns ...OptFn) AlertSender
type Environment ¶
type Environment string
const ( PRODUCTION Environment = "PRODUCTION" DEVELOPMENT Environment = "DEVELOPMENT" PROXYMODE Environment = "PROXYMODE" CARBONCOPY Environment = "CARBONCOPY" )
type OptFn ¶
type OptFn func(*Client)
func WithAlertTimeout ¶
func WithConfig ¶
func WithHTTPClient ¶
func WithKubeNamespace ¶
func WithMaxRetries ¶
func WithTimeout ¶
type SendAlertOpts ¶
type SendAlertOpts struct { Tags Tags Text string Severity Severity Priority Priority Environment Environment }
Click to show internal directories.
Click to hide internal directories.