Documentation
¶
Index ¶
- type Listener
- func (l *Listener) DumpConfig(w http.ResponseWriter, r *http.Request)
- func (l *Listener) DumpIncidents(w http.ResponseWriter, r *http.Request)
- func (l *Listener) DumpRules(w http.ResponseWriter, r *http.Request)
- func (l *Listener) DumpSchedules(w http.ResponseWriter, r *http.Request)
- func (l *Listener) GetIncidents(w http.ResponseWriter, r *http.Request)
- func (l *Listener) ProcessEvent(w http.ResponseWriter, r *http.Request)
- func (l *Listener) Run(ctx context.Context) error
- func (l *Listener) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func (*Listener) DumpConfig ¶
func (l *Listener) DumpConfig(w http.ResponseWriter, r *http.Request)
DumpConfig is used as /debug prefixed endpoint to dump the current live configuration of the daemon. The authorization has to be done beforehand.
func (*Listener) DumpIncidents ¶
func (l *Listener) DumpIncidents(w http.ResponseWriter, r *http.Request)
DumpIncidents is used as /debug prefixed endpoint to dump all incidents. The authorization has to be done beforehand.
func (*Listener) DumpRules ¶ added in v0.2.0
func (l *Listener) DumpRules(w http.ResponseWriter, r *http.Request)
DumpRules is used as /debug prefixed endpoint to dump all rules. The authorization has to be done beforehand.
func (*Listener) DumpSchedules ¶
func (l *Listener) DumpSchedules(w http.ResponseWriter, r *http.Request)
DumpSchedules is used as /debug prefixed endpoint to dump all schedules. The authorization has to be done beforehand.
func (*Listener) GetIncidents ¶ added in v0.2.0
func (l *Listener) GetIncidents(w http.ResponseWriter, r *http.Request)
func (*Listener) ProcessEvent ¶
func (l *Listener) ProcessEvent(w http.ResponseWriter, r *http.Request)
func (*Listener) Run ¶
Run the Listener's web server and block until the server has finished.
The web server either returns (early) when its ListenAndServe fails or when the given context is finished. After the context is done, the web server shuts down gracefully with a hard limit of three seconds.
An error is returned in every case except for a gracefully context-based shutdown without hitting the time limit.