badgerStore

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerStore

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

func NewBadgerStore

func NewBadgerStore(badgerFolder string, key []byte, cacheSize int64) (*BadgerStore, error)

func (*BadgerStore) Close

func (b *BadgerStore) Close() error

func (*BadgerStore) Delete

func (b *BadgerStore) Delete(ctx context.Context, tokenID string) error

func (*BadgerStore) Get

func (b *BadgerStore) Get(ctx context.Context, tokenID string) ([]byte, error)

returns nil, nil if not found

func (*BadgerStore) Put

func (b *BadgerStore) Put(_ context.Context, tokenID string, token []byte, ttl time.Duration) error

Jump to

Keyboard shortcuts

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