store

package
v0.0.0-...-8cd5d0d Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoSeedFound

func IsNoSeedFound(err error) bool

Types

type Memory

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

func (*Memory) DeleteSeed

func (m *Memory) DeleteSeed(ctx context.Context, name string) error

func (*Memory) PutSeed

func (m *Memory) PutSeed(ctx context.Context, name, target string) error

func (*Memory) Seed

func (m *Memory) Seed(ctx context.Context, name string) (string, error)

type Redis

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

func (*Redis) DeleteSeed

func (r *Redis) DeleteSeed(ctx context.Context, name string) error

func (*Redis) PutSeed

func (r *Redis) PutSeed(ctx context.Context, name, target string) error

func (*Redis) Seed

func (r *Redis) Seed(ctx context.Context, name string) (string, error)

type Store

type Store interface {
	Seed(ctx context.Context, name string) (string, error)
	PutSeed(ctx context.Context, name, target string) error
	DeleteSeed(ctx context.Context, name string) error
}

func NewMemory

func NewMemory() Store

func NewRedis

func NewRedis(rcli *redis.Client, prefix string) Store

Jump to

Keyboard shortcuts

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