Documentation
¶
Index ¶
- func WriteUpdate(w io.Writer, msg *protocol.Update) error
- type Devices
- func (n *Devices) Add(device *devices.Device) error
- func (n *Devices) All() map[string]*devices.Device
- func (n *Devices) AllWithState(nodes *Nodes) map[string]*devices.Device
- func (n *Devices) ByUuid(uuid string) *devices.Device
- func (n *Devices) Delete(uuid string)
- func (n *Devices) RestoreFromFile(path string)
- func (n *Devices) SaveToFile(path string)
- func (n *Devices) SetOfflineByNode(nodeUUID string) (list []*devices.Device)
- func (n *Devices) ShallowCopy() map[string]*devices.Device
- type Node
- type Nodes
- type Searchable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Devices ¶
func NewDevices ¶
func NewDevices() *Devices
func (*Devices) AllWithState ¶
func (*Devices) RestoreFromFile ¶
func (*Devices) SaveToFile ¶
func (*Devices) SetOfflineByNode ¶
SetOfflineByNode marks device from a single node offline and returns a list of all marked devices
type Node ¶
type Node interface {
SetState(interface{})
State() interface{}
Devices() *devices.Map
SetDevices(*devices.Map)
Config() *protocol.ConfigMap
SetConfig(*protocol.ConfigMap)
SetElements([]*protocol.Element)
Elements() []*protocol.Element
Uuid() string
Name() string
SetUuid(string)
SetName(string)
Write(b []byte) (int, error)
SetConn(conn net.Conn)
GetNotification(json.RawMessage) *notifications.Notification
}
type Searchable ¶
Click to show internal directories.
Click to hide internal directories.