Documentation ¶
Index ¶
- Constants
- func OpinionGiverFunc() (givers []opinion.OpinionGiver, err error)
- func OpinionRetriever(id string, objectType vote.ObjectType) opinion.Opinion
- func Plugin() *node.Plugin
- func Registry() *statement.Registry
- func Voter() vote.DRNGRoundBasedVoter
- type OpinionGiver
- type OpinionGivers
- type PeerOpinionGiver
Constants ¶
View Source
const ( // ConsensusPluginName contains the human readable name of the plugin. ConsensusPluginName = "Consensus" // CfgFPCQuerySampleSize defines how many nodes will be queried each round. CfgFPCQuerySampleSize = "fpc.querySampleSize" // CfgFPCRoundInterval defines how long a round lasts (in seconds) CfgFPCRoundInterval = "fpc.roundInterval" // CfgFPCListen defines if the FPC service should listen. CfgFPCListen = "fpc.listen" // CfgFPCBindAddress defines on which address the FPC service should listen. CfgFPCBindAddress = "fpc.bindAddress" // CfgWaitForStatement is the time in seconds for which the node wait for receiveing the new statement. CfgWaitForStatement = "statement.waitForStatement" // CfgManaThreshold defines the Mana threshold to accept/write a statement. CfgManaThreshold = "statement.manaThreshold" // CfgCleanInterval defines the time interval [in minutes] for cleaning the statement registry. CfgCleanInterval = "statement.cleanInterval" // CfgDeleteAfter defines the time [in minutes] after which older statements are deleted from the registry. CfgDeleteAfter = "statement.deleteAfter" // CfgWriteStatement defines if the node should write statements. CfgWriteStatement = "statement.writeStatement" )
Variables ¶
This section is empty.
Functions ¶
func OpinionGiverFunc ¶
func OpinionGiverFunc() (givers []opinion.OpinionGiver, err error)
OpinionGiverFunc returns a slice of opinion givers.
func OpinionRetriever ¶
func OpinionRetriever(id string, objectType vote.ObjectType) opinion.Opinion
OpinionRetriever returns the current opinion of the given id.
func Voter ¶
func Voter() vote.DRNGRoundBasedVoter
Voter returns the DRNGRoundBasedVoter instance used by the FPC plugin.
Types ¶
type OpinionGiver ¶
type OpinionGiver struct {
// contains filtered or unexported fields
}
OpinionGiver is a wrapper for both statements and peers.
func (*OpinionGiver) ID ¶
func (o *OpinionGiver) ID() identity.ID
ID returns the identifier of the underlying Peer.
type OpinionGivers ¶
type OpinionGivers map[identity.ID]OpinionGiver
OpinionGivers is a map of OpinionGiver.
type PeerOpinionGiver ¶
type PeerOpinionGiver struct {
// contains filtered or unexported fields
}
PeerOpinionGiver implements the OpinionGiver interface based on a peer.
func (*PeerOpinionGiver) Address ¶
func (pog *PeerOpinionGiver) Address() string
Address returns the FPC address of the underlying Peer.
func (*PeerOpinionGiver) ID ¶
func (pog *PeerOpinionGiver) ID() identity.ID
ID returns the identifier of the underlying Peer.
Click to show internal directories.
Click to hide internal directories.