Documentation ¶
Index ¶
- Constants
- type DB
- func (db *DB) BlockIDAfter(ctx context.Context, start time.Time, inclusive bool) (id string, foundTime time.Time, err error)
- func (db *DB) BlockIDAt(ctx context.Context, start time.Time) (id string, err error)
- func (db *DB) BlockIDBefore(ctx context.Context, start time.Time, inclusive bool) (id string, foundTime time.Time, err error)
- func (db *DB) Close() error
- func (db *DB) Dump()
- func (db *DB) Flush(ctx context.Context) error
- func (db *DB) GetAccount(ctx context.Context, accountName string) (*pbcodec.AccountCreationRef, error)
- func (db *DB) GetBlock(ctx context.Context, id string) (blk *pbcodec.BlockWithRefs, err error)
- func (db *DB) GetBlockByNum(ctx context.Context, num uint32) (out []*pbcodec.BlockWithRefs, err error)
- func (db *DB) GetClosestIrreversibleIDAtBlockNum(ctx context.Context, num uint32) (ref bstream.BlockRef, err error)
- func (db *DB) GetIrreversibleIDAtBlockID(ctx context.Context, ID string) (ref bstream.BlockRef, err error)
- func (db *DB) GetLastWrittenBlockID(ctx context.Context) (blockID string, err error)
- func (db *DB) GetLastWrittenIrreversibleBlockRef(ctx context.Context) (ref bstream.BlockRef, err error)
- func (db *DB) GetTransactionEvents(ctx context.Context, idPrefix string) (out []*pbcodec.TransactionEvent, err error)
- func (db *DB) GetTransactionEventsBatch(ctx context.Context, idPrefixes []string) (out [][]*pbcodec.TransactionEvent, err error)
- func (db *DB) GetTransactionTraces(ctx context.Context, idPrefix string) (out []*pbcodec.TransactionEvent, err error)
- func (db *DB) GetTransactionTracesBatch(ctx context.Context, idPrefixes []string) (out [][]*pbcodec.TransactionEvent, err error)
- func (db *DB) ListAccountNames(ctx context.Context) (out []string, err error)
- func (db *DB) ListBlocks(ctx context.Context, highBlockNum uint32, limit int) (out []*pbcodec.BlockWithRefs, err error)
- func (db *DB) ListSiblingBlocks(ctx context.Context, blockNum uint32, spread uint32) (out []*pbcodec.BlockWithRefs, err error)
- func (db *DB) PutBlock(ctx context.Context, blk *pbcodec.Block) error
- func (db *DB) SetLogger(logger *zap.Logger) error
- func (db *DB) SetPurgeableStore(ttl, purgeInterval uint64) error
- func (db *DB) SetWriterChainID(chainID []byte)
- func (db *DB) UpdateNowIrreversibleBlock(ctx context.Context, blk *pbcodec.Block) error
- type Keyer
- func (Keyer) EndOfAccountTable() []byte
- func (Keyer) EndOfBlocksTable() []byte
- func (Keyer) EndOfDtrxsTable() []byte
- func (Keyer) EndOfImplicitTrxsTable() []byte
- func (Keyer) EndOfIrrBlockTable() []byte
- func (Keyer) EndOfTimelineIndex(fwd bool) []byte
- func (Keyer) EndOfTrxTracesTable() []byte
- func (Keyer) EndOfTrxsTable() []byte
- func (Keyer) PackAccountKey(accountName string) []byte
- func (Keyer) PackBlockNumPrefix(blockNum uint32) []byte
- func (Keyer) PackBlocksKey(blockID string) []byte
- func (k Keyer) PackDtrxsKeyCancelled(trxID, blockID string) []byte
- func (k Keyer) PackDtrxsKeyCreated(trxID, blockID string) []byte
- func (k Keyer) PackDtrxsKeyFailed(trxID, blockID string) []byte
- func (k Keyer) PackDtrxsPrefix(trxID string) []byte
- func (k Keyer) PackImplicitTrxsKey(trxID, blockID string) []byte
- func (k Keyer) PackImplicitTrxsPrefix(trxID string) []byte
- func (Keyer) PackIrrBlockNumPrefix(blockNum uint32) []byte
- func (Keyer) PackIrrBlocksKey(blockID string) []byte
- func (Keyer) PackTimelineKey(fwd bool, blockTime time.Time, blockID string) []byte
- func (k Keyer) PackTimelinePrefix(fwd bool, blockTime time.Time) []byte
- func (k Keyer) PackTrxTracesKey(trxID, blockID string) []byte
- func (k Keyer) PackTrxTracesPrefix(trxID string) []byte
- func (k Keyer) PackTrxsKey(trxID string, blockID string) []byte
- func (k Keyer) PackTrxsPrefix(trxID string) []byte
- func (Keyer) StartOfAccountTable() []byte
- func (Keyer) StartOfBlocksTable() []byte
- func (Keyer) StartOfDtrxsTable() []byte
- func (Keyer) StartOfImplicitTrxsTable() []byte
- func (Keyer) StartOfIrrBlockTable() []byte
- func (Keyer) StartOfTimelineIndex(fwd bool) []byte
- func (Keyer) StartOfTrxTracesTable() []byte
- func (Keyer) StartOfTrxsTable() []byte
- func (Keyer) UnpackAccountKey(key []byte) string
- func (Keyer) UnpackBlocksKey(key []byte) (blockID string)
- func (k Keyer) UnpackDtrxsKey(key []byte) (trxID, blockID string)
- func (k Keyer) UnpackImplicitTrxsKey(key []byte) (trxID, blockID string)
- func (Keyer) UnpackIrrBlocksKey(key []byte) (blockID string)
- func (Keyer) UnpackTimelineKey(fwd bool, key []byte) (blockTime time.Time, blockID string)
- func (k Keyer) UnpackTrxTracesKey(key []byte) (trxID, blockID string)
- func (k Keyer) UnpackTrxsKey(key []byte) (trxID, blockID string)
- type TrxEventType
Constants ¶
const ( TblPrefixTrxs = 0x00 TblPrefixBlocks = 0x01 TblPrefixIrrBlks = 0x02 TblPrefixImplTrxs = 0x03 TblPrefixDtrxs = 0x04 TblPrefixTrxTraces = 0x05 TblPrefixAccts = 0x06 TblTTL = 0x10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
"read"'s default is "*" "write"'s default is "*" Dsn examples dgraphql in eos mainnet core: store:/// by default: read=*&write=* dgraphql in curv: store://mainnet/?read=blk,trx&write=none store://curv/?read=trx&write=none dgraphql in curv: store://mainnet/?read=blk&write=none store://curv/?read=trx&write=none trxdb-loader for mainnet core: store:///?write=blk /* read="*" */ trxdb-loader for curv: store:///?write=trx /* only purpose: NOT WRITE blk */ single laptop-style deployment: store:/// by default: read=*&write=* single laptop-style deployment, secure: store:///?read=blk,trx&write=none
func (*DB) BlockIDAfter ¶
func (*DB) BlockIDBefore ¶
func (*DB) GetAccount ¶
func (*DB) GetBlockByNum ¶
func (*DB) GetClosestIrreversibleIDAtBlockNum ¶
func (*DB) GetIrreversibleIDAtBlockID ¶
func (*DB) GetLastWrittenBlockID ¶
func (*DB) GetLastWrittenIrreversibleBlockRef ¶
func (db *DB) GetLastWrittenIrreversibleBlockRef(ctx context.Context) (ref bstream.BlockRef, err error)
This is in the writer interface, because it is required to start the the pipeline.
func (*DB) GetTransactionEvents ¶
func (*DB) GetTransactionEventsBatch ¶
func (*DB) GetTransactionTraces ¶
func (*DB) GetTransactionTracesBatch ¶
func (*DB) ListAccountNames ¶
func (*DB) ListBlocks ¶
func (*DB) ListSiblingBlocks ¶
func (*DB) SetPurgeableStore ¶
func (*DB) SetWriterChainID ¶
type Keyer ¶
type Keyer struct{}
var Keys Keyer
func (Keyer) EndOfAccountTable ¶
func (Keyer) EndOfBlocksTable ¶
func (Keyer) EndOfDtrxsTable ¶
func (Keyer) EndOfImplicitTrxsTable ¶
func (Keyer) EndOfIrrBlockTable ¶
func (Keyer) EndOfTimelineIndex ¶
func (Keyer) EndOfTrxTracesTable ¶
func (Keyer) EndOfTrxsTable ¶
func (Keyer) PackAccountKey ¶
func (Keyer) PackBlockNumPrefix ¶
func (Keyer) PackBlocksKey ¶
func (Keyer) PackDtrxsKeyCancelled ¶
func (Keyer) PackDtrxsKeyCreated ¶
Dtrx virt table
func (Keyer) PackDtrxsKeyFailed ¶
func (Keyer) PackDtrxsPrefix ¶
func (Keyer) PackImplicitTrxsKey ¶
func (Keyer) PackImplicitTrxsPrefix ¶
func (Keyer) PackIrrBlockNumPrefix ¶
func (Keyer) PackIrrBlocksKey ¶
func (Keyer) PackTimelineKey ¶
func (Keyer) PackTimelinePrefix ¶
func (Keyer) PackTrxTracesKey ¶
TrxTrace virt table
func (Keyer) PackTrxTracesPrefix ¶
func (Keyer) PackTrxsPrefix ¶
func (Keyer) StartOfAccountTable ¶
func (Keyer) StartOfBlocksTable ¶
func (Keyer) StartOfDtrxsTable ¶
func (Keyer) StartOfImplicitTrxsTable ¶
func (Keyer) StartOfIrrBlockTable ¶
func (Keyer) StartOfTimelineIndex ¶
func (Keyer) StartOfTrxTracesTable ¶
func (Keyer) StartOfTrxsTable ¶
func (Keyer) UnpackAccountKey ¶
func (Keyer) UnpackBlocksKey ¶
func (Keyer) UnpackDtrxsKey ¶
func (Keyer) UnpackImplicitTrxsKey ¶
func (Keyer) UnpackIrrBlocksKey ¶
func (Keyer) UnpackTimelineKey ¶
func (Keyer) UnpackTrxTracesKey ¶
func (Keyer) UnpackTrxsKey ¶
type TrxEventType ¶
type TrxEventType int
const ( TrxAdditionEvent TrxEventType = iota + 1 TrxExecutionEvent ImplicitTrxEvent DtrxEvent )