token

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Get() (bson.Raw, error)
	Set(bson.Raw) error
	Close()
}

Manager interface can be used to customize how to get and update latest resume token.

func NewRedisManager

func NewRedisManager(uri string, key string) (Manager, error)

type RedisManager

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

RedisManager store the latest resume token into redis.

The token is stored as a string in extended json format. For details about extended json, see https://docs.mongodb.com/manual/reference/mongodb-extended-json/.

func (*RedisManager) Close

func (r *RedisManager) Close()

func (*RedisManager) Get

func (r *RedisManager) Get() (bson.Raw, error)

func (*RedisManager) Set

func (r *RedisManager) Set(b bson.Raw) error

Jump to

Keyboard shortcuts

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