outport

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRetrialInterval = errors.New("invalid retrial interval")

ErrInvalidRetrialInterval signals that an invalid retrial interval was provided

View Source
var ErrNilArgsOutportFactory = errors.New("nil args outport driver factory")

ErrNilArgsOutportFactory signals that arguments that are needed for elastic driver factory are nil

View Source
var ErrNilDriver = errors.New("nil driver")

ErrNilDriver signals that a nil driver has been provided

View Source
var ErrNilPubKeyConverter = errors.New("nil pub key converter")

ErrNilPubKeyConverter signals that a nil pubkey converter has been provided

Functions

func NewOutport

func NewOutport(retrialInterval time.Duration, cfg outportcore.OutportConfig) (*outport, error)

NewOutport will create a new instance of proxy

Types

type DataProviderOutport

type DataProviderOutport interface {
	PrepareOutportSaveBlockData(arg process.ArgPrepareOutportSaveBlockData) (*outportcore.OutportBlockWithHeaderAndBody, error)
	IsInterfaceNil() bool
}

DataProviderOutport is an interface that defines what an implementation of data provider outport should be able to do

type Driver

type Driver interface {
	SaveBlock(outportBlock *outportcore.OutportBlock) error
	RevertIndexedBlock(blockData *outportcore.BlockData) error
	SaveRoundsInfo(roundsInfos *outportcore.RoundsInfo) error
	SaveValidatorsPubKeys(validatorsPubKeys *outportcore.ValidatorsPubKeys) error
	SaveValidatorsRating(validatorsRating *outportcore.ValidatorsRating) error
	SaveAccounts(accounts *outportcore.Accounts) error
	FinalizedBlock(finalizedBlock *outportcore.FinalizedBlock) error
	GetMarshaller() marshal.Marshalizer
	SetCurrentSettings(config outportcore.OutportConfig) error
	RegisterHandler(handlerFunction func() error, topic string) error
	Close() error
	IsInterfaceNil() bool
}

Driver is an interface for saving node specific data to other storage. This could be an elastic search index, a MySql database or any other external services.

type OutportHandler

type OutportHandler interface {
	SaveBlock(outportBlock *outportcore.OutportBlockWithHeaderAndBody) error
	RevertIndexedBlock(blockData *outportcore.HeaderDataWithBody) error
	SaveRoundsInfo(roundsInfos *outportcore.RoundsInfo)
	SaveValidatorsPubKeys(validatorsPubKeys *outportcore.ValidatorsPubKeys)
	SaveValidatorsRating(validatorsRating *outportcore.ValidatorsRating)
	SaveAccounts(accounts *outportcore.Accounts)
	FinalizedBlock(finalizedBlock *outportcore.FinalizedBlock)
	SubscribeDriver(driver Driver) error
	HasDrivers() bool
	Close() error
	IsInterfaceNil() bool
}

OutportHandler is interface that defines what a proxy implementation should be able to do The node is able to talk only with this interface

Jump to

Keyboard shortcuts

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