Documentation ¶
Index ¶
- type Engine
- func (e *Engine) Done() <-chan struct{}
- func (e *Engine) ExecuteScriptAtBlockID(ctx context.Context, script []byte, arguments [][]byte, ...) ([]byte, error)
- func (e *Engine) GetAccount(ctx context.Context, addr flow.Address, blockID flow.Identifier) (*flow.Account, error)
- func (e *Engine) OnCollection(originID flow.Identifier, entity flow.Entity)
- func (e *Engine) Process(originID flow.Identifier, event interface{}) error
- func (e *Engine) ProcessLocal(event interface{}) error
- func (e *Engine) Ready() <-chan struct{}
- func (e *Engine) StartSync(ctx context.Context, firstKnown *entity.ExecutableBlock)
- func (e *Engine) Submit(originID flow.Identifier, event interface{})
- func (e *Engine) SubmitLocal(event interface{})
- func (e *Engine) Wait()
- type IngestRPC
- type Mempool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
An Engine receives and saves incoming blocks.
func New ¶
func New( logger zerolog.Logger, net module.Network, me module.Local, request module.Requester, state protocol.State, blocks storage.Blocks, payloads storage.Payloads, collections storage.Collections, events storage.Events, transactionResults storage.TransactionResults, executionEngine computation.ComputationManager, providerEngine provider.ProviderEngine, blockSync module.BlockRequester, execState state.ExecutionState, syncThreshold uint64, syncFilter flow.IdentityFilter, syncByBlocks bool, metrics module.ExecutionMetrics, tracer module.Tracer, extLog bool, ) (*Engine, error)
func (*Engine) Done ¶
func (e *Engine) Done() <-chan struct{}
Done returns a channel that will close when the engine has successfully stopped.
func (*Engine) ExecuteScriptAtBlockID ¶
func (*Engine) GetAccount ¶
func (*Engine) OnCollection ¶
func (e *Engine) OnCollection(originID flow.Identifier, entity flow.Entity)
func (*Engine) Process ¶
func (e *Engine) Process(originID flow.Identifier, event interface{}) error
func (*Engine) ProcessLocal ¶
func (*Engine) Ready ¶
func (e *Engine) Ready() <-chan struct{}
Ready returns a channel that will close when the engine has successfully started.
func (*Engine) StartSync ¶
func (e *Engine) StartSync(ctx context.Context, firstKnown *entity.ExecutableBlock)
func (*Engine) Submit ¶
func (e *Engine) Submit(originID flow.Identifier, event interface{})
type IngestRPC ¶
type IngestRPC interface { // ExecuteScriptAtBlockID executes a script at the given Block id ExecuteScriptAtBlockID(ctx context.Context, script []byte, arguments [][]byte, blockID flow.Identifier) ([]byte, error) // GetAccount returns the Account details at the given Block id GetAccount(ctx context.Context, address flow.Address, blockID flow.Identifier) (*flow.Account, error) }
IngestRPC represents the RPC calls that the execution ingest engine exposes to support the Access Node API calls
type Mempool ¶
type Mempool struct { BlockByCollection *stdmap.BlockByCollections ExecutionQueue *stdmap.Queues OrphanQueue *stdmap.Queues SyncQueues *stdmap.Queues }
func (*Mempool) Run ¶
func (m *Mempool) Run(f func(blockByCollection *stdmap.BlockByCollectionBackdata, executionQueue *stdmap.QueuesBackdata, orphanQueue *stdmap.QueuesBackdata) error) error
Click to show internal directories.
Click to hide internal directories.