Documentation ¶
Overview ¶
netswitches helper functions.
Index ¶
- Variables
- type NetSwitches
- func (nss *NetSwitches) ApplyConfig(machineId int64, updates chan<- string, xmppClient *xmpp.Xmpp, userId int64) (err error)
- func (nss *NetSwitches) FetchNetswitchStatus(machineId int64) (relayState string, current float64, err error)
- func (nss *NetSwitches) HasStatusCheck(machineId int64) (yes bool, err error)
- func (nss *NetSwitches) Load(xmppClient *xmpp.Xmpp) (err error)
- func (nss *NetSwitches) MachineIds() (ids []int64)
- func (nss *NetSwitches) SetOn(machineId int64, on bool) (err error)
- func (nss *NetSwitches) UseFromJson(raw []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDuplicateCombinationHostSensorPort = errors.New("Duplicate combination host + sensor port")
)
Functions ¶
This section is empty.
Types ¶
type NetSwitches ¶
type NetSwitches struct {
// contains filtered or unexported fields
}
func New ¶
func New() (nss *NetSwitches)
func (*NetSwitches) ApplyConfig ¶
func (*NetSwitches) FetchNetswitchStatus ¶
func (nss *NetSwitches) FetchNetswitchStatus(machineId int64) ( relayState string, current float64, err error, )
func (*NetSwitches) HasStatusCheck ¶
func (nss *NetSwitches) HasStatusCheck(machineId int64) (yes bool, err error)
func (*NetSwitches) Load ¶
func (nss *NetSwitches) Load(xmppClient *xmpp.Xmpp) (err error)
Load netswitches from EASY LAB API. client should be logged in.
func (*NetSwitches) MachineIds ¶
func (nss *NetSwitches) MachineIds() (ids []int64)
func (*NetSwitches) UseFromJson ¶
func (nss *NetSwitches) UseFromJson(raw []byte) (err error)
fetch netswitch data from EASY LAB API.
Each type NetSwitch runs its own dispatch loop. Make sure no additional loop is started.
Click to show internal directories.
Click to hide internal directories.