storage

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Combine

func Combine(ops ...func(*badger.Txn) error) func(*badger.Txn) error

Combine goes through the provided operations until one of them fails. When the first one fails, the related error is returned.

func Fallback

func Fallback(ops ...func(*badger.Txn) error) func(*badger.Txn) error

Fallback goes through the provided operations until one of them succeeds. If all of them fail, a multi-error with all errors is returned.

Types

type Library

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

func New

func New(codec dps.Codec) *Library

func (*Library) IndexCollectionsForHeight

func (l *Library) IndexCollectionsForHeight(height uint64, collIDs []flow.Identifier) func(*badger.Txn) error

func (*Library) IndexHeightForBlock

func (l *Library) IndexHeightForBlock(blockID flow.Identifier, height uint64) func(*badger.Txn) error

func (*Library) IndexHeightForTransaction added in v1.1.0

func (l *Library) IndexHeightForTransaction(txID flow.Identifier, height uint64) func(*badger.Txn) error

func (*Library) IndexSealsForHeight added in v1.1.0

func (l *Library) IndexSealsForHeight(height uint64, sealIDs []flow.Identifier) func(*badger.Txn) error

func (*Library) IndexTransactionsForCollection

func (l *Library) IndexTransactionsForCollection(collID flow.Identifier, txIDs []flow.Identifier) func(*badger.Txn) error

func (*Library) IndexTransactionsForHeight

func (l *Library) IndexTransactionsForHeight(height uint64, txIDs []flow.Identifier) func(*badger.Txn) error

func (*Library) LookupCollectionsForHeight

func (l *Library) LookupCollectionsForHeight(height uint64, collIDs *[]flow.Identifier) func(*badger.Txn) error

func (*Library) LookupHeightForBlock

func (l *Library) LookupHeightForBlock(blockID flow.Identifier, height *uint64) func(*badger.Txn) error

func (*Library) LookupHeightForTransaction added in v1.1.0

func (l *Library) LookupHeightForTransaction(txID flow.Identifier, height *uint64) func(*badger.Txn) error

func (*Library) LookupSealsForHeight added in v1.1.0

func (l *Library) LookupSealsForHeight(height uint64, sealIDs *[]flow.Identifier) func(*badger.Txn) error

func (*Library) LookupTransactionsForCollection

func (l *Library) LookupTransactionsForCollection(collID flow.Identifier, txIDs *[]flow.Identifier) func(*badger.Txn) error

func (*Library) LookupTransactionsForHeight

func (l *Library) LookupTransactionsForHeight(height uint64, txIDs *[]flow.Identifier) func(*badger.Txn) error

func (*Library) RetrieveCollection

func (l *Library) RetrieveCollection(collectionID flow.Identifier, collection *flow.LightCollection) func(*badger.Txn) error

func (*Library) RetrieveCommit

func (l *Library) RetrieveCommit(height uint64, commit *flow.StateCommitment) func(*badger.Txn) error

func (*Library) RetrieveEvents

func (l *Library) RetrieveEvents(height uint64, types []flow.EventType, events *[]flow.Event) func(*badger.Txn) error

func (*Library) RetrieveFirst

func (l *Library) RetrieveFirst(height *uint64) func(*badger.Txn) error

func (*Library) RetrieveGuarantee added in v1.1.0

func (l *Library) RetrieveGuarantee(collectionID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error

func (*Library) RetrieveHeader

func (l *Library) RetrieveHeader(height uint64, header *flow.Header) func(*badger.Txn) error

func (*Library) RetrieveLast

func (l *Library) RetrieveLast(height *uint64) func(*badger.Txn) error

func (*Library) RetrievePayload

func (l *Library) RetrievePayload(height uint64, path ledger.Path, payload *ledger.Payload) func(*badger.Txn) error

func (*Library) RetrieveResult added in v1.1.0

func (l *Library) RetrieveResult(txID flow.Identifier, result *flow.TransactionResult) func(*badger.Txn) error

func (*Library) RetrieveSeal added in v1.1.0

func (l *Library) RetrieveSeal(sealID flow.Identifier, seal *flow.Seal) func(*badger.Txn) error

func (*Library) RetrieveTransaction

func (l *Library) RetrieveTransaction(transactionID flow.Identifier, transaction *flow.TransactionBody) func(*badger.Txn) error

func (*Library) SaveCollection

func (l *Library) SaveCollection(collection *flow.LightCollection) func(*badger.Txn) error

func (*Library) SaveCommit

func (l *Library) SaveCommit(height uint64, commit flow.StateCommitment) func(*badger.Txn) error

func (*Library) SaveEvents

func (l *Library) SaveEvents(height uint64, typ flow.EventType, events []flow.Event) func(*badger.Txn) error

func (*Library) SaveFirst

func (l *Library) SaveFirst(height uint64) func(*badger.Txn) error

func (*Library) SaveGuarantee added in v1.1.0

func (l *Library) SaveGuarantee(guarantee *flow.CollectionGuarantee) func(*badger.Txn) error

func (*Library) SaveHeader

func (l *Library) SaveHeader(height uint64, header *flow.Header) func(*badger.Txn) error

func (*Library) SaveLast

func (l *Library) SaveLast(height uint64) func(*badger.Txn) error

func (*Library) SavePayload

func (l *Library) SavePayload(height uint64, path ledger.Path, payload *ledger.Payload) func(*badger.Txn) error

func (*Library) SaveResult added in v1.1.0

func (l *Library) SaveResult(result *flow.TransactionResult) func(*badger.Txn) error

func (*Library) SaveSeal added in v1.1.0

func (l *Library) SaveSeal(seal *flow.Seal) func(*badger.Txn) error

func (*Library) SaveTransaction

func (l *Library) SaveTransaction(transaction *flow.TransactionBody) func(*badger.Txn) error

Jump to

Keyboard shortcuts

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