relayer

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics interface {
	TrackDepositMessage(m *message.Message)
}

type RelayedChain

type RelayedChain interface {
	PollEvents(stop <-chan struct{}, sysErr chan<- error, eventsChan chan *message.Message)
	HandleEvent(sourceID, destID uint8, nonce uint64, resourceID types.ResourceID, calldata, handlerResponse []byte) (*message.Message, error)

	DomainID() uint8
	RelayId() uint8

	ChainID() (*big.Int, error)
	BridgeContractAddress() *common.Address
	SyncBlockLabels() []attribute.KeyValue
	HeadBlockLabels() []attribute.KeyValue

	GetSignatures(message *message.Message) ([][]byte, error)
	Get(message *message.Message) (bool, error)
	VoteOnDest(message *message.Message) error
	VoteOnRelay(message *message.Message, chainID *big.Int, address *common.Address) error
	ExecOnDest(message *message.Message, data [][]byte, sleepDuration *big.Int) error
	SignatureSubmit() bool
}

type Relayer

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

func NewRelayer

func NewRelayer(chains []RelayedChain, metrics Metrics, messageProcessors ...message.MessageProcessor) *Relayer

func (*Relayer) Start

func (r *Relayer) Start(stop <-chan struct{}, sysErr chan error)

Start function starts the relayer. Relayer routine is starting all the chains and passing them with a channel that accepts unified cross chain message format

Directories

Path Synopsis
Package mock_relayer is a generated GoMock package.
Package mock_relayer is a generated GoMock package.

Jump to

Keyboard shortcuts

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