stats

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMetrics

func AddMetrics(mux *http.ServeMux)

func AddPprof

func AddPprof(mux *http.ServeMux)

func AddSnapshots

func AddSnapshots(mux *http.ServeMux, history SnapshotHistory)

func Index

func Index(w http.ResponseWriter, r *http.Request)

func MustStartServerBackground

func MustStartServerBackground(
	snapshotHistory SnapshotHistory,
	port uint32,
	addHandlers ...func(mux *http.ServeMux, profiles map[string]string),
)

func StartServer

func StartServer(
	snapshotHistory SnapshotHistory,
	port uint32,
	addHandlers ...func(mux *http.ServeMux, profiles map[string]string),
) error

Types

type SnapshotHistory

type SnapshotHistory interface {
	// SetInput Sets the input snapshot for the given component
	SetInput(id string, latestInput json.Marshaler)
	// GetInput gets the input snapshot for all components
	GetInput() ([]byte, error)
	// SetOutput Sets the output snapshot for the given component
	SetOutput(id string, latestOutput json.Marshaler)
	// GetOutput gets the output snapshot for all component
	GetOutput() ([]byte, error)
}

func NewSnapshotHistory

func NewSnapshotHistory() SnapshotHistory

Jump to

Keyboard shortcuts

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