Documentation
¶
Index ¶
- func DeprecatedRoute(msg string) func(http.HandlerFunc) http.HandlerFunc
- func Start()
- type BoxStore
- func (bs *BoxStore) Add(box api.Box) error
- func (bs *BoxStore) Delete(id string) (found bool, deletedBox api.Box)
- func (bs *BoxStore) Exists(id string) bool
- func (bs *BoxStore) FindIndexByID(id string) (int, error)
- func (bs *BoxStore) ForEach(fn func(api.Box) bool)
- func (bs *BoxStore) GetAll() []api.Box
- func (bs *BoxStore) GetByID(id string) (*api.Box, error)
- func (bs *BoxStore) Len() int
- func (bs *BoxStore) Update(id string, updateFn func(*api.Box)) error
- type Broker
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeprecatedRoute ¶
func DeprecatedRoute(msg string) func(http.HandlerFunc) http.HandlerFunc
Types ¶
type BoxStore ¶
type BoxStore struct {
// contains filtered or unexported fields
}
BoxStore provides thread-safe access to boxes
func (*BoxStore) FindIndexByID ¶
FindIndexByID returns the index of a box by ID (thread-safe read)
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker which will be created in this program. It is responsible for keeping a list of which clients (browsers) are currently attached and broadcasting events (messages) to those clients.
func (*Broker) ClientCount ¶
ClientCount returns the current number of connected clients (thread-safe)
type Options ¶
type Options struct {
ApiPort string `long:"api-port" description:"The port to use for api calls" default:"8081"`
SitePort string `short:"p" long:"port" description:"The port to use for the dashboard" default:"8080"`
Debug bool `long:"debug" description:"Print debug messages"`
Demo bool `long:"run-demo" description:"Run a demo, will use temporary folder"`
DefaultStatic bool `long:"default-static" description:"Use default static content"`
DataPath string `short:"d" long:"data-path" description:"Path to store data files (default: $HOME/.alive/data)"`
StaticPath string `long:"static-path" description:"Path to store static files (default: $HOME/.alive/static)"`
ParentUrl string `` /* 143-byte string literal not displayed */
ParentBoxID string `long:"parent-id" description:"Box id to use when updating status on a parent dashboard"`
ParentBoxSize string `long:"parent-size" description:"Box size to use when updating status on a parent dashboard (default: large)" default:"large"`
}
Click to show internal directories.
Click to hide internal directories.