memdb

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0, MIT Imports: 7 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 represents access to the in-memory storage for beacon management.

func NewStore

func NewStore(bufferSize int) *Store

NewStore returns a new store that provides the CRUD based API needed for supporting drand serialization.

func (*Store) Close

func (s *Store) Close(_ context.Context) error

Close is a noop

func (*Store) Cursor

func (s *Store) Cursor(ctx context.Context, f func(context.Context, chain.Cursor) error) error

func (*Store) Del

func (s *Store) Del(_ context.Context, round uint64) error

func (*Store) Get

func (s *Store) Get(_ context.Context, round uint64) (*chain.Beacon, error)

func (*Store) Last

func (s *Store) Last(_ context.Context) (*chain.Beacon, error)

func (*Store) Len

func (s *Store) Len(_ context.Context) (int, error)

func (*Store) Put

func (s *Store) Put(_ context.Context, beacon *chain.Beacon) error

func (*Store) SaveTo

func (s *Store) SaveTo(ctx context.Context, w io.Writer) error

Jump to

Keyboard shortcuts

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