Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreCache ¶ added in v1.5.0
type CoreCache interface {
GetModel(modelName string) (model config.DeviceModel, ok bool) // model info
// 查询指定模型的所有点,并保持该点位在配置文件中的有序性
GetPoints(modelName string) ([]config.Point, bool)
GetDevice(id string) (device config.Device, ok bool)
//查询指定标签的设备列表
GetDevicesByTag(tag string) (devices []config.Device)
AddTag(tag string) (e error) //
GetPointByModel(modelName string, pointName string) (point config.Point, ok bool) // search point by model
GetPointByDevice(id string, pointName string) (point config.Point, ok bool) // search point by device
GetRunningPluginByDevice(deviceId string) (plugin plugin.Plugin, ok bool) // search plugin by device and point
GetRunningPluginByKey(key string) (plugin plugin.Plugin, ok bool) // search plugin by directory name
AddRunningPlugin(key string, plugin plugin.Plugin) // add running plugin
Models() (models []config.DeviceModel) // all model
Devices() (devices []config.Device)
GetAllRunningPluginKey() (keys []string) // get running plugin keys
UpdateDeviceProperty(id string, key string, value string) // 更新设备属性
DeleteDevice(id string) // 删除设备
UpdateDeviceDesc(id string, desc string) // 更新设备描述
Reset()
// contains filtered or unexported methods
}
coreCache 核心缓存
var Instance CoreCache
Click to show internal directories.
Click to hide internal directories.