Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Mode string `yaml:"mode"` Severity string `yaml:"severity"` Facility string `yaml:"facility"` Labels []string `yaml:"labels"` Annotations []string `yaml:"annotations"` Custom custom `yaml:"custom"` }
Config is the output format configurations
func LoadConfig ¶
LoadConfig loads configs from the specified YAML file
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a webhook server to handle messages
func (*Server) HandleAlert ¶
func (s *Server) HandleAlert(w http.ResponseWriter, req *http.Request)
HandleAlert handles webhook for AlertManager
func (*Server) ShowVersion ¶
func (s *Server) ShowVersion(w http.ResponseWriter, req *http.Request)
ShowVersion returns the version of this program
Click to show internal directories.
Click to hide internal directories.