redisdb

package
v0.0.0-...-ea65d50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

redisdb provides an implementation of the ../db.DB interface backed by a Redis database. It can run on a cluster.

It uses the following data model:

device:{<identityKey>}:<deviceId> - a Map containing the registration information for a given device
identity->devices:{<identityKey>}     - a Set of all of an identity's registered devices
otpk:{<identityKey>}:<deviceId>   - a List of available one-time pre keys for the given device, used as a queue with LPUSH and LPOP.

The {} braces around identityKey indicate that the identityKey is used as the sharding key when running on a Redis cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client *redis.Client) (db.DB, error)

New constructs a new Redis-backed DB that connects with the given client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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