Documentation
¶
Index ¶
- Variables
- func BindTypeNotify(entityType string, notify ConsumerTypeNotify)
- func DeleteEntity(entityType string, key string)
- func FindEntity(entityType string, finder func(entity commEntity.IEntity) bool) commEntity.IEntity
- func FindEntityList(entityType string, finder func(entity commEntity.IEntity) bool) []commEntity.IEntity
- func ForeachEntityList(entityType string, finder func(entity commEntity.IEntity) bool)
- func GetChannelEntity(channelName string, channelType string) *edgeEntity.ChannelEntity
- func GetConfigEntity(serviceName string, serviceType string, configName string) *edgeEntity.ConfigEntity
- func GetDeviceEntity(deviceName string) *edgeEntity.DeviceEntity
- func GetEntityById(entityType string, id int64) commEntity.IEntity
- func GetEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
- func GetEntityByServiceKeys(entityType string, serviceKeys []string) (map[string]commEntity.IEntity, error)
- func GetEntityCount(entityType string, finder func(entity commEntity.IEntity) bool) (int, error)
- func GetEntityList(entityType string) ([]commEntity.IEntity, error)
- func GetEntityMap(entityType string) (map[string]commEntity.IEntity, error)
- func GetOperateEntity(manufacturer string, deviceType string, operateName string) *edgeEntity.OperateEntity
- func GetUpdateTime(entityType string) int64
- func HasEntityByServiceKey(entityType string, serviceKey string) (bool, error)
- func InsertEntity(entity commEntity.IEntity)
- func ReadEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
- func UpdateEntity(entity commEntity.IEntity) error
- func WriteEntity(entity commEntity.IEntity) error
- type ConsumerEntityNotify
- type ConsumerTypeNotify
- type RedisAgileService
- type RedisAgileServiceManager
- type RedisManager
- func (e *RedisManager) BindTypeNotify(entityType string, notify ConsumerTypeNotify)
- func (e *RedisManager) CopyEntityList(entityType string) []commEntity.IEntity
- func (e *RedisManager) DeleteEntity(entityType string, key string) error
- func (e *RedisManager) FindEntity(entityType string, finder func(entity commEntity.IEntity) bool) commEntity.IEntity
- func (e *RedisManager) FindEntityList(entityType string, finder func(entity commEntity.IEntity) bool) []commEntity.IEntity
- func (e *RedisManager) ForeachEntityList(entityType string, finder func(entity commEntity.IEntity) bool)
- func (e *RedisManager) GetConsumerService(entityType string) *RedisService
- func (e *RedisManager) GetEntityById(entityType string, id int64) commEntity.IEntity
- func (e *RedisManager) GetEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
- func (e *RedisManager) GetEntityByServiceKeys(entityType string, serviceKeys []string) (map[string]commEntity.IEntity, error)
- func (e *RedisManager) GetEntityCount(entityType string, finder func(entity commEntity.IEntity) bool) (int, error)
- func (e *RedisManager) GetEntityMap(entityType string) (map[string]commEntity.IEntity, error)
- func (e *RedisManager) GetOperatorReader(entityType string) *RedisOperator
- func (e *RedisManager) GetOperatorWriter(entityType string) *RedisOperator
- func (e *RedisManager) GetProducerService(entityType string) *RedisService
- func (e *RedisManager) GetRedisConsumer() map[string]interface{}
- func (e *RedisManager) GetRedisProducer() map[string]interface{}
- func (e *RedisManager) GetRedisReader() map[string]interface{}
- func (e *RedisManager) GetRedisService(entityType string) *RedisService
- func (e *RedisManager) GetRedisWriter() map[string]interface{}
- func (e *RedisManager) GetUpdateTime(entityType string) int64
- func (e *RedisManager) InitLoadConsumerEntity(entityType string) bool
- func (e *RedisManager) InitLoadProducerEntity(entityType string) bool
- func (e *RedisManager) InsertEntity(entity commEntity.IEntity)
- func (e *RedisManager) LoadAgileEntities(entityType string) error
- func (e *RedisManager) LoadAllEntities(entityType string) error
- func (e *RedisManager) ReadEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
- func (e *RedisManager) ReloadRedisService(entityType string) bool
- func (e *RedisManager) SaveAgileEntities(entityType string) error
- func (e *RedisManager) SaveAllEntities(entityType string) error
- func (e *RedisManager) UpdateEntity(entity commEntity.IEntity) error
- func (e *RedisManager) UpdateRedisService(entityType string) bool
- func (e *RedisManager) WriteEntity(entity commEntity.IEntity) error
- type RedisModeManager
- type RedisOperator
- type RedisService
- func (e *RedisService) DeleteEntity(key string)
- func (e *RedisService) Init(entityList []commEntity.IEntity)
- func (e *RedisService) IsInited() bool
- func (e *RedisService) PutEntity(entity commEntity.IEntity)
- func (e *RedisService) SetInited()
- func (e *RedisService) SetTypeNotify(notify ConsumerTypeNotify)
- func (e *RedisService) UpdateEntity(entity commEntity.IEntity) error
- type RedisServiceManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RedisPrefix string IRedisManager *RedisManager IRedisAgileManager *RedisAgileServiceManager )
Functions ¶
func BindTypeNotify ¶
func BindTypeNotify(entityType string, notify ConsumerTypeNotify)
func DeleteEntity ¶
func FindEntity ¶ added in v1.0.1
func FindEntity(entityType string, finder func(entity commEntity.IEntity) bool) commEntity.IEntity
func FindEntityList ¶
func FindEntityList(entityType string, finder func(entity commEntity.IEntity) bool) []commEntity.IEntity
func ForeachEntityList ¶
func ForeachEntityList(entityType string, finder func(entity commEntity.IEntity) bool)
func GetChannelEntity ¶
func GetChannelEntity(channelName string, channelType string) *edgeEntity.ChannelEntity
func GetConfigEntity ¶
func GetConfigEntity(serviceName string, serviceType string, configName string) *edgeEntity.ConfigEntity
func GetDeviceEntity ¶
func GetDeviceEntity(deviceName string) *edgeEntity.DeviceEntity
func GetEntityById ¶
func GetEntityById(entityType string, id int64) commEntity.IEntity
func GetEntityByServiceKey ¶
func GetEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
func GetEntityByServiceKeys ¶ added in v1.0.1
func GetEntityCount ¶ added in v1.0.1
func GetEntityList ¶ added in v1.0.1
func GetEntityList(entityType string) ([]commEntity.IEntity, error)
func GetEntityMap ¶
func GetEntityMap(entityType string) (map[string]commEntity.IEntity, error)
func GetOperateEntity ¶
func GetOperateEntity(manufacturer string, deviceType string, operateName string) *edgeEntity.OperateEntity
func GetUpdateTime ¶
func HasEntityByServiceKey ¶
func InsertEntity ¶
func InsertEntity(entity commEntity.IEntity)
func ReadEntityByServiceKey ¶
func ReadEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
func UpdateEntity ¶
func UpdateEntity(entity commEntity.IEntity) error
func WriteEntity ¶
func WriteEntity(entity commEntity.IEntity) error
Types ¶
type ConsumerEntityNotify ¶
type ConsumerEntityNotify interface {
// contains filtered or unexported methods
}
ConsumerEntityNotify Entity级别
type ConsumerTypeNotify ¶
type ConsumerTypeNotify interface {
Notify(updateTime int64, addMap map[string]commEntity.IEntity, delSet map[string]commEntity.IEntity, mdyMap map[string]commEntity.IEntity)
}
ConsumerTypeNotify Type级别
type RedisAgileService ¶ added in v1.0.1
type RedisAgileService struct {
// contains filtered or unexported fields
}
func GetAgileService ¶ added in v1.0.1
func GetAgileService(entityType string) *RedisAgileService
func (*RedisAgileService) LoadAgileEntities ¶ added in v1.0.1
func (e *RedisAgileService) LoadAgileEntities()
func (*RedisAgileService) LoadAllEntities ¶ added in v1.0.1
func (e *RedisAgileService) LoadAllEntities() (map[string]commEntity.IEntity, error)
func (*RedisAgileService) LoadChangeEntities ¶ added in v1.0.1
func (e *RedisAgileService) LoadChangeEntities(addMap *map[string]commEntity.IEntity, delMap *map[string]commEntity.IEntity, mdyMap *map[string]commEntity.IEntity) error
type RedisAgileServiceManager ¶ added in v1.0.1
type RedisAgileServiceManager struct {
// contains filtered or unexported fields
}
func (*RedisAgileServiceManager) GetAgileService ¶ added in v1.0.1
func (e *RedisAgileServiceManager) GetAgileService(entityType string) *RedisAgileService
type RedisManager ¶
type RedisManager struct {
// contains filtered or unexported fields
}
func (*RedisManager) BindTypeNotify ¶
func (e *RedisManager) BindTypeNotify(entityType string, notify ConsumerTypeNotify)
func (*RedisManager) CopyEntityList ¶
func (e *RedisManager) CopyEntityList(entityType string) []commEntity.IEntity
func (*RedisManager) DeleteEntity ¶
func (e *RedisManager) DeleteEntity(entityType string, key string) error
func (*RedisManager) FindEntity ¶
func (e *RedisManager) FindEntity(entityType string, finder func(entity commEntity.IEntity) bool) commEntity.IEntity
func (*RedisManager) FindEntityList ¶
func (e *RedisManager) FindEntityList(entityType string, finder func(entity commEntity.IEntity) bool) []commEntity.IEntity
func (*RedisManager) ForeachEntityList ¶
func (e *RedisManager) ForeachEntityList(entityType string, finder func(entity commEntity.IEntity) bool)
func (*RedisManager) GetConsumerService ¶
func (e *RedisManager) GetConsumerService(entityType string) *RedisService
func (*RedisManager) GetEntityById ¶
func (e *RedisManager) GetEntityById(entityType string, id int64) commEntity.IEntity
func (*RedisManager) GetEntityByServiceKey ¶
func (e *RedisManager) GetEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
func (*RedisManager) GetEntityByServiceKeys ¶ added in v1.0.1
func (e *RedisManager) GetEntityByServiceKeys(entityType string, serviceKeys []string) (map[string]commEntity.IEntity, error)
func (*RedisManager) GetEntityCount ¶ added in v1.0.1
func (e *RedisManager) GetEntityCount(entityType string, finder func(entity commEntity.IEntity) bool) (int, error)
func (*RedisManager) GetEntityMap ¶
func (e *RedisManager) GetEntityMap(entityType string) (map[string]commEntity.IEntity, error)
GetEntityMap 复制一个全量数据的副本
func (*RedisManager) GetOperatorReader ¶
func (e *RedisManager) GetOperatorReader(entityType string) *RedisOperator
func (*RedisManager) GetOperatorWriter ¶
func (e *RedisManager) GetOperatorWriter(entityType string) *RedisOperator
func (*RedisManager) GetProducerService ¶
func (e *RedisManager) GetProducerService(entityType string) *RedisService
func (*RedisManager) GetRedisConsumer ¶
func (e *RedisManager) GetRedisConsumer() map[string]interface{}
func (*RedisManager) GetRedisProducer ¶
func (e *RedisManager) GetRedisProducer() map[string]interface{}
func (*RedisManager) GetRedisReader ¶
func (e *RedisManager) GetRedisReader() map[string]interface{}
func (*RedisManager) GetRedisService ¶
func (e *RedisManager) GetRedisService(entityType string) *RedisService
func (*RedisManager) GetRedisWriter ¶
func (e *RedisManager) GetRedisWriter() map[string]interface{}
func (*RedisManager) GetUpdateTime ¶
func (e *RedisManager) GetUpdateTime(entityType string) int64
func (*RedisManager) InitLoadConsumerEntity ¶
func (e *RedisManager) InitLoadConsumerEntity(entityType string) bool
func (*RedisManager) InitLoadProducerEntity ¶
func (e *RedisManager) InitLoadProducerEntity(entityType string) bool
func (*RedisManager) InsertEntity ¶
func (e *RedisManager) InsertEntity(entity commEntity.IEntity)
func (*RedisManager) LoadAgileEntities ¶
func (e *RedisManager) LoadAgileEntities(entityType string) error
func (*RedisManager) LoadAllEntities ¶
func (e *RedisManager) LoadAllEntities(entityType string) error
func (*RedisManager) ReadEntityByServiceKey ¶
func (e *RedisManager) ReadEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)
func (*RedisManager) ReloadRedisService ¶
func (e *RedisManager) ReloadRedisService(entityType string) bool
func (*RedisManager) SaveAgileEntities ¶
func (e *RedisManager) SaveAgileEntities(entityType string) error
func (*RedisManager) SaveAllEntities ¶
func (e *RedisManager) SaveAllEntities(entityType string) error
func (*RedisManager) UpdateEntity ¶
func (e *RedisManager) UpdateEntity(entity commEntity.IEntity) error
func (*RedisManager) UpdateRedisService ¶
func (e *RedisManager) UpdateRedisService(entityType string) bool
func (*RedisManager) WriteEntity ¶
func (e *RedisManager) WriteEntity(entity commEntity.IEntity) error
type RedisModeManager ¶
type RedisModeManager struct {
// contains filtered or unexported fields
}
type RedisOperator ¶
type RedisOperator struct {
EntityType string // 实体类型
}
func (*RedisOperator) DeleteEntity ¶
func (e *RedisOperator) DeleteEntity(key string) error
func (*RedisOperator) ReadAllDataMap ¶ added in v1.0.1
func (e *RedisOperator) ReadAllDataMap() (map[string]commEntity.IEntity, error)
func (*RedisOperator) WriteEntityMap ¶ added in v1.0.1
func (e *RedisOperator) WriteEntityMap(dataMap map[string]commEntity.IEntity) error
type RedisService ¶
type RedisService struct {
EntityType string // 实体类型
// contains filtered or unexported fields
}
func (*RedisService) DeleteEntity ¶
func (e *RedisService) DeleteEntity(key string)
func (*RedisService) Init ¶ added in v1.0.1
func (e *RedisService) Init(entityList []commEntity.IEntity)
func (*RedisService) IsInited ¶
func (e *RedisService) IsInited() bool
func (*RedisService) PutEntity ¶
func (e *RedisService) PutEntity(entity commEntity.IEntity)
func (*RedisService) SetInited ¶
func (e *RedisService) SetInited()
func (*RedisService) SetTypeNotify ¶
func (e *RedisService) SetTypeNotify(notify ConsumerTypeNotify)
func (*RedisService) UpdateEntity ¶
func (e *RedisService) UpdateEntity(entity commEntity.IEntity) error
type RedisServiceManager ¶
type RedisServiceManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.