# Packages
Code generated by counterfeiter.
# Functions
CheckConfigMetadata validates Raft config metadata.
ComputeMembershipChanges computes membership update based on information about new conseters, returns two slices: a slice of added consenters and a slice of consenters to be removed.
ConfChange computes Raft configuration changes based on current Raft configuration state and consenters IDs stored in RaftMetadata.
ConfigChannelHeader expects a config block and returns the header type of the config envelope wrapped in it, e.g.
ConfigEnvelopeFromBlock extracts configuration envelope from the block based on the config type, i.e.
ConsensusMetadataFromConfigBlock reads consensus metadata updates from the configuration block.
ConsentersToMap maps consenters into set where key is client TLS certificate.
CreateStorage attempts to create a storage to persist etcd/raft data.
EndpointconfigFromFromSupport extracts TLS CA certificates and endpoints from the ConsenterSupport.
ListSnapshots returns a list of RaftIndex of snapshots stored on disk.
MembershipByCert convert consenters map into set encapsulated by map where key is client TLS certificate.
MetadataFromConfigUpdate extracts consensus metadata from config update.
MetadataFromConfigValue reads and translates configuration updates from config value into raft metadata.
MetadataHasDuplication returns an error if the metadata has duplication of consenters.
New creates a etcdraft Consenter.
NewChain constructs a chain object.
No description provided by the author
NodeExists returns trues if node id exists in the slice and false otherwise.
RaftPeers maps consenters to slice of raft.Peer.
ReadBlockMetadata attempts to read raft metadata from block metadata, if available.
# Constants
No description provided by the author
DefaultEvictionSuspicion is the threshold that a node will start suspecting its own eviction if it has been leaderless for this period of time.
DefaultLeaderlessCheckInterval is the interval that a chain checks its own leadership status.
DefaultSnapshotCatchUpEntries is the default number of entries to preserve in memory when a snapshot is taken.
20 MB.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
MaxSnapshotFiles defines max number of etcd/raft snapshot files to retain on filesystem.
# Structs
Chain implements consensus.Chain interface.
Config contains etcdraft configurations.
Consenter implements etcdraft consenter.
ConsenterCertificate denotes a TLS certificate of a consenter.
Dispatcher dispatches Submit and Step requests to the designated per chain instances.
LedgerBlockPuller pulls blocks upon demand, or fetches them from the ledger.
MembershipChanges keeps information about membership changes introduced during configuration update.
No description provided by the author
Options contains all the configurations relevant to the chain.
PeriodicCheck checks periodically a condition, and reports the cumulative consecutive period the condition was fulfilled.
RaftStorage encapsulates storages needed for etcd/raft data, i.e.
# Interfaces
BlockPuller is used to pull blocks from other OSN.
ChainGetter obtains instances of ChainSupport for the given channel.
Configurator is used to configure the communication layer when the chain starts.
InactiveChainRegistry registers chains that are inactive.
MemoryStorage is currently backed by etcd/raft.MemoryStorage.
MessageReceiver receives messages.
ReceiverGetter obtains instances of MessageReceiver given a channel ID.
RPC is used to mock the transport layer in tests.
# Type aliases
CreateBlockPuller is a function to create BlockPuller on demand.