orchestrator

package
v1.1.12-beta Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_WORK_MODE_CHECK_INTERVAL          = 10
	DEFAULT_LIVE_MODE_THRESHOLD               = 500
	WorkModeLive                     WorkMode = "live"
	WorkModeBackfill                 WorkMode = "backfill"
)
View Source
const DEFAULT_BLOCKS_PER_COMMIT = 1000
View Source
const DEFAULT_BLOCKS_PER_POLL = 10
View Source
const DEFAULT_CHAIN_TRACKER_POLL_INTERVAL = 300000 // 5 minutes
View Source
const DEFAULT_COMMITTER_TRIGGER_INTERVAL = 2000
View Source
const DEFAULT_FAILURES_PER_POLL = 10
View Source
const DEFAULT_FAILURE_TRIGGER_INTERVAL = 1000
View Source
const DEFAULT_REORG_HANDLER_BLOCKS_PER_SCAN = 100
View Source
const DEFAULT_REORG_HANDLER_INTERVAL = 1000
View Source
const DEFAULT_TRIGGER_INTERVAL = 1000

Variables

View Source
var ErrNoNewBlocks = fmt.Errorf("no new blocks to poll")

Functions

This section is empty.

Types

type BlockNumberWithError

type BlockNumberWithError struct {
	BlockNumber *big.Int
	Error       error
}

type ChainTracker

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

func NewChainTracker

func NewChainTracker(rpc rpc.IRPCClient) *ChainTracker

func (*ChainTracker) Start

func (ct *ChainTracker) Start(ctx context.Context)

type Committer

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

func NewCommitter

func NewCommitter(rpc rpc.IRPCClient, storage storage.IStorage, opts ...CommitterOption) *Committer

func (*Committer) Start

func (c *Committer) Start(ctx context.Context)

type CommitterOption

type CommitterOption func(*Committer)

func WithCommitterWorkModeChan

func WithCommitterWorkModeChan(ch chan WorkMode) CommitterOption

type FailureRecoverer

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

func NewFailureRecoverer

func NewFailureRecoverer(rpc rpc.IRPCClient, storage storage.IStorage) *FailureRecoverer

func (*FailureRecoverer) Start

func (fr *FailureRecoverer) Start(ctx context.Context)

type Orchestrator

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

func NewOrchestrator

func NewOrchestrator(rpc rpc.IRPCClient) (*Orchestrator, error)

func (*Orchestrator) Shutdown

func (o *Orchestrator) Shutdown()

func (*Orchestrator) Start

func (o *Orchestrator) Start()

type Poller

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

func NewBoundlessPoller

func NewBoundlessPoller(rpc rpc.IRPCClient, storage storage.IStorage, opts ...PollerOption) *Poller

func NewPoller

func NewPoller(rpc rpc.IRPCClient, storage storage.IStorage, opts ...PollerOption) *Poller

func (*Poller) Poll

func (p *Poller) Poll(ctx context.Context, blockNumbers []*big.Int) (lastPolledBlock *big.Int)

func (*Poller) PollWithoutSaving

func (p *Poller) PollWithoutSaving(ctx context.Context, blockNumbers []*big.Int) ([]common.BlockData, []rpc.GetFullBlockResult)

func (*Poller) StageResults

func (p *Poller) StageResults(blockData []common.BlockData, failedResults []rpc.GetFullBlockResult)

func (*Poller) Start

func (p *Poller) Start(ctx context.Context)

type PollerOption

type PollerOption func(*Poller)

func WithPollerWorkModeChan

func WithPollerWorkModeChan(ch chan WorkMode) PollerOption

type ReorgHandler

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

func NewReorgHandler

func NewReorgHandler(rpc rpc.IRPCClient, storage storage.IStorage) *ReorgHandler

func (*ReorgHandler) RunFromBlock

func (rh *ReorgHandler) RunFromBlock(ctx context.Context, latestCheckedBlock *big.Int) (lastCheckedBlock *big.Int, err error)

func (*ReorgHandler) Start

func (rh *ReorgHandler) Start(ctx context.Context)

type WorkMode

type WorkMode string

type WorkModeMonitor

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

func NewWorkModeMonitor

func NewWorkModeMonitor(rpc rpc.IRPCClient, storage storage.IStorage) *WorkModeMonitor

func (*WorkModeMonitor) RegisterChannel

func (m *WorkModeMonitor) RegisterChannel(ch chan WorkMode)

RegisterChannel adds a new channel to receive work mode updates

func (*WorkModeMonitor) Start

func (m *WorkModeMonitor) Start(ctx context.Context)

func (*WorkModeMonitor) UnregisterChannel

func (m *WorkModeMonitor) UnregisterChannel(ch chan WorkMode)

UnregisterChannel removes a channel from receiving work mode updates

Jump to

Keyboard shortcuts

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