cache

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeviceMsg

func GetDeviceMsg[reqType any](ctx context.Context, store kv.Store, msgType string, handle string, Type string, device devices.Core, MsgToken string) (*reqType, error)

func NewSchemaRepo

func NewSchemaRepo() schema.Repo

func SetDeviceMsg

func SetDeviceMsg(ctx context.Context, store kv.Store, msgType string, req *deviceMsg.PublishMsg, MsgToken string) error

Types

type CustomCacheStu

type CustomCacheStu struct {
	LoginAuthPool *sync.Pool
	Topics        []*productCustom.CustomTopic
}

type DeviceStatus

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

func NewDeviceStatus

func NewDeviceStatus(store kv.Store) *DeviceStatus

func (*DeviceStatus) DelDevices

func (d *DeviceStatus) DelDevices(ctx context.Context, devs ...*deviceStatus.ConnectMsg) error

func (*DeviceStatus) GetDevices

func (d *DeviceStatus) GetDevices(ctx context.Context) ([]*deviceStatus.ConnectMsg, error)

func (*DeviceStatus) Lock

func (d *DeviceStatus) Lock(ctx context.Context) (bool, error)

func (*DeviceStatus) UnLock

func (d *DeviceStatus) UnLock(ctx context.Context) error

type GatewayCanBind

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

func NewGatewayCanBind

func NewGatewayCanBind(store kv.Store) *GatewayCanBind

func (*GatewayCanBind) GetDevices

func (d *GatewayCanBind) GetDevices(ctx context.Context, gateway devices.Core) (*GatewayCanBindStu, error)

func (*GatewayCanBind) Update

type GatewayCanBindStu

type GatewayCanBindStu struct {
	Gateway     devices.Core
	SubDevices  []*devices.Core
	UpdatedTime int64 //秒时间戳
}

type SchemaRepo

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

func (SchemaRepo) ClearCache

func (s SchemaRepo) ClearCache(ctx context.Context, productID string) error

func (SchemaRepo) Delete

func (s SchemaRepo) Delete(ctx context.Context, productID string) error

func (SchemaRepo) GetSchemaModel

func (s SchemaRepo) GetSchemaModel(ctx context.Context, productID string) (*schema.Model, error)

func (SchemaRepo) TslImport

func (s SchemaRepo) TslImport(ctx context.Context, productID string, schemaInfo *schema.Model) error

type ScriptRepo

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

func NewScriptRepo

func NewScriptRepo() *ScriptRepo

func (*ScriptRepo) ClearCache

func (t *ScriptRepo) ClearCache(ctx context.Context, productID string) error

func (*ScriptRepo) GetCustomTopic

func (t *ScriptRepo) GetCustomTopic(ctx context.Context, productID string) (topics []*productCustom.CustomTopic, err error)

func (ScriptRepo) GetTransFormFunc

func (t ScriptRepo) GetTransFormFunc(ctx context.Context, productID string) (productCustom.LoginAuthFunc, error)

Jump to

Keyboard shortcuts

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