listener

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: GPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 NewListener(db *database.DB, runtimeConfig *config.RuntimeConfig, logs *logging.Logging) *Listener

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

func (l *Listener) Run(ctx context.Context) error

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.

func (*Listener) ServeHTTP

func (l *Listener) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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