disk

package
v0.0.0-...-c9bb2cb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Now func() time.Time
	// contains filtered or unexported fields
}

func New

func New(path string, mode os.FileMode) (*Storage, error)

func (*Storage) Delete

func (s *Storage) Delete(_ context.Context, keyspace, key string) error

func (*Storage) Get

func (s *Storage) Get(_ context.Context, keyspace, key string, into proto.Message) (version int64, err error)

func (*Storage) List

func (s *Storage) List(_ context.Context, keyspace string) ([]string, error)

func (*Storage) Put

func (s *Storage) Put(ctx context.Context, keyspace, key string, version int64, obj proto.Message) (newVersion int64, err error)

func (*Storage) PutWithExpiry

func (s *Storage) PutWithExpiry(ctx context.Context, keyspace, key string, version int64, obj proto.Message, expires time.Time) (newVersion int64, err error)

Jump to

Keyboard shortcuts

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