state

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Unlicense Imports: 10 Imported by: 5

README

go-state

(cd 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 ExecutableFolder added in v0.1.1

func ExecutableFolder() string

func ExecutableName

func ExecutableName() string

func ExecutablePath added in v0.1.1

func ExecutablePath() string

func ExecutableWithExt added in v0.1.1

func ExecutableWithExt(ext string) string

func InstancePath

func InstancePath() string

func Serve

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

func SingletonPath

func SingletonPath() string

func SocketFolder added in v0.1.1

func SocketFolder() string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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