state

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Unlicense Imports: 8 Imported by: 5

README

go-state

(cd ../go-state-sample && go run .)
curl --unix-socket /tmp/sample.state http://localhost/
curl --unix-socket /tmp/sample.state http://localhost/environ/
curl --unix-socket /tmp/sample.state http://localhost/node/state/
curl --unix-socket /tmp/sample.state 'http://localhost/node/state/?values=true'
curl --unix-socket /tmp/sample.state http://localhost/node/root/
curl --unix-socket /tmp/sample.state 'http://localhost/node/root/?values=true'
curl --unix-socket /tmp/sample.state http://localhost/debug/pprof/
curl --unix-socket /tmp/sample.state 'http://localhost/debug/pprof/goroutine?debug=2'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnvironHandlers

func AddEnvironHandlers(mux Mux)

func AddNodeHandlers

func AddNodeHandlers(mux Mux, node tree.Node)

func AddPProfHandlers

func AddPProfHandlers(mux Mux)

func Serve

func Serve(root tree.Node, path string) tree.Node

Types

type Mux

type Mux interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request)
	AddHandler(path string, handler http.Handler)
}

func NewMux

func NewMux() Mux

type Sorted

type Sorted interface {
	Count() int
	Names() []string
	Values() []interface{}
	Get(string) interface{}
	Set(string, interface{})
	Remove(string) interface{}
}

func NewSorted

func NewSorted() Sorted

Jump to

Keyboard shortcuts

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