processor

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: GPL-3.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(name string) log.Logger

Logger returns logger singleton instance

Types

type BaseProcessor

type BaseProcessor struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

func NewBaseProcessor

func NewBaseProcessor(cdc codec.Codec, queueConnector *queue.Connector, httpClient *rpchttp.HTTP, txBroadcaster *broadcaster.TxBroadcaster, name string, impl Processor) *BaseProcessor

NewBaseProcessor creates a new BaseProcessor.

func (*BaseProcessor) Stop

func (bp *BaseProcessor) Stop()

Stop stops all necessary go routines

func (*BaseProcessor) String

func (bp *BaseProcessor) String() string

String implements Service by returning a string representation of the service.

type CheckpointContext

type CheckpointContext struct {
	ChainmanagerParams *chainmanagertypes.Params
	CheckpointParams   *checkpointtypes.Params
}

CheckpointContext represents checkpoint context

type CheckpointProcessor

type CheckpointProcessor struct {
	BaseProcessor
	// contains filtered or unexported fields
}

CheckpointProcessor - processor for checkpoint queue.

func NewCheckpointProcessor

func NewCheckpointProcessor(rootChainAbi *abi.ABI) *CheckpointProcessor

NewCheckpointProcessor - add rootChain abi to the checkpoint processor

func (*CheckpointProcessor) RegisterTasks

func (cp *CheckpointProcessor) RegisterTasks()

RegisterTasks registers the checkpoint-related tasks with machinery

func (*CheckpointProcessor) Start

func (cp *CheckpointProcessor) Start() error

Start - consumes messages from the checkpoint queue and call processMsg

func (*CheckpointProcessor) Stop

func (cp *CheckpointProcessor) Stop()

Stop stops all necessary go routines

type ClerkContext

type ClerkContext struct {
	ChainmanagerParams *chainmanagertypes.Params
}

ClerkContext for bridge

type ClerkProcessor

type ClerkProcessor struct {
	BaseProcessor
	// contains filtered or unexported fields
}

ClerkProcessor - sync state/deposit events

func NewClerkProcessor

func NewClerkProcessor(stateSenderAbi *abi.ABI) *ClerkProcessor

NewClerkProcessor - add state sender abi to clerk processor

func (*ClerkProcessor) RegisterTasks

func (cp *ClerkProcessor) RegisterTasks()

RegisterTasks registers the clerk-related tasks with machinery

func (*ClerkProcessor) Start

func (cp *ClerkProcessor) Start() error

Start starts new block subscription

type ContractCheckpoint

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

ContractCheckpoint contract checkpoint

func NewContractCheckpoint

func NewContractCheckpoint(_newStart uint64, _newEnd uint64, _currentHeaderBlock *HeaderBlock) *ContractCheckpoint

NewContractCheckpoint creates contract checkpoint

func (ContractCheckpoint) String

func (c ContractCheckpoint) String() string

type FeeProcessor

type FeeProcessor struct {
	BaseProcessor
	// contains filtered or unexported fields
}

FeeProcessor processes the fee-related events

func NewFeeProcessor

func NewFeeProcessor(stakingInfoAbi *abi.ABI) *FeeProcessor

NewFeeProcessor adds the abi to the clerk processor

func (*FeeProcessor) RegisterTasks

func (fp *FeeProcessor) RegisterTasks()

RegisterTasks registers the clerk-related tasks with machinery

func (*FeeProcessor) Start

func (fp *FeeProcessor) Start() error

Start starts new block subscription

type HeaderBlock

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

HeaderBlock header block

type Processor

type Processor interface {
	Start() error

	RegisterTasks()

	String() string

	Stop()
}

Processor defines a block header listener for RootChain, BorChain, Heimdall

type Service added in v0.1.10

type Service struct {
	// Base service
	common.BaseService
	// contains filtered or unexported fields
}

Service starts and stops all event processors

func NewProcessorService

func NewProcessorService(
	cdc codec.Codec,
	queueConnector *queue.Connector,
	httpClient *rpchttp.HTTP,
	txBroadcaster *broadcaster.TxBroadcaster,
) *Service

NewProcessorService returns a new service object for processing queue msg

func (*Service) OnStart added in v0.1.10

func (processorService *Service) OnStart() error

OnStart starts the new block subscription

func (*Service) OnStop added in v0.1.10

func (processorService *Service) OnStop()

OnStop stops all necessary go routines

type SpanProcessor

type SpanProcessor struct {
	BaseProcessor
	// contains filtered or unexported fields
}

SpanProcessor - process span related events

func (*SpanProcessor) RegisterTasks

func (sp *SpanProcessor) RegisterTasks()

RegisterTasks - nil

func (*SpanProcessor) Start

func (sp *SpanProcessor) Start() error

Start starts new block subscription

func (*SpanProcessor) Stop

func (sp *SpanProcessor) Stop()

Stop stops all necessary go routines

type StakingProcessor

type StakingProcessor struct {
	BaseProcessor
	// contains filtered or unexported fields
}

StakingProcessor - process staking related events

func NewStakingProcessor

func NewStakingProcessor(stakingInfoAbi *abi.ABI) *StakingProcessor

NewStakingProcessor adds the abi to staking processor

func (*StakingProcessor) RegisterTasks

func (sp *StakingProcessor) RegisterTasks()

RegisterTasks - Registers staking tasks with machinery

func (*StakingProcessor) Start

func (sp *StakingProcessor) Start() error

Start starts new block subscription

Jump to

Keyboard shortcuts

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