redis

package
v3.21.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 ApplicationUplinkRegistry added in v3.12.2

type ApplicationUplinkRegistry struct {
	Redis *ttnredis.Client
	Limit int64
}

ApplicationUplinkRegistry is a store for uplink messages.

func (*ApplicationUplinkRegistry) Clear added in v3.12.2

Clear empties the application uplink storage by the end device identifiers.

func (*ApplicationUplinkRegistry) Push added in v3.12.2

Push pushes the provided uplink message to the storage.

func (*ApplicationUplinkRegistry) Range added in v3.12.2

Range ranges the uplink messagess and calls the callback function, until false is returned.

type DeviceRegistry

type DeviceRegistry struct {
	Redis   *ttnredis.Client
	LockTTL time.Duration
}

DeviceRegistry is a Redis device registry.

func (*DeviceRegistry) Get

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.

func (*DeviceRegistry) Range added in v3.15.2

Range ranges over the end devices and calls the callback function, until false is returned.

func (*DeviceRegistry) Set

Set creates, updates or deletes the end device by its identifiers.

type LinkRegistry

type LinkRegistry struct {
	Redis   *ttnredis.Client
	LockTTL time.Duration
}

LinkRegistry is a store for application links.

func (*LinkRegistry) Get

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

Range ranges the links and calls the callback function, until false is returned.

func (*LinkRegistry) Set

Set creates, updates or deletes the link by the application identifiers.

Jump to

Keyboard shortcuts

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