redis

package
v3.29.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package redis provides interfaces to Redis.

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 DeviceRegistry

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

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

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