Documentation ¶
Index ¶
- Variables
- type AppMemory
- type AppMemoryManager
- type Cpu
- type CpuManager
- type Device
- type DeviceAdd
- type DeviceDelete
- type DeviceManager
- type Disk
- type DiskManager
- type Flow
- type FlowAdd
- type FlowDelete
- type FlowManager
- type Gate
- type GateManager
- type GateUpdate
- type History
- type HistoryItem
- type HistoryManager
- type IPublisher
- type ISubscriber
- type MapElement
- type MapElementAdd
- type MapElementCursor
- type MapElementDelete
- type MapElementManager
- type MapElementSetOption
- type MapElementSetState
- type MapElementState
- type Memory
- type MemoryManager
- type MetricConfig
- type MetricManager
- type Mqtt
- type MqttClientStats
- type MqttManager
- type Node
- type NodeAdd
- type NodeDelete
- type NodeManager
- type NodeUpdateStatus
- type Publisher
- type Uptime
- type UptimeManager
- type UsageStat
- type Workflow
- type WorkflowAdd
- type WorkflowDelete
- type WorkflowManager
- type WorkflowStatus
- type WorkflowUpdateScenario
- type Zigbee2Mqtt
- type Zigbee2MqttAdd
- type Zigbee2MqttDelete
- type Zigbee2MqttManager
- type Zigbee2MqttUpdate
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRecordNotFound = errors.New("record not found")
)
Functions ¶
This section is empty.
Types ¶
type AppMemoryManager ¶ added in v0.1.2
type AppMemoryManager struct {
// contains filtered or unexported fields
}
func NewAppMemoryManager ¶ added in v0.1.2
func NewAppMemoryManager(publisher IPublisher) *AppMemoryManager
func (AppMemoryManager) Snapshot ¶ added in v0.1.2
func (d AppMemoryManager) Snapshot() AppMemory
type CpuManager ¶ added in v0.1.2
type CpuManager struct {
// contains filtered or unexported fields
}
func NewCpuManager ¶ added in v0.1.2
func NewCpuManager(publisher IPublisher) (c *CpuManager)
func (*CpuManager) All ¶ added in v0.1.2
func (c *CpuManager) All() float64
func (*CpuManager) Snapshot ¶ added in v0.1.2
func (c *CpuManager) Snapshot() Cpu
type DeviceDelete ¶ added in v0.1.2
type DeviceManager ¶ added in v0.1.2
type DeviceManager struct {
// contains filtered or unexported fields
}
func NewDeviceManager ¶ added in v0.1.2
func NewDeviceManager(publisher IPublisher) *DeviceManager
func (*DeviceManager) Snapshot ¶ added in v0.1.2
func (d *DeviceManager) Snapshot() Device
type DiskManager ¶ added in v0.1.2
type DiskManager struct {
// contains filtered or unexported fields
}
func NewDiskManager ¶ added in v0.1.2
func NewDiskManager(publisher IPublisher) (manager *DiskManager)
func (*DiskManager) Snapshot ¶ added in v0.1.2
func (d *DiskManager) Snapshot() Disk
type FlowDelete ¶ added in v0.1.2
type FlowManager ¶ added in v0.1.2
type FlowManager struct {
// contains filtered or unexported fields
}
func NewFlowManager ¶ added in v0.1.2
func NewFlowManager(publisher IPublisher, adaptors *adaptors.Adaptors) (flow *FlowManager)
func (*FlowManager) Snapshot ¶ added in v0.1.2
func (d *FlowManager) Snapshot() Flow
type GateManager ¶ added in v0.1.2
type GateManager struct {
// contains filtered or unexported fields
}
func NewGateManager ¶ added in v0.1.2
func NewGateManager(publisher IPublisher) *GateManager
func (*GateManager) Snapshot ¶ added in v0.1.2
func (d *GateManager) Snapshot() Gate
type GateUpdate ¶ added in v0.1.2
type GateUpdate struct {
Status, AccessToken string
}
type History ¶ added in v0.2.0
type History struct {
Items []HistoryItem `json:"items"`
}
type HistoryItem ¶ added in v0.2.0
type HistoryManager ¶ added in v0.2.0
type HistoryManager struct {
// contains filtered or unexported fields
}
func NewHistoryManager ¶ added in v0.2.0
func NewHistoryManager(publisher IPublisher, adaptors *adaptors.Adaptors) *HistoryManager
func (HistoryManager) Snapshot ¶ added in v0.2.0
func (d HistoryManager) Snapshot() History
type IPublisher ¶ added in v0.1.2
type IPublisher interface {
Broadcast(interface{})
}
type ISubscriber ¶ added in v0.1.2
type ISubscriber interface {
Broadcast(interface{})
}
type MapElement ¶ added in v0.1.2
type MapElement struct { Total int64 `json:"total"` Elements map[string]MapElementState `json:"devices"` }
type MapElementAdd ¶ added in v0.1.2
type MapElementAdd struct {
Num int64
}
type MapElementCursor ¶ added in v0.1.2
type MapElementDelete ¶ added in v0.1.2
type MapElementDelete struct {
Num int64
}
type MapElementManager ¶ added in v0.1.2
type MapElementManager struct {
// contains filtered or unexported fields
}
func NewMapElementManager ¶ added in v0.1.2
func NewMapElementManager(publisher IPublisher) *MapElementManager
func (*MapElementManager) Snapshot ¶ added in v0.1.2
func (d *MapElementManager) Snapshot() MapElement
type MapElementSetOption ¶ added in v0.1.2
type MapElementSetState ¶ added in v0.1.2
type MapElementState ¶ added in v0.1.2
type MemoryManager ¶ added in v0.1.2
type MemoryManager struct {
// contains filtered or unexported fields
}
func NewMemoryManager ¶ added in v0.1.2
func NewMemoryManager(publisher IPublisher) *MemoryManager
func (*MemoryManager) Snapshot ¶ added in v0.1.2
func (d *MemoryManager) Snapshot() Memory
type MetricConfig ¶
func NewMetricConfig ¶
func NewMetricConfig(cfg *config.AppConfig) *MetricConfig
type MetricManager ¶ added in v0.1.2
type MetricManager struct { *Publisher Cpu *CpuManager Disk *DiskManager Uptime *UptimeManager Memory *MemoryManager Gate *GateManager Workflow *WorkflowManager Node *NodeManager Device *DeviceManager MapElement *MapElementManager Flow *FlowManager AppMemory *AppMemoryManager Mqtt *MqttManager Zigbee2Mqtt *Zigbee2MqttManager History *HistoryManager // contains filtered or unexported fields }
func NewMetricManager ¶ added in v0.1.2
func NewMetricManager(cfg *MetricConfig, graceful *graceful_service.GracefulService, adaptors *adaptors.Adaptors) *MetricManager
func (MetricManager) Shutdown ¶ added in v0.1.2
func (m MetricManager) Shutdown()
func (*MetricManager) Start ¶ added in v0.1.2
func (m *MetricManager) Start()
func (*MetricManager) Update ¶ added in v0.1.2
func (m *MetricManager) Update(t interface{})
type Mqtt ¶ added in v0.1.2
type Mqtt struct {
ClientState MqttClientStats `json:"client_state"`
}
type MqttClientStats ¶ added in v0.1.2
type MqttManager ¶ added in v0.1.2
type MqttManager struct {
// contains filtered or unexported fields
}
func NewMqttManager ¶ added in v0.1.2
func NewMqttManager(publisher IPublisher) *MqttManager
func (*MqttManager) Snapshot ¶ added in v0.1.2
func (d *MqttManager) Snapshot() Mqtt
type NodeDelete ¶ added in v0.1.2
type NodeDelete struct {
Num int64
}
type NodeManager ¶ added in v0.1.2
type NodeManager struct {
// contains filtered or unexported fields
}
func NewNodeManager ¶ added in v0.1.2
func NewNodeManager(publisher IPublisher) *NodeManager
func (*NodeManager) GetStatus ¶ added in v0.1.2
func (d *NodeManager) GetStatus(nodeId int64) (status string, err error)
func (*NodeManager) Snapshot ¶ added in v0.1.2
func (d *NodeManager) Snapshot() Node
type NodeUpdateStatus ¶ added in v0.1.2
type Publisher ¶ added in v0.1.2
func NewPublisher ¶ added in v0.1.2
func NewPublisher() (t *Publisher)
func (*Publisher) Subscribe ¶ added in v0.1.2
func (p *Publisher) Subscribe(command string, f ISubscriber)
func (*Publisher) UnSubscribe ¶ added in v0.1.2
type UptimeManager ¶ added in v0.1.2
type UptimeManager struct {
// contains filtered or unexported fields
}
func NewUptimeManager ¶ added in v0.1.2
func NewUptimeManager(publisher IPublisher) (uptime *UptimeManager)
func (*UptimeManager) Snapshot ¶ added in v0.1.2
func (d *UptimeManager) Snapshot() Uptime
type UsageStat ¶ added in v0.1.2
type UsageStat struct { Path string `json:"path"` Fstype string `json:"fstype"` Total uint64 `json:"total"` Free uint64 `json:"free"` Used uint64 `json:"used"` UsedPercent float64 `json:"used_percent"` InodesTotal uint64 `json:"inodes_total"` InodesUsed uint64 `json:"inodes_used"` InodesFree uint64 `json:"inodes_free"` InodesUsedPercent float64 `json:"inodes_used_percent"` }
type Workflow ¶ added in v0.1.2
type Workflow struct { Total int64 `json:"total"` Disabled int64 `json:"disabled"` Status map[int64]WorkflowStatus `json:"status"` }
type WorkflowAdd ¶ added in v0.1.2
type WorkflowDelete ¶ added in v0.1.2
type WorkflowManager ¶ added in v0.1.2
type WorkflowManager struct {
// contains filtered or unexported fields
}
func NewWorkflowManager ¶ added in v0.1.2
func NewWorkflowManager(publisher IPublisher, adaptors *adaptors.Adaptors) (wf *WorkflowManager)
func (*WorkflowManager) GetStatus ¶ added in v0.1.2
func (d *WorkflowManager) GetStatus(workflowId int64) (status WorkflowStatus, err error)
func (*WorkflowManager) Snapshot ¶ added in v0.1.2
func (d *WorkflowManager) Snapshot() Workflow
type WorkflowStatus ¶ added in v0.1.2
type WorkflowUpdateScenario ¶ added in v0.1.2
type Zigbee2Mqtt ¶ added in v0.1.2
type Zigbee2MqttAdd ¶ added in v0.1.2
type Zigbee2MqttDelete ¶ added in v0.1.2
type Zigbee2MqttManager ¶ added in v0.1.2
type Zigbee2MqttManager struct {
// contains filtered or unexported fields
}
func NewZigbee2MqttManager ¶ added in v0.1.2
func NewZigbee2MqttManager(publisher IPublisher) *Zigbee2MqttManager
func (*Zigbee2MqttManager) Snapshot ¶ added in v0.1.2
func (d *Zigbee2MqttManager) Snapshot() Zigbee2Mqtt
type Zigbee2MqttUpdate ¶ added in v0.2.0
type Zigbee2MqttUpdate struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.