Documentation
¶
Index ¶
- Constants
- func API() *echo.Echo
- func Addr() string
- func EnsureBackground(addr string) error
- func OnAPI(fn func(*echo.Echo))
- func OnFeatures(fn func() Features)
- func Running() bool
- func SetConnect(connect func(ui.UI))
- func StartBlocking(addr string) error
- func StartWeb(connect func(ui.UI)) error
- type Features
- type Session
Constants ¶
View Source
const DefaultAddr = ":8080"
DefaultAddr is the shared HTTP listen address.
Variables ¶
This section is empty.
Functions ¶
func EnsureBackground ¶
EnsureBackground starts the REST server in a goroutine if not already running.
func OnFeatures ¶
func OnFeatures(fn func() Features)
OnFeatures registers a provider called when /features is queried.
func SetConnect ¶
SetConnect registers the terminal session handler before the REST server starts.
func StartBlocking ¶
StartBlocking runs the REST server on the main goroutine (blocks).
Types ¶
Click to show internal directories.
Click to hide internal directories.