Documentation
¶
Index ¶
Constants ¶
View Source
const ( EventTopic = "cloud.events.incoming" CETypePrefix = "prometheus.server.alert." )
Variables ¶
This section is empty.
Functions ¶
func NewEventDispatcher ¶
func NewEventDispatcher(eb baseEventPublisher) *eventDispatcher
NewEventDispatcher returns a new event dispatcher
Types ¶
type Alert ¶
type Alert struct { Labels map[string]string `json:"labels"` Annotations map[string]string `json:"annotations"` StartsAt time.Time `json:"startsAt"` EndsAt time.Time `json:"endsAt"` GeneratorURL string `json:"generatorURL" validate:"url"` }
Alert describes an incoming Prometheus alert
type Config ¶
type PromAlertHandler ¶
type PromAlertHandler struct {
// contains filtered or unexported fields
}
PromAlertHandler describes a Prometheus alert handler
func New ¶
func New(config Config, logger log.Logger, errorHandler emperror.Handler, eb eventPublisher) *PromAlertHandler
New returns an initialized PromAlertHandler
func (*PromAlertHandler) Run ¶
func (p *PromAlertHandler) Run()
Run runs the alert handler HTTP listener
Click to show internal directories.
Click to hide internal directories.