Documentation ¶
Index ¶
- Constants
- func FacetRangeLowerBound(facet Facet, lowShardNum byte) (RowKey, RowKey)
- func FacetShardRange(facet Facet, shard byte) (RowKey, RowKey)
- func ScanFacets(ctx context.Context, kvStore store.KVStore, facetCollectionPrefix byte, ...) error
- type AccountContractFactory
- func (f *AccountContractFactory) ActionFilter(act *pbcodec.ActionTrace) bool
- func (f *AccountContractFactory) Collection() byte
- func (f *AccountContractFactory) DecodeRow(key []byte) (Facet, byte, uint64)
- func (f *AccountContractFactory) NewCheckpointKey(shardNum byte) []byte
- func (f *AccountContractFactory) NewFacet(blk *bstream.Block, act *pbcodec.ActionTrace, account uint64) Facet
- type AccountContractKey
- type AccountFacet
- type AccountFactory
- func (f *AccountFactory) ActionFilter(act *pbcodec.ActionTrace) bool
- func (f *AccountFactory) Collection() byte
- func (f *AccountFactory) DecodeRow(key []byte) (Facet, byte, uint64)
- func (f *AccountFactory) NewCheckpointKey(shardNum byte) []byte
- func (f *AccountFactory) NewFacet(blk *bstream.Block, act *pbcodec.ActionTrace, account uint64) Facet
- type AccounthistMode
- type Facet
- type FacetFactory
- type FacetHandlerFunc
- type KeyEncoderFunc
- type RowKey
- type RowKeyDecoderFunc
- type SequenceData
Constants ¶
View Source
const (
DatabaseTimeout = 10 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
func FacetRangeLowerBound ¶
func ScanFacets ¶
func ScanFacets( ctx context.Context, kvStore store.KVStore, facetCollectionPrefix byte, decoder RowKeyDecoderFunc, facetFunc FacetHandlerFunc, ) error
Types ¶
type AccountContractFactory ¶
type AccountContractFactory struct { }
func (*AccountContractFactory) ActionFilter ¶
func (f *AccountContractFactory) ActionFilter(act *pbcodec.ActionTrace) bool
func (*AccountContractFactory) Collection ¶
func (f *AccountContractFactory) Collection() byte
func (*AccountContractFactory) DecodeRow ¶
func (f *AccountContractFactory) DecodeRow(key []byte) (Facet, byte, uint64)
func (*AccountContractFactory) NewCheckpointKey ¶
func (f *AccountContractFactory) NewCheckpointKey(shardNum byte) []byte
func (*AccountContractFactory) NewFacet ¶
func (f *AccountContractFactory) NewFacet(blk *bstream.Block, act *pbcodec.ActionTrace, account uint64) Facet
type AccountContractKey ¶
type AccountContractKey struct {
// contains filtered or unexported fields
}
func (*AccountContractKey) Account ¶
func (a *AccountContractKey) Account() uint64
func (*AccountContractKey) Bytes ¶
func (a *AccountContractKey) Bytes() []byte
func (*AccountContractKey) Row ¶
func (a *AccountContractKey) Row(shard byte, seqData uint64) RowKey
func (*AccountContractKey) String ¶
func (a *AccountContractKey) String() string
type AccountFacet ¶
type AccountFacet uint64
func (AccountFacet) Account ¶
func (a AccountFacet) Account() uint64
func (AccountFacet) Bytes ¶
func (a AccountFacet) Bytes() []byte
func (AccountFacet) String ¶
func (a AccountFacet) String() string
type AccountFactory ¶
type AccountFactory struct { }
func (*AccountFactory) ActionFilter ¶
func (f *AccountFactory) ActionFilter(act *pbcodec.ActionTrace) bool
func (*AccountFactory) Collection ¶
func (f *AccountFactory) Collection() byte
func (*AccountFactory) DecodeRow ¶
func (f *AccountFactory) DecodeRow(key []byte) (Facet, byte, uint64)
func (*AccountFactory) NewCheckpointKey ¶
func (f *AccountFactory) NewCheckpointKey(shardNum byte) []byte
func (*AccountFactory) NewFacet ¶
func (f *AccountFactory) NewFacet(blk *bstream.Block, act *pbcodec.ActionTrace, account uint64) Facet
type AccounthistMode ¶
type AccounthistMode string
const ( AccounthistModeAccount AccounthistMode = "account" AccounthistModeAccountContract AccounthistMode = "account-contract" )
type Facet ¶
type Facet interface { String() string Bytes() []byte Account() uint64 // TODO: should replace RowKey with store.Key Row(shard byte, seqData uint64) RowKey }
facet is the key prefix for virtual tables (i.e. 02:account or 03:account:contract)
type FacetFactory ¶
type FacetHandlerFunc ¶
type KeyEncoderFunc ¶
type SequenceData ¶
type SequenceData struct { CurrentOrdinal uint64 // while in memory, this value is the last written shard ordinal number that was assisgned LastGlobalSeq uint64 // taken from the top-most action stored in this shard, defines by the chain LastDeletedOrdinal uint64 // taken from the top-most action stored in this shard MaxEntries uint64 // initialized with the process' max entries per account, but can be reduced if some more recent shards covered this account }
func LatestShardSeqDataPerFacet ¶
func LatestShardSeqDataPerFacet(ctx context.Context, kvStore store.KVStore, key Facet, shardNum byte, decoder RowKeyDecoderFunc, unmarshalAction bool) (SequenceData, byte, error)
TODO: this should be under injector
func ShardSeqDataPerFacet ¶
func ShardSeqDataPerFacet(ctx context.Context, kvStore store.KVStore, key Facet, shardNum byte, decoder RowKeyDecoderFunc, unmarshalAction bool) (SequenceData, error)
TODO: this should be under injector
func (*SequenceData) MarshalLogObject ¶
func (sqd *SequenceData) MarshalLogObject(encoder zapcore.ObjectEncoder) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.