Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CCControlClient ¶
type CCControlClient interface {
Init(natsCfg NatsConfig) error
GetControls(hostname string) (*CCControlList, error)
GetTopology(hostname string) (*CCControlTopology, error)
GetControlValue(hostname, control string, device string, deviceID string) (string, error)
SetControlValue(hostname, control string, device string, deviceID string, value string) error
Close()
}
func NewCCControlClient ¶
func NewCCControlClient(natsConfig NatsConfig) (CCControlClient, error)
type CCControlList ¶
type CCControlList struct {
Controls []CCControlListEntry `json:"controls"`
}
type CCControlListEntry ¶
type CCControlTopology ¶
type CCControlTopology struct {
HWthreads []topo.HwthreadEntry `json:"hwthreads"`
CpuInfo topo.CpuInformation `json:"cpu_info"`
}
type NatsConfig ¶
type NatsConfig struct {
Server string `json:"server"`
Port uint16 `json:"port"`
RequestSubject string `json:"requestSubject"`
// TODO actually implement ReplySubject. Currently, we use NATS request/reply,
// which by default uses subject `_INBOX.XXXXXXXXX` as reply subject.
// However, this is difficult to restrict in terms of permissions.
//ReplySubject string `json:"replySubject"`
User string `json:"user"`
Password string `json:"password"`
CredsFile string `json:"credsFile"`
NKeySeedFile string `json:"nkeySeedFile"`
}
Click to show internal directories.
Click to hide internal directories.