processor

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: GPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseProcessor

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

func NewBaseProcessor

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

NewBaseProcessor creates a new BaseProcessor.

func (*BaseProcessor) Stop

func (bp *BaseProcessor) Stop()

OnStop 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 checkpoint processor

func (*CheckpointProcessor) RegisterTasks

func (cp *CheckpointProcessor) RegisterTasks()

RegisterTasks - Registers checkpoint related tasks with machinery

func (*CheckpointProcessor) Start

func (cp *CheckpointProcessor) Start() error

Start - consumes messages from 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 statesender abi to clerk processor

func (*ClerkProcessor) RegisterTasks

func (cp *ClerkProcessor) RegisterTasks()

RegisterTasks - Registers 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 - process fee related events

func NewFeeProcessor

func NewFeeProcessor(stakingInfoAbi *abi.ABI) *FeeProcessor

NewFeeProcessor - add abi to clerk processor

func (*FeeProcessor) RegisterTasks

func (fp *FeeProcessor) RegisterTasks()

RegisterTasks - Registers 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 HeimdallCheckpoint

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

HeimdallCheckpoint heimdall checkpoint

func NewHeimdallCheckpoint

func NewHeimdallCheckpoint(_start uint64, _end uint64) *HeimdallCheckpoint

NewHeimdallCheckpoint creates new heimdall checkpoint object

type Processor

type Processor interface {
	Start() error

	RegisterTasks()

	String() string

	Stop()
}

Processor defines a block header listerner for Rootchain, Maticchain, Heimdall

type ProcessorService

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

ProcessorService starts and stops all event processors

func NewProcessorService

func NewProcessorService(
	cdc *codec.Codec,
	queueConnector *queue.QueueConnector,
	httpClient *httpClient.HTTP,
	txBroadcaster *broadcaster.TxBroadcaster,
) *ProcessorService

NewProcessorService returns new service object for processing queue msg

func (*ProcessorService) OnStart

func (processorService *ProcessorService) OnStart() error

OnStart starts new block subscription

func (*ProcessorService) OnStop

func (processorService *ProcessorService) OnStop()

OnStop stops all necessary go routines

type Result

type Result struct {
	Result uint64 `json:"result"`
}

Result represents single req result

type SlashingContext

type SlashingContext struct {
	ChainmanagerParams *chainmanagerTypes.Params
}

SlashingContext represents slashing context

type SlashingProcessor

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

SlashingProcessor - process slashing related events

func NewSlashingProcessor

func NewSlashingProcessor(stakingInfoAbi *abi.ABI) *SlashingProcessor

NewSlashingProcessor - add abi to slashing processor

func (*SlashingProcessor) RegisterTasks

func (sp *SlashingProcessor) RegisterTasks()

RegisterTasks - Registers slashing related tasks with machinery

func (*SlashingProcessor) Start

func (sp *SlashingProcessor) Start() error

Start starts new block subscription

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()

OnStop 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 - add 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