outport

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func NewOutport

func NewOutport() *outport

NewOutport will create a new instance of proxy

Types

type Driver

type Driver interface {
	SaveBlock(args *indexer.ArgsSaveBlockData)
	RevertIndexedBlock(header data.HeaderHandler, body data.BodyHandler)
	SaveRoundsInfo(roundsInfos []*indexer.RoundInfo)
	SaveValidatorsPubKeys(validatorsPubKeys map[uint32][][]byte, epoch uint32)
	SaveValidatorsRating(indexID string, infoRating []*indexer.ValidatorRatingInfo)
	SaveAccounts(blockTimestamp uint64, acc []data.UserAccountHandler)
	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 {
	Driver
	SubscribeDriver(driver Driver) error
	HasDrivers() bool
}

OutportHandler is interface that defines what a proxy implementation should be able to do

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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