Documentation ¶
Index ¶
- func BootstrapService(manager *Manager, socket *websocket.Conn)
- type Client
- type Manager
- type ManagerOptions
- type NestedServiceMapping
- func (n NestedServiceMapping) Delete(key1, key2 string)
- func (n NestedServiceMapping) DeleteForService(key1 string, service *Service)
- func (n NestedServiceMapping) DeleteNestedKey(nestedKey string)
- func (n NestedServiceMapping) Get(key1, key2 string) *Service
- func (n NestedServiceMapping) GetRandom(key1 string) *Service
- func (n NestedServiceMapping) Set(key1, key2 string, value *Service)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapService ¶
BootstrapService creates a new Service which will alert the manager when the service registers (by sending its first message) and deregisters (by disconnecting)
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages all websocket connections
func (*Manager) AddWebsocket ¶
AddWebsocket adds the websocket under the manager's control
func (*Manager) GetClients ¶
GetClients returns all the connections
type ManagerOptions ¶ added in v0.25.0
type ManagerOptions struct { DeregisterChannel chan string ErrorChannel chan error MessageChannel chan structs.Message RegisterChannel chan string ActivityIDCleanupInterval time.Duration }
ManagerOptions is the options passed to NewManager
type NestedServiceMapping ¶ added in v0.26.2
NestedServiceMapping is a 2 level map of strings to Services
func (NestedServiceMapping) Delete ¶ added in v0.26.2
func (n NestedServiceMapping) Delete(key1, key2 string)
Delete retrives the value for the given keys
func (NestedServiceMapping) DeleteForService ¶ added in v0.26.2
func (n NestedServiceMapping) DeleteForService(key1 string, service *Service)
DeleteForService deletes all the keys under the given key that are the given service
func (NestedServiceMapping) DeleteNestedKey ¶ added in v0.26.3
func (n NestedServiceMapping) DeleteNestedKey(nestedKey string)
DeleteNestedKey deletes entries for a nested key
func (NestedServiceMapping) Get ¶ added in v0.26.2
func (n NestedServiceMapping) Get(key1, key2 string) *Service
Get retrives the value for the given keys
func (NestedServiceMapping) GetRandom ¶ added in v0.26.2
func (n NestedServiceMapping) GetRandom(key1 string) *Service
GetRandom retrives a random Service under the given key
func (NestedServiceMapping) Set ¶ added in v0.26.2
func (n NestedServiceMapping) Set(key1, key2 string, value *Service)
Set saves the value for the given keys