state

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Unlicense Imports: 8 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/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 ExecutableName

func ExecutableName() string

func InstancePath

func InstancePath(dir string, id int) string

func Serve

func Serve(node tree.Node) error

func SingletonPath

func SingletonPath(dir string) string

Types

type Log

type Log struct {
	tree.Log
	Info func(args ...interface{})
}

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