webhook

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Address  string
	Verbose  bool
	Sender   *signal.Sender
	Template *message.Template
}

func New

func New(address string, verbose bool, t *message.Template, s *signal.Sender) *Server

func (*Server) HandleAlert

func (srv *Server) HandleAlert(res http.ResponseWriter, req *http.Request)

untested

func (*Server) HandleHealth

func (srv *Server) HandleHealth(res http.ResponseWriter, req *http.Request)

untested

func (*Server) Run

func (srv *Server) Run()

untested

func (*Server) SendAlert

func (srv *Server) SendAlert(alert *alertmanager.Alert) error

untested

func (*Server) UnmarshalAlerts

func (srv *Server) UnmarshalAlerts(r io.Reader) ([]alertmanager.Alert, error)

func (*Server) WriteError

func (srv *Server) WriteError(res http.ResponseWriter, err error, code int)

untested

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL