execution

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Hash   common.Hash
	Number uint64
	// contains filtered or unexported fields
}

func (*Block) AwaitBlock

func (block *Block) AwaitBlock(ctx context.Context, timeout time.Duration) *types.Block

func (*Block) EnsureBlock

func (block *Block) EnsureBlock(loadBlock func() (*types.Block, error)) (bool, error)

func (*Block) GetBlock

func (block *Block) GetBlock() *types.Block

func (*Block) GetParentHash

func (block *Block) GetParentHash() *common.Hash

func (*Block) GetSeenBy

func (block *Block) GetSeenBy() []*Client

func (*Block) SetSeenBy

func (block *Block) SetSeenBy(client *Client)

type ChainState

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

func (*ChainState) GetChainID

func (cache *ChainState) GetChainID() *big.Int

func (*ChainState) GetSpecs

func (cache *ChainState) GetSpecs() *rpc.ChainSpec

func (*ChainState) SetClientSpecs

func (cache *ChainState) SetClientSpecs(specs *rpc.ChainSpec) error

type Client

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

func (*Client) DidFetchPeers

func (client *Client) DidFetchPeers() bool

func (*Client) GetClientType

func (client *Client) GetClientType() ClientType

func (*Client) GetEndpointConfig

func (client *Client) GetEndpointConfig() *ClientConfig

func (*Client) GetIndex

func (client *Client) GetIndex() uint16

func (*Client) GetLastClientError

func (client *Client) GetLastClientError() error

func (*Client) GetLastEventTime

func (client *Client) GetLastEventTime() time.Time

func (*Client) GetLastHead

func (client *Client) GetLastHead() (uint64, common.Hash)

func (*Client) GetName

func (client *Client) GetName() string

func (*Client) GetNodeInfo

func (client *Client) GetNodeInfo() *p2p.NodeInfo

func (*Client) GetNodePeers

func (client *Client) GetNodePeers() []*p2p.PeerInfo

func (*Client) GetRPCClient

func (client *Client) GetRPCClient() *rpc.ExecutionClient

func (*Client) GetStatus

func (client *Client) GetStatus() ClientStatus

func (*Client) GetVersion

func (client *Client) GetVersion() string

type ClientConfig

type ClientConfig struct {
	URL       string
	Name      string
	Headers   map[string]string
	SshConfig *sshtunnel.SshConfig
}

type ClientStatus

type ClientStatus uint8
var (
	ClientStatusOnline        ClientStatus = 1
	ClientStatusOffline       ClientStatus = 2
	ClientStatusSynchronizing ClientStatus = 3
)

func (ClientStatus) String

func (s ClientStatus) String() string

type ClientType

type ClientType int8
var (
	AnyClient        ClientType
	UnknownClient    ClientType = -1
	BesuClient       ClientType = 1
	ErigonClient     ClientType = 2
	EthjsClient      ClientType = 3
	GethClient       ClientType = 4
	NethermindClient ClientType = 5
	RethClient       ClientType = 6
)

func ParseClientType

func ParseClientType(name string) ClientType

func (ClientType) String

func (clientType ClientType) String() string

type Dispatcher

type Dispatcher[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*Dispatcher[T]) Fire

func (d *Dispatcher[T]) Fire(data T)

func (*Dispatcher[T]) Subscribe

func (d *Dispatcher[T]) Subscribe(capacity int) *Subscription[T]

func (*Dispatcher[T]) Unsubscribe

func (d *Dispatcher[T]) Unsubscribe(subscription *Subscription[T])

type Pool

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

func NewPool

func NewPool(ctx context.Context, logger logrus.FieldLogger) *Pool

func (*Pool) AddEndpoint

func (pool *Pool) AddEndpoint(endpoint *ClientConfig) (*Client, error)

func (*Pool) AwaitReadyEndpoint

func (pool *Pool) AwaitReadyEndpoint(ctx context.Context, clientType ClientType) *Client

func (*Pool) GetAllEndpoints

func (pool *Pool) GetAllEndpoints() []*Client

func (*Pool) GetChainState

func (pool *Pool) GetChainState() *ChainState

func (*Pool) GetReadyEndpoint

func (pool *Pool) GetReadyEndpoint(clientType ClientType) *Client

func (*Pool) GetReadyEndpoints

func (pool *Pool) GetReadyEndpoints(clientType ClientType) []*Client

type Subscription

type Subscription[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*Subscription[T]) Channel

func (s *Subscription[T]) Channel() <-chan T

func (*Subscription[T]) Unsubscribe

func (s *Subscription[T]) Unsubscribe()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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