Documentation ¶
Overview ¶
Package redis provides interfaces to Redis.
Index ¶
- Constants
- type DeviceRegistry
- func (r *DeviceRegistry) BatchDelete(ctx context.Context, appIDs *ttnpb.ApplicationIdentifiers, deviceIDs []string) ([]*ttnpb.EndDeviceIdentifiers, error)
- func (r *DeviceRegistry) Get(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, paths []string) (*ttnpb.EndDevice, error)
- func (r *DeviceRegistry) Init(ctx context.Context) error
- func (r *DeviceRegistry) Range(ctx context.Context, paths []string, ...) error
- func (r *DeviceRegistry) Set(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, gets []string, ...) (*ttnpb.EndDevice, error)
- type LinkRegistry
- func (r *LinkRegistry) Get(ctx context.Context, ids *ttnpb.ApplicationIdentifiers, paths []string) (*ttnpb.ApplicationLink, error)
- func (r *LinkRegistry) Init(ctx context.Context) error
- func (r *LinkRegistry) Range(ctx context.Context, paths []string, ...) error
- func (r *LinkRegistry) Set(ctx context.Context, ids *ttnpb.ApplicationIdentifiers, gets []string, ...) (*ttnpb.ApplicationLink, error)
Constants ¶
View Source
const SchemaVersion = 1
SchemaVersion is the Application Server database schema version. Bump when a migration is required.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceRegistry ¶
DeviceRegistry is a Redis device registry.
func (*DeviceRegistry) BatchDelete ¶ added in v3.27.0
func (r *DeviceRegistry) BatchDelete( ctx context.Context, appIDs *ttnpb.ApplicationIdentifiers, deviceIDs []string, ) ([]*ttnpb.EndDeviceIdentifiers, error)
BatchDelete implements Registry.
func (*DeviceRegistry) Get ¶
func (r *DeviceRegistry) Get(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, paths []string) (*ttnpb.EndDevice, error)
Get returns the end device by its identifiers.
func (*DeviceRegistry) Init ¶ added in v3.15.2
func (r *DeviceRegistry) Init(ctx context.Context) error
Init initializes the DeviceRegistry.
type LinkRegistry ¶
LinkRegistry is a store for application links.
func (*LinkRegistry) Get ¶
func (r *LinkRegistry) Get(ctx context.Context, ids *ttnpb.ApplicationIdentifiers, paths []string) (*ttnpb.ApplicationLink, error)
Get returns the link by the application identifiers.
func (*LinkRegistry) Init ¶ added in v3.15.2
func (r *LinkRegistry) Init(ctx context.Context) error
Init initializes the LinkRegistry.
func (*LinkRegistry) Range ¶
func (r *LinkRegistry) Range(ctx context.Context, paths []string, f func(context.Context, *ttnpb.ApplicationIdentifiers, *ttnpb.ApplicationLink) bool) error
Range ranges the links and calls the callback function, until false is returned.
func (*LinkRegistry) Set ¶
func (r *LinkRegistry) Set(ctx context.Context, ids *ttnpb.ApplicationIdentifiers, gets []string, f func(*ttnpb.ApplicationLink) (*ttnpb.ApplicationLink, []string, error)) (*ttnpb.ApplicationLink, error)
Set creates, updates or deletes the link by the application identifiers.
Click to show internal directories.
Click to hide internal directories.