service

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatusPage

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

func NewConfigStatusPage(config interface{}) StatusPage

NewConfigStatusPage returns a page with the specified TOML config.

func NewInfoStatusPage

func NewInfoStatusPage() StatusPage

NewInfoStatusPage returns a page with basic info about the process.

func NewLogLevelStatusPage

func NewLogLevelStatusPage() StatusPage

NewLogLevelStatusPage returns a page with basic info about the process.

func NewTopologyStatusPage

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