Documentation ¶ Index ¶ Variables func NewHandler(cfg Config) (http.Handler, error) type Config Constants ¶ This section is empty. Variables ¶ View Source var ( // ErrCantDeserialize will be used when for some reason the // received data can't be deserialized. ErrCantDeserialize = errors.New("can't deserialize the received alerts") ) Functions ¶ func NewHandler ¶ func NewHandler(cfg Config) (http.Handler, error) NewHandler is an HTTP handler that knows how to handle alertmanager webhook alerts. Types ¶ type Config ¶ type Config struct { MetricsRecorder metrics.Recorder WebhookPath string ChatIDQueryString string ForwardService forward.Service DeadMansSwitchPath string DeadMansSwitchService deadmansswitch.Service Debug bool Logger log.Logger } Config is the configuration of the WebhookHandler. Source Files ¶ View all Source files alertmanager.go handler.go mapper.go Click to show internal directories. Click to hide internal directories.