executor

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package executor is the executor agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainExecutor added in v0.0.49

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

ChainExecutor is a struct that contains the necessary information for each chain level executor.

type Executor

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

Executor is the executor agent.

func NewExecutor

func NewExecutor(config config.Config, executorDB db.ExecutorDB, scribeClient client.ScribeClient) (*Executor, error)

NewExecutor creates a new executor agent.

func (Executor) BuildTreeFromDB added in v0.0.49

func (e Executor) BuildTreeFromDB(ctx context.Context, chainID uint32, destination uint32) error

BuildTreeFromDB builds the merkle tree from the database's messages. This function will reset the current merkle tree and replace it with the one built from the database. This function should also not be called while Start or Listen are running.

func (Executor) GetRoot added in v0.0.45

func (e Executor) GetRoot(ctx context.Context, nonce uint32, chainID uint32, destination uint32) ([32]byte, error)

GetRoot returns the merkle root at the given nonce.

func (Executor) Listen added in v0.0.45

func (e Executor) Listen(ctx context.Context, chainID uint32) error

Listen listens to the log channel and processes the logs. Requires Start to be called first.

func (Executor) Start

func (e Executor) Start(ctx context.Context) error

Start starts the executor agent. This uses gRPC to process the logs.

func (Executor) Stop

func (e Executor) Stop(chainID uint32)

Stop stops the executor agent.

Directories

Path Synopsis
Package config defines the config for the Executor.
Package config defines the config for the Executor.
db
Package db provides a database interface for the executor.
Package db provides a database interface for the executor.
datastore/sql
Package sql provides a datastore implementation for the executor.
Package sql provides a datastore implementation for the executor.
datastore/sql/base
Package base contains the base sql implementation
Package base contains the base sql implementation
datastore/sql/mysql
Package mysql implements the mysql package
Package mysql implements the mysql package
datastore/sql/sqlite
Package sqlite implements the sqlite package
Package sqlite implements the sqlite package
Package types contains the database types for the Executor.
Package types contains the database types for the Executor.

Jump to

Keyboard shortcuts

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