datastore

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func PayloadKeyKey

func PayloadKeyKey(key structs.PayloadKey) ds.Key

Types

type DBInter added in v0.4.13

type DBInter interface {
	View(func(txn *badger.Txn) error) error
	NewTransaction(bool) *badger.Txn
}

type Datastore

type Datastore struct {
	TTLStorage
	DBInter
}

func NewDatastore

func NewDatastore(t TTLStorage, db DBInter) *Datastore

func (*Datastore) GetPayload

func (s *Datastore) GetPayload(ctx context.Context, fork structs.ForkVersion, key structs.PayloadKey) (payload structs.BlockAndTraceExtended, err error)

func (*Datastore) GetSlotRawPayload added in v0.4.13

func (s *Datastore) GetSlotRawPayload(ctx context.Context, key structs.PayloadKey) (output [][]byte, err error)

func (*Datastore) PutPayload

type TTLStorage

type TTLStorage interface {
	PutWithTTL(context.Context, ds.Key, []byte, time.Duration) error
	Get(context.Context, ds.Key) ([]byte, error)
}

Directories

Path Synopsis
evidence
transport
validator

Jump to

Keyboard shortcuts

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