consensus

package
v0.0.0-...-fdc5c16 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Driver driver
View Source
var Event event
View Source
var States state

Functions

This section is empty.

Types

type ExternalProcessor

type ExternalProcessor interface {
	EventProcessor(event enum.Element, customerData []byte)
	NewDataBasedOnConsensus(data ICustomerData) (newData ICustomerData, err error)
	CustomerDataToConsensus(lastCustomerData []byte) (data ICustomerData, err error)
	CustomerDataFromConsensus(data []byte) (customData ICustomerData, err error)
}

type IConsensusService

type IConsensusService interface {
	Load(networkService network.IService, processor ExternalProcessor)
	Start(cfg interface{}) (err error)
	Stop() (err error)

	Feed(msg message.Message) (reply *message.Message)
	RegisterExternalProcessor(processor ExternalProcessor)

	GetMessageFamily() string
	GetExternalProcessor() (processor ExternalProcessor)
	GetConsensusCustomerData(msg message.Message) (data []byte, err error)
	GetLastConsensusCustomerData() []byte
	StaticInformation() interface{}
}

type ICustomerData

type ICustomerData interface {
	Verify() (passed bool, err error)
	Bytes() ([]byte, error)
}

type Type

type Type string
const (
	BasicHotStuff   Type = "basic-hot-stuff"
	ChainedHotStuff Type = "chained-hot-stuff"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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