Documentation ¶
Index ¶
- func NewInstrumentedSystemStore(chainID tableland.ChainID, store sqlstore.SystemStore) (sqlstore.SystemStore, error)
- func NewInstrumentedUserStore(store sqlstore.UserStore) (sqlstore.UserStore, error)
- type InstrumentedSystemStore
- func (s *InstrumentedSystemStore) AreEVMEventsPersisted(ctx context.Context, txnHash common.Hash) (bool, error)
- func (s *InstrumentedSystemStore) Begin(ctx context.Context) (*sql.Tx, error)
- func (s *InstrumentedSystemStore) Close() error
- func (s *InstrumentedSystemStore) DeletePendingTxByHash(ctx context.Context, hash common.Hash) error
- func (s *InstrumentedSystemStore) GetACLOnTableByController(ctx context.Context, table tables.TableID, address string) (sqlstore.SystemACL, error)
- func (s *InstrumentedSystemStore) GetBlockExtraInfo(ctx context.Context, blockNumber int64) (tableland.EVMBlockInfo, error)
- func (s *InstrumentedSystemStore) GetBlocksMissingExtraInfo(ctx context.Context, fromHeight *int64) ([]int64, error)
- func (s *InstrumentedSystemStore) GetEVMEvents(ctx context.Context, txnHash common.Hash) ([]tableland.EVMEvent, error)
- func (s *InstrumentedSystemStore) GetID(ctx context.Context) (string, error)
- func (s *InstrumentedSystemStore) GetReceipt(ctx context.Context, txnHash string) (eventprocessor.Receipt, bool, error)
- func (s *InstrumentedSystemStore) GetSchemaByTableName(ctx context.Context, name string) (sqlstore.TableSchema, error)
- func (s *InstrumentedSystemStore) GetTable(ctx context.Context, id tables.TableID) (sqlstore.Table, error)
- func (s *InstrumentedSystemStore) GetTablesByController(ctx context.Context, controller string) ([]sqlstore.Table, error)
- func (s *InstrumentedSystemStore) GetTablesByStructure(ctx context.Context, structure string) ([]sqlstore.Table, error)
- func (s *InstrumentedSystemStore) InsertBlockExtraInfo(ctx context.Context, blockNumber int64, timestamp uint64) error
- func (s *InstrumentedSystemStore) InsertPendingTx(ctx context.Context, addr common.Address, nonce int64, hash common.Hash) error
- func (s *InstrumentedSystemStore) ListPendingTx(ctx context.Context, addr common.Address) ([]nonce.PendingTx, error)
- func (s *InstrumentedSystemStore) ReplacePendingTxByHash(ctx context.Context, oldHash common.Hash, newHash common.Hash) error
- func (s *InstrumentedSystemStore) SaveEVMEvents(ctx context.Context, events []tableland.EVMEvent) error
- func (s *InstrumentedSystemStore) WithTx(tx *sql.Tx) sqlstore.SystemStore
- type InstrumentedUserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstrumentedSystemStore ¶
func NewInstrumentedSystemStore(chainID tableland.ChainID, store sqlstore.SystemStore) (sqlstore.SystemStore, error)
NewInstrumentedSystemStore creates a new db pool and instantiate both the user and system stores.
Types ¶
type InstrumentedSystemStore ¶
type InstrumentedSystemStore struct {
// contains filtered or unexported fields
}
InstrumentedSystemStore implements a instrumented SQLStore.
func (*InstrumentedSystemStore) AreEVMEventsPersisted ¶
func (s *InstrumentedSystemStore) AreEVMEventsPersisted(ctx context.Context, txnHash common.Hash) (bool, error)
AreEVMEventsPersisted implements sqlstore.SystemStore.
func (*InstrumentedSystemStore) Close ¶
func (s *InstrumentedSystemStore) Close() error
Close closes the connection pool.
func (*InstrumentedSystemStore) DeletePendingTxByHash ¶
func (s *InstrumentedSystemStore) DeletePendingTxByHash(ctx context.Context, hash common.Hash) error
DeletePendingTxByHash deletes a pending tx.
func (*InstrumentedSystemStore) GetACLOnTableByController ¶
func (s *InstrumentedSystemStore) GetACLOnTableByController( ctx context.Context, table tables.TableID, address string, ) (sqlstore.SystemACL, error)
GetACLOnTableByController increments the counter.
func (*InstrumentedSystemStore) GetBlockExtraInfo ¶
func (s *InstrumentedSystemStore) GetBlockExtraInfo( ctx context.Context, blockNumber int64, ) (tableland.EVMBlockInfo, error)
GetBlockExtraInfo implements sqlstore.SystemStore.
func (*InstrumentedSystemStore) GetBlocksMissingExtraInfo ¶
func (s *InstrumentedSystemStore) GetBlocksMissingExtraInfo( ctx context.Context, fromHeight *int64, ) ([]int64, error)
GetBlocksMissingExtraInfo implements sqlstore.SystemStore.
func (*InstrumentedSystemStore) GetEVMEvents ¶
func (s *InstrumentedSystemStore) GetEVMEvents(ctx context.Context, txnHash common.Hash) ([]tableland.EVMEvent, error)
GetEVMEvents implements sqlstore.SystemStore.
func (*InstrumentedSystemStore) GetID ¶
func (s *InstrumentedSystemStore) GetID(ctx context.Context) (string, error)
GetID returns node identifier.
func (*InstrumentedSystemStore) GetReceipt ¶
func (s *InstrumentedSystemStore) GetReceipt( ctx context.Context, txnHash string, ) (eventprocessor.Receipt, bool, error)
GetReceipt returns the receipt of a processed event by txn hash.
func (*InstrumentedSystemStore) GetSchemaByTableName ¶
func (s *InstrumentedSystemStore) GetSchemaByTableName(ctx context.Context, name string) (sqlstore.TableSchema, error)
GetSchemaByTableName get the schema of a table by its name.
func (*InstrumentedSystemStore) GetTable ¶
func (s *InstrumentedSystemStore) GetTable(ctx context.Context, id tables.TableID) (sqlstore.Table, error)
GetTable fetchs a table from its UUID.
func (*InstrumentedSystemStore) GetTablesByController ¶
func (s *InstrumentedSystemStore) GetTablesByController( ctx context.Context, controller string, ) ([]sqlstore.Table, error)
GetTablesByController fetchs a table from controller address.
func (*InstrumentedSystemStore) GetTablesByStructure ¶
func (s *InstrumentedSystemStore) GetTablesByStructure( ctx context.Context, structure string, ) ([]sqlstore.Table, error)
GetTablesByStructure gets all tables with a particular structure hash.
func (*InstrumentedSystemStore) InsertBlockExtraInfo ¶
func (s *InstrumentedSystemStore) InsertBlockExtraInfo(ctx context.Context, blockNumber int64, timestamp uint64) error
InsertBlockExtraInfo implements sqlstore.SystemStore.
func (*InstrumentedSystemStore) InsertPendingTx ¶
func (s *InstrumentedSystemStore) InsertPendingTx( ctx context.Context, addr common.Address, nonce int64, hash common.Hash, ) error
InsertPendingTx insert a new pending tx.
func (*InstrumentedSystemStore) ListPendingTx ¶
func (s *InstrumentedSystemStore) ListPendingTx( ctx context.Context, addr common.Address, ) ([]nonce.PendingTx, error)
ListPendingTx lists all pendings txs.
func (*InstrumentedSystemStore) ReplacePendingTxByHash ¶
func (s *InstrumentedSystemStore) ReplacePendingTxByHash( ctx context.Context, oldHash common.Hash, newHash common.Hash, ) error
ReplacePendingTxByHash replaces a pending txn hash and bumps the counter on how many times this happened.
func (*InstrumentedSystemStore) SaveEVMEvents ¶
func (s *InstrumentedSystemStore) SaveEVMEvents(ctx context.Context, events []tableland.EVMEvent) error
SaveEVMEvents implements sqlstore.SystemStore.
func (*InstrumentedSystemStore) WithTx ¶
func (s *InstrumentedSystemStore) WithTx(tx *sql.Tx) sqlstore.SystemStore
WithTx returns a copy of the current InstrumentedSQLStore with a tx attached.
type InstrumentedUserStore ¶
type InstrumentedUserStore struct {
// contains filtered or unexported fields
}
InstrumentedUserStore implements a instrumented SQLStore.
func (*InstrumentedUserStore) Close ¶
func (s *InstrumentedUserStore) Close() error
Close closes the store.
Directories ¶
Path | Synopsis |
---|---|
migrations
Package migrations generated by go-bindata.// sources: migrations/001_init.down.sql migrations/001_init.up.sql migrations/002_receipterroridx.down.sql migrations/002_receipterroridx.up.sql migrations/003_evm_events.down.sql migrations/003_evm_events.up.sql migrations/004_system_id.down.sql migrations/004_system_id.up.sql
|
Package migrations generated by go-bindata.// sources: migrations/001_init.down.sql migrations/001_init.up.sql migrations/002_receipterroridx.down.sql migrations/002_receipterroridx.up.sql migrations/003_evm_events.down.sql migrations/003_evm_events.up.sql migrations/004_system_id.down.sql migrations/004_system_id.up.sql |