Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRetrialInterval = errors.New("invalid retrial interval")
ErrInvalidRetrialInterval signals that an invalid retrial interval was provided
var ErrNilArgsOutportFactory = errors.New("nil args outport driver factory")
ErrNilArgsOutportFactory signals that arguments that are needed for elastic driver factory are nil
var ErrNilDriver = errors.New("nil driver")
ErrNilDriver signals that a nil driver has been provided
var ErrNilPubKeyConverter = errors.New("nil pub key converter")
ErrNilPubKeyConverter signals that a nil pubkey converter has been provided
Functions ¶
func NewOutport ¶
NewOutport will create a new instance of proxy
Types ¶
type DataProviderOutport ¶
type DataProviderOutport interface {
PrepareOutportSaveBlockData(arg process.ArgPrepareOutportSaveBlockData) (*outportcore.ArgsSaveBlockData, 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(args *outportcore.ArgsSaveBlockData) error
RevertIndexedBlock(header data.HeaderHandler, body data.BodyHandler) error
SaveRoundsInfo(roundsInfos []*outportcore.RoundInfo) error
SaveValidatorsPubKeys(validatorsPubKeys map[uint32][][]byte, epoch uint32) error
SaveValidatorsRating(indexID string, infoRating []*outportcore.ValidatorRatingInfo) error
SaveAccounts(blockTimestamp uint64, acc map[string]*outportcore.AlteredAccount, shardID uint32) error
FinalizedBlock(headerHash []byte) 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(args *outportcore.ArgsSaveBlockData)
RevertIndexedBlock(header data.HeaderHandler, body data.BodyHandler)
SaveRoundsInfo(roundsInfos []*outportcore.RoundInfo)
SaveValidatorsPubKeys(validatorsPubKeys map[uint32][][]byte, epoch uint32)
SaveValidatorsRating(indexID string, infoRating []*outportcore.ValidatorRatingInfo)
SaveAccounts(blockTimestamp uint64, acc map[string]*outportcore.AlteredAccount, shardID uint32)
FinalizedBlock(headerHash []byte)
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