TypeKey is the string with which this consensus implementation is identified across Fabric.
const TypeKey = "etcdraft"
func Marshal(md *ConfigMetadata) ([]byte, error)
Marshal serializes this implementation's proto messages. It is called by the encoder package during the creation of the Orderer ConfigGroup.
BlockMetadata stores data used by the Raft OSNs when coordinating with each other, to be serialized into block meta dta field and used after failres and restarts.
type BlockMetadata struct { // Maintains a mapping between the cluster's OSNs // and their Raft IDs. ConsenterIds []uint64 `protobuf:"varint,1,rep,packed,name=consenter_ids,json=consenterIds,proto3" json:"consenter_ids,omitempty"` // Carries the Raft ID value that will be assigned // to the next OSN that will join this cluster. NextConsenterId uint64 `protobuf:"varint,2,opt,name=next_consenter_id,json=nextConsenterId,proto3" json:"next_consenter_id,omitempty"` // Index of etcd/raft entry for current block. RaftIndex uint64 `protobuf:"varint,3,opt,name=raft_index,json=raftIndex,proto3" json:"raft_index,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockMetadata) Descriptor() ([]byte, []int)
func (m *BlockMetadata) GetConsenterIds() []uint64
func (m *BlockMetadata) GetNextConsenterId() uint64
func (m *BlockMetadata) GetRaftIndex() uint64
func (*BlockMetadata) ProtoMessage()
func (m *BlockMetadata) Reset()
func (m *BlockMetadata) String() string
func (m *BlockMetadata) XXX_DiscardUnknown()
func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *BlockMetadata) XXX_Merge(src proto.Message)
func (m *BlockMetadata) XXX_Size() int
func (m *BlockMetadata) XXX_Unmarshal(b []byte) error
ConfigMetadata is serialized and set as the value of ConsensusType.Metadata in a channel configuration when the ConsensusType.Type is set "etcdraft".
type ConfigMetadata struct { Consenters []*Consenter `protobuf:"bytes,1,rep,name=consenters,proto3" json:"consenters,omitempty"` Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConfigMetadata) Descriptor() ([]byte, []int)
func (m *ConfigMetadata) GetConsenters() []*Consenter
func (m *ConfigMetadata) GetOptions() *Options
func (*ConfigMetadata) ProtoMessage()
func (m *ConfigMetadata) Reset()
func (m *ConfigMetadata) String() string
func (m *ConfigMetadata) XXX_DiscardUnknown()
func (m *ConfigMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *ConfigMetadata) XXX_Merge(src proto.Message)
func (m *ConfigMetadata) XXX_Size() int
func (m *ConfigMetadata) XXX_Unmarshal(b []byte) error
ConsensusTypeMetadataFactory allows this implementation's proto messages to register their type with the orderer's proto messages. This is needed for protolator to work.
type ConsensusTypeMetadataFactory struct{}
func (dogf ConsensusTypeMetadataFactory) NewMessage() proto.Message
NewMessage implements the Orderer.ConsensusTypeMetadataFactory interface.
Consenter represents a consenting node (i.e. replica).
type Consenter struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` ClientTlsCert []byte `protobuf:"bytes,3,opt,name=client_tls_cert,json=clientTlsCert,proto3" json:"client_tls_cert,omitempty"` ServerTlsCert []byte `protobuf:"bytes,4,opt,name=server_tls_cert,json=serverTlsCert,proto3" json:"server_tls_cert,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Consenter) Descriptor() ([]byte, []int)
func (m *Consenter) GetClientTlsCert() []byte
func (m *Consenter) GetHost() string
func (m *Consenter) GetPort() uint32
func (m *Consenter) GetServerTlsCert() []byte
func (*Consenter) ProtoMessage()
func (m *Consenter) Reset()
func (m *Consenter) String() string
func (m *Consenter) XXX_DiscardUnknown()
func (m *Consenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *Consenter) XXX_Merge(src proto.Message)
func (m *Consenter) XXX_Size() int
func (m *Consenter) XXX_Unmarshal(b []byte) error
Options to be specified for all the etcd/raft nodes. These can be modified on a per-channel basis.
type Options struct { TickInterval string `protobuf:"bytes,1,opt,name=tick_interval,json=tickInterval,proto3" json:"tick_interval,omitempty"` ElectionTick uint32 `protobuf:"varint,2,opt,name=election_tick,json=electionTick,proto3" json:"election_tick,omitempty"` HeartbeatTick uint32 `protobuf:"varint,3,opt,name=heartbeat_tick,json=heartbeatTick,proto3" json:"heartbeat_tick,omitempty"` MaxInflightBlocks uint32 `protobuf:"varint,4,opt,name=max_inflight_blocks,json=maxInflightBlocks,proto3" json:"max_inflight_blocks,omitempty"` // Take snapshot when cumulative data exceeds certain size in bytes. SnapshotIntervalSize uint32 `protobuf:"varint,5,opt,name=snapshot_interval_size,json=snapshotIntervalSize,proto3" json:"snapshot_interval_size,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Options) Descriptor() ([]byte, []int)
func (m *Options) GetElectionTick() uint32
func (m *Options) GetHeartbeatTick() uint32
func (m *Options) GetMaxInflightBlocks() uint32
func (m *Options) GetSnapshotIntervalSize() uint32
func (m *Options) GetTickInterval() string
func (*Options) ProtoMessage()
func (m *Options) Reset()
func (m *Options) String() string
func (m *Options) XXX_DiscardUnknown()
func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *Options) XXX_Merge(src proto.Message)
func (m *Options) XXX_Size() int
func (m *Options) XXX_Unmarshal(b []byte) error