fsstore

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a filesystem backed store. It is not thread-safe.

func New

func New(dir string, log *slog.Logger) *Store

New returns a new Store.

func (*Store) Clear

func (s *Store) Clear()

Clear clears all values from store.

func (*Store) Get

func (s *Store) Get(key string) ([]byte, bool)

Get returns the value for the given key.

func (*Store) GetAll

func (s *Store) GetAll() [][]byte

GetAll returns all values in the store.

func (*Store) Set

func (s *Store) Set(key string, value []byte)

Set sets the value for the given key.

Jump to

Keyboard shortcuts

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