cache

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

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

func InitCoreCache

func InitCoreCache(configMap map[string]config.Config) (obj CoreCache, err error)

InitCoreCache 初始化核心缓存

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL