commRedisService

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEntity added in v1.0.4

func DeleteEntity(entityType string, key string)

func FindEntityList added in v1.0.2

func FindEntityList(entityType string, finder func(entity commEntity.IEntity) bool) []commEntity.IEntity

func ForeachEntityList added in v1.0.4

func ForeachEntityList(entityType string, finder func(entity commEntity.IEntity) bool)

func GetChannelEntity

func GetChannelEntity(channelName string, channelType string) *commEntity.ChannelEntity

func GetConfigEntity

func GetConfigEntity(serviceType string, serviceName string, configName string) *commEntity.ConfigEntity

func GetDeviceEntity

func GetDeviceEntity(deviceName string) *commEntity.DeviceEntity

func GetEntityById

func GetEntityById(entityType string, id int64) commEntity.IEntity

func GetEntityByServiceKey

func GetEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)

func GetEntityMap added in v1.0.4

func GetEntityMap(entityType string) (map[string]commEntity.IEntity, error)

func GetOperateEntity

func GetOperateEntity(manufacturer string, deviceType string, operateName string) *commEntity.OperateEntity

func GetUpdateTime added in v1.0.4

func GetUpdateTime(entityType string) int64

func HasEntityByServiceKey added in v1.0.4

func HasEntityByServiceKey(entityType string, serviceKey string) (bool, error)

func InsertEntity added in v1.0.4

func InsertEntity(entity commEntity.IEntity)

func ReadEntityByServiceKey added in v1.0.4

func ReadEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)

func UpdateEntity added in v1.0.4

func UpdateEntity(entity commEntity.IEntity) error

func WriteEntity added in v1.0.4

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 RedisManager

type RedisManager struct {
	// contains filtered or unexported fields
}
var (
	IRedisManager *RedisManager
)

func (*RedisManager) CopyEntityList

func (e *RedisManager) CopyEntityList(entityType string) []commEntity.IEntity

func (*RedisManager) DeleteEntity added in v1.0.4

func (e *RedisManager) DeleteEntity(entityType string, key string) error

func (*RedisManager) FindEntity

func (e *RedisManager) FindEntity(entityType string, finder func(entity commEntity.IEntity) bool) interface{}

func (*RedisManager) FindEntityList

func (e *RedisManager) FindEntityList(entityType string, finder func(entity commEntity.IEntity) bool) []commEntity.IEntity

func (*RedisManager) ForeachEntityList added in v1.0.4

func (e *RedisManager) ForeachEntityList(entityType string, finder func(entity commEntity.IEntity) bool)

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) GetEntityMap added in v1.0.4

func (e *RedisManager) GetEntityMap(entityType string) (map[string]commEntity.IEntity, error)

GetEntityMap 复制一个全量数据的副本

func (*RedisManager) GetOperatorReader added in v1.0.4

func (e *RedisManager) GetOperatorReader(entityType string) *RedisOperator

func (*RedisManager) GetOperatorWriter added in v1.0.4

func (e *RedisManager) GetOperatorWriter(entityType string) *RedisOperator

func (*RedisManager) GetProducerService added in v1.0.4

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 added in v1.0.4

func (e *RedisManager) GetRedisReader() map[string]interface{}

func (*RedisManager) GetRedisService

func (e *RedisManager) GetRedisService(entityType string) *RedisService

func (*RedisManager) GetRedisWriter added in v1.0.4

func (e *RedisManager) GetRedisWriter() map[string]interface{}

func (*RedisManager) GetUpdateTime added in v1.0.4

func (e *RedisManager) GetUpdateTime(entityType string) int64

func (*RedisManager) InitLoadConsumerEntity

func (e *RedisManager) InitLoadConsumerEntity(entityType string) bool

func (*RedisManager) InitLoadProducerEntity added in v1.0.3

func (e *RedisManager) InitLoadProducerEntity(entityType string) bool

func (*RedisManager) InsertEntity added in v1.0.4

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 added in v1.0.4

func (e *RedisManager) ReadEntityByServiceKey(entityType string, serviceKey string) (commEntity.IEntity, error)

func (*RedisManager) ReloadRedisService added in v1.0.3

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 added in v1.0.4

func (e *RedisManager) UpdateEntity(entity commEntity.IEntity) error

func (*RedisManager) UpdateRedisService added in v1.0.3

func (e *RedisManager) UpdateRedisService(entityType string) bool

func (*RedisManager) WriteEntity added in v1.0.4

func (e *RedisManager) WriteEntity(entity commEntity.IEntity) error

type RedisModeManager

type RedisModeManager struct {
	// contains filtered or unexported fields
}

type RedisOperator added in v1.0.4

type RedisOperator struct {
	EntityType string // 实体类型
}

func (*RedisOperator) DeleteEntity added in v1.0.4

func (e *RedisOperator) DeleteEntity(key string) error

type RedisService

type RedisService struct {
	EntityType string // 实体类型
	// contains filtered or unexported fields
}

func (*RedisService) DeleteEntity added in v1.0.4

func (e *RedisService) DeleteEntity(key string)

func (*RedisService) IsInited

func (e *RedisService) IsInited() bool

func (*RedisService) PutEntity added in v1.0.4

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 added in v1.0.3

func (e *RedisService) UpdateEntity(entity commEntity.IEntity) error

type RedisServiceManager

type RedisServiceManager struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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