listener

package
v0.0.0-...-454502e Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: GPL-2.0 Imports: 14 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 *icingadb.DB, runtimeConfig *config.RuntimeConfig, logs *logging.Logging) *Listener

func (*Listener) DumpConfig

func (l *Listener) DumpConfig(w http.ResponseWriter, r *http.Request)

func (*Listener) DumpIncidents

func (l *Listener) DumpIncidents(w http.ResponseWriter, r *http.Request)

func (*Listener) ProcessEvent

func (l *Listener) ProcessEvent(w http.ResponseWriter, req *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