Documentation ¶
Index ¶
- type Block
- func (block *Block) AwaitBlock(ctx context.Context, timeout time.Duration) *types.Block
- func (block *Block) EnsureBlock(loadBlock func() (*types.Block, error)) (bool, error)
- func (block *Block) GetBlock() *types.Block
- func (block *Block) GetParentHash() *common.Hash
- func (block *Block) GetSeenBy() []*Client
- func (block *Block) SetSeenBy(client *Client)
- type ChainState
- type Client
- func (client *Client) DidFetchPeers() bool
- func (client *Client) GetClientType() ClientType
- func (client *Client) GetEndpointConfig() *ClientConfig
- func (client *Client) GetIndex() uint16
- func (client *Client) GetLastClientError() error
- func (client *Client) GetLastEventTime() time.Time
- func (client *Client) GetLastHead() (uint64, common.Hash)
- func (client *Client) GetName() string
- func (client *Client) GetNodeInfo() *p2p.NodeInfo
- func (client *Client) GetNodePeers() []*p2p.PeerInfo
- func (client *Client) GetRPCClient() *rpc.ExecutionClient
- func (client *Client) GetStatus() ClientStatus
- func (client *Client) GetVersion() string
- type ClientConfig
- type ClientStatus
- type ClientType
- type Dispatcher
- type Pool
- func (pool *Pool) AddEndpoint(endpoint *ClientConfig) (*Client, error)
- func (pool *Pool) AwaitReadyEndpoint(ctx context.Context, clientType ClientType) *Client
- func (pool *Pool) GetAllEndpoints() []*Client
- func (pool *Pool) GetChainState() *ChainState
- func (pool *Pool) GetReadyEndpoint(clientType ClientType) *Client
- func (pool *Pool) GetReadyEndpoints(clientType ClientType) []*Client
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) GetClientType ¶
func (client *Client) GetClientType() ClientType
func (*Client) GetEndpointConfig ¶
func (client *Client) GetEndpointConfig() *ClientConfig
func (*Client) GetLastClientError ¶
func (*Client) GetLastEventTime ¶
func (*Client) GetNodeInfo ¶
func (*Client) GetNodePeers ¶
func (*Client) GetRPCClient ¶
func (client *Client) GetRPCClient() *rpc.ExecutionClient
func (*Client) GetStatus ¶
func (client *Client) GetStatus() ClientStatus
func (*Client) GetVersion ¶
type ClientConfig ¶
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 (*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) 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()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.