redis

package
v0.0.0-...-7107d2d Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStorVersionMismatch = errors.New("error version mismatch")

ErrStorVersionMismatch is returned when the version of the checkpoint in the storage

Functions

This section is empty.

Types

type Storage

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

Storage is a redis storage implementation

func NewStorage

func NewStorage(
	ctx context.Context,
	addrs []string,
	password string,
	withTLS bool,
	rootCAs []string,
	dbPrefix string,
	channelName string,
) (*Storage, error)

NewStorage creates a new redis storage

func (*Storage) LoadCheckPoints

func (stor *Storage) LoadCheckPoints(ctx context.Context) (*stordto.ChCheckPoint, bool, error)

LoadCheckPoints loads the checkpoint from the storage

func (*Storage) RemoveAllData

func (stor *Storage) RemoveAllData(ctx context.Context) error

RemoveAllData removes all data from the storage

func (*Storage) SaveCheckPoints

func (stor *Storage) SaveCheckPoints(ctx context.Context, cp *stordto.ChCheckPoint) (*stordto.ChCheckPoint, error)

SaveCheckPoints saves the checkpoint to the storage

Jump to

Keyboard shortcuts

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