service

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-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 StatusPage added in v0.7.0

type StatusPage struct {
	// Short description on what the endpoint is for. It will be shown on the main page.
	Info string
	// Handler processes the HTTP request for this status page.
	Handler http.HandlerFunc
	// Special status page is one that should not be dumped via /all endpoint.
	// This can be because it uses PUT instead of GET, because it requires extra
	// query parameters, because it has side effects or simply because it is too
	// expensive to evaluate.
	Special bool
}

StatusPages describes a status page (HTTP endpoint exposed by the service).

func NewConfigStatusPage added in v0.7.0

func NewConfigStatusPage(config interface{}) StatusPage

NewConfigStatusPage returns a page with the specified TOML config.

func NewInfoStatusPage added in v0.7.0

func NewInfoStatusPage() StatusPage

NewInfoStatusPage returns a page with basic info about the process.

func NewLogLevelStatusPage added in v0.7.0

func NewLogLevelStatusPage() StatusPage

NewLogLevelStatusPage returns a page with basic info about the process.

func NewTopologyStatusPage added in v0.7.0

func NewTopologyStatusPage(l *topology.Loader) StatusPage

type StatusPages

type StatusPages map[string]StatusPage

StatusPages maps the page URL to the page description.

func (StatusPages) Register

func (s StatusPages) Register(serveMux *http.ServeMux, elemId string) error

Register registers the pages with the supplied HTTP server. Additionally it registers the main page that links to all the other pages.

Jump to

Keyboard shortcuts

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