etcdraft

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_orderer_etcdraft_configuration_proto protoreflect.FileDescriptor
View Source
var File_orderer_etcdraft_metadata_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BlockMetadata

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"`
	// contains filtered or unexported fields
}

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.

func (*BlockMetadata) Descriptor deprecated

func (*BlockMetadata) Descriptor() ([]byte, []int)

Deprecated: Use BlockMetadata.ProtoReflect.Descriptor instead.

func (*BlockMetadata) GetConsenterIds

func (x *BlockMetadata) GetConsenterIds() []uint64

func (*BlockMetadata) GetNextConsenterId

func (x *BlockMetadata) GetNextConsenterId() uint64

func (*BlockMetadata) GetRaftIndex

func (x *BlockMetadata) GetRaftIndex() uint64

func (*BlockMetadata) ProtoMessage

func (*BlockMetadata) ProtoMessage()

func (*BlockMetadata) ProtoReflect

func (x *BlockMetadata) ProtoReflect() protoreflect.Message

func (*BlockMetadata) Reset

func (x *BlockMetadata) Reset()

func (*BlockMetadata) String

func (x *BlockMetadata) String() string

type ClusterMetadata

type ClusterMetadata struct {

	// Indicates active nodes in cluster that are reacheable by Raft leader
	ActiveNodes []uint64 `protobuf:"varint,1,rep,packed,name=active_nodes,json=activeNodes,proto3" json:"active_nodes,omitempty"`
	// contains filtered or unexported fields
}

ClusterMetadata encapsulates metadata that is exchanged among cluster nodes

func (*ClusterMetadata) Descriptor deprecated

func (*ClusterMetadata) Descriptor() ([]byte, []int)

Deprecated: Use ClusterMetadata.ProtoReflect.Descriptor instead.

func (*ClusterMetadata) GetActiveNodes

func (x *ClusterMetadata) GetActiveNodes() []uint64

func (*ClusterMetadata) ProtoMessage

func (*ClusterMetadata) ProtoMessage()

func (*ClusterMetadata) ProtoReflect

func (x *ClusterMetadata) ProtoReflect() protoreflect.Message

func (*ClusterMetadata) Reset

func (x *ClusterMetadata) Reset()

func (*ClusterMetadata) String

func (x *ClusterMetadata) String() string

type ConfigMetadata

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"`
	// contains filtered or unexported fields
}

ConfigMetadata is serialized and set as the value of ConsensusType.Metadata in a channel configuration when the ConsensusType.Type is set "etcdraft".

func (*ConfigMetadata) Descriptor deprecated

func (*ConfigMetadata) Descriptor() ([]byte, []int)

Deprecated: Use ConfigMetadata.ProtoReflect.Descriptor instead.

func (*ConfigMetadata) GetConsenters

func (x *ConfigMetadata) GetConsenters() []*Consenter

func (*ConfigMetadata) GetOptions

func (x *ConfigMetadata) GetOptions() *Options

func (*ConfigMetadata) ProtoMessage

func (*ConfigMetadata) ProtoMessage()

func (*ConfigMetadata) ProtoReflect

func (x *ConfigMetadata) ProtoReflect() protoreflect.Message

func (*ConfigMetadata) Reset

func (x *ConfigMetadata) Reset()

func (*ConfigMetadata) String

func (x *ConfigMetadata) String() string

type Consenter

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"`
	// contains filtered or unexported fields
}

Consenter represents a consenting node (i.e. replica).

func (*Consenter) Descriptor deprecated

func (*Consenter) Descriptor() ([]byte, []int)

Deprecated: Use Consenter.ProtoReflect.Descriptor instead.

func (*Consenter) GetClientTlsCert

func (x *Consenter) GetClientTlsCert() []byte

func (*Consenter) GetHost

func (x *Consenter) GetHost() string

func (*Consenter) GetPort

func (x *Consenter) GetPort() uint32

func (*Consenter) GetServerTlsCert

func (x *Consenter) GetServerTlsCert() []byte

func (*Consenter) ProtoMessage

func (*Consenter) ProtoMessage()

func (*Consenter) ProtoReflect

func (x *Consenter) ProtoReflect() protoreflect.Message

func (*Consenter) Reset

func (x *Consenter) Reset()

func (*Consenter) String

func (x *Consenter) String() string

type Options

type Options struct {
	TickInterval      string `protobuf:"bytes,1,opt,name=tick_interval,json=tickInterval,proto3" json:"tick_interval,omitempty"` // time duration format, e.g. 500ms
	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"`
	// contains filtered or unexported fields
}

Options to be specified for all the etcd/raft nodes. These can be modified on a per-channel basis.

func (*Options) Descriptor deprecated

func (*Options) Descriptor() ([]byte, []int)

Deprecated: Use Options.ProtoReflect.Descriptor instead.

func (*Options) GetElectionTick

func (x *Options) GetElectionTick() uint32

func (*Options) GetHeartbeatTick

func (x *Options) GetHeartbeatTick() uint32

func (*Options) GetMaxInflightBlocks

func (x *Options) GetMaxInflightBlocks() uint32

func (*Options) GetSnapshotIntervalSize

func (x *Options) GetSnapshotIntervalSize() uint32

func (*Options) GetTickInterval

func (x *Options) GetTickInterval() string

func (*Options) ProtoMessage

func (*Options) ProtoMessage()

func (*Options) ProtoReflect

func (x *Options) ProtoReflect() protoreflect.Message

func (*Options) Reset

func (x *Options) Reset()

func (*Options) String

func (x *Options) String() string

Jump to

Keyboard shortcuts

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