transportv1

package
v0.0.0-...-5aa5535 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log_LogType_name = map[int32]string{
		0: "LOG_COMMAND",
		1: "LOG_NOOP",
		2: "LOG_ADD_PEER_DEPRECATED",
		3: "LOG_REMOVE_PEER_DEPRECATED",
		4: "LOG_BARRIER",
		5: "LOG_CONFIGURATION",
	}
	Log_LogType_value = map[string]int32{
		"LOG_COMMAND":                0,
		"LOG_NOOP":                   1,
		"LOG_ADD_PEER_DEPRECATED":    2,
		"LOG_REMOVE_PEER_DEPRECATED": 3,
		"LOG_BARRIER":                4,
		"LOG_CONFIGURATION":          5,
	}
)

Enum value maps for Log_LogType.

View Source
var File_proto_transport_v1_transport_proto protoreflect.FileDescriptor
View Source
var RaftTransport_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "transport.v1.RaftTransport",
	HandlerType: (*RaftTransportServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AppendEntries",
			Handler:    _RaftTransport_AppendEntries_Handler,
		},
		{
			MethodName: "RequestVote",
			Handler:    _RaftTransport_RequestVote_Handler,
		},
		{
			MethodName: "TimeoutNow",
			Handler:    _RaftTransport_TimeoutNow_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "AppendEntriesPipeline",
			Handler:       _RaftTransport_AppendEntriesPipeline_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "InstallSnapshot",
			Handler:       _RaftTransport_InstallSnapshot_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "proto/transport/v1/transport.proto",
}

RaftTransport_ServiceDesc is the grpc.ServiceDesc for RaftTransport service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRaftTransportServer

func RegisterRaftTransportServer(s grpc.ServiceRegistrar, srv RaftTransportServer)

Types

type AppendEntriesRequest

type AppendEntriesRequest struct {
	RpcHeader         *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	Term              uint64     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Leader            []byte     `protobuf:"bytes,3,opt,name=leader,proto3" json:"leader,omitempty"`
	PrevLogEntry      uint64     `protobuf:"varint,4,opt,name=prev_log_entry,json=prevLogEntry,proto3" json:"prev_log_entry,omitempty"`
	PrevLogTerm       uint64     `protobuf:"varint,5,opt,name=prev_log_term,json=prevLogTerm,proto3" json:"prev_log_term,omitempty"`
	Entries           []*Log     `protobuf:"bytes,6,rep,name=entries,proto3" json:"entries,omitempty"`
	LeaderCommitIndex uint64     `protobuf:"varint,7,opt,name=leader_commit_index,json=leaderCommitIndex,proto3" json:"leader_commit_index,omitempty"`
	// contains filtered or unexported fields
}

func (*AppendEntriesRequest) Descriptor deprecated

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

Deprecated: Use AppendEntriesRequest.ProtoReflect.Descriptor instead.

func (*AppendEntriesRequest) GetEntries

func (x *AppendEntriesRequest) GetEntries() []*Log

func (*AppendEntriesRequest) GetLeader

func (x *AppendEntriesRequest) GetLeader() []byte

func (*AppendEntriesRequest) GetLeaderCommitIndex

func (x *AppendEntriesRequest) GetLeaderCommitIndex() uint64

func (*AppendEntriesRequest) GetPrevLogEntry

func (x *AppendEntriesRequest) GetPrevLogEntry() uint64

func (*AppendEntriesRequest) GetPrevLogTerm

func (x *AppendEntriesRequest) GetPrevLogTerm() uint64

func (*AppendEntriesRequest) GetRpcHeader

func (x *AppendEntriesRequest) GetRpcHeader() *RPCHeader

func (*AppendEntriesRequest) GetTerm

func (x *AppendEntriesRequest) GetTerm() uint64

func (*AppendEntriesRequest) ProtoMessage

func (*AppendEntriesRequest) ProtoMessage()

func (*AppendEntriesRequest) ProtoReflect

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

func (*AppendEntriesRequest) Reset

func (x *AppendEntriesRequest) Reset()

func (*AppendEntriesRequest) String

func (x *AppendEntriesRequest) String() string

func (*AppendEntriesRequest) Validate

func (m *AppendEntriesRequest) Validate() error

Validate checks the field values on AppendEntriesRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AppendEntriesRequest) ValidateAll

func (m *AppendEntriesRequest) ValidateAll() error

ValidateAll checks the field values on AppendEntriesRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AppendEntriesRequestMultiError, or nil if none found.

type AppendEntriesRequestMultiError

type AppendEntriesRequestMultiError []error

AppendEntriesRequestMultiError is an error wrapping multiple validation errors returned by AppendEntriesRequest.ValidateAll() if the designated constraints aren't met.

func (AppendEntriesRequestMultiError) AllErrors

func (m AppendEntriesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AppendEntriesRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type AppendEntriesRequestValidationError

type AppendEntriesRequestValidationError struct {
	// contains filtered or unexported fields
}

AppendEntriesRequestValidationError is the validation error returned by AppendEntriesRequest.Validate if the designated constraints aren't met.

func (AppendEntriesRequestValidationError) Cause

Cause function returns cause value.

func (AppendEntriesRequestValidationError) Error

Error satisfies the builtin error interface

func (AppendEntriesRequestValidationError) ErrorName

ErrorName returns error name.

func (AppendEntriesRequestValidationError) Field

Field function returns field value.

func (AppendEntriesRequestValidationError) Key

Key function returns key value.

func (AppendEntriesRequestValidationError) Reason

Reason function returns reason value.

type AppendEntriesResponse

type AppendEntriesResponse struct {
	RpcHeader      *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	Term           uint64     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	LastLog        uint64     `protobuf:"varint,3,opt,name=last_log,json=lastLog,proto3" json:"last_log,omitempty"`
	Success        bool       `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"`
	NoRetryBackoff bool       `protobuf:"varint,5,opt,name=no_retry_backoff,json=noRetryBackoff,proto3" json:"no_retry_backoff,omitempty"`
	// contains filtered or unexported fields
}

func (*AppendEntriesResponse) Descriptor deprecated

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

Deprecated: Use AppendEntriesResponse.ProtoReflect.Descriptor instead.

func (*AppendEntriesResponse) GetLastLog

func (x *AppendEntriesResponse) GetLastLog() uint64

func (*AppendEntriesResponse) GetNoRetryBackoff

func (x *AppendEntriesResponse) GetNoRetryBackoff() bool

func (*AppendEntriesResponse) GetRpcHeader

func (x *AppendEntriesResponse) GetRpcHeader() *RPCHeader

func (*AppendEntriesResponse) GetSuccess

func (x *AppendEntriesResponse) GetSuccess() bool

func (*AppendEntriesResponse) GetTerm

func (x *AppendEntriesResponse) GetTerm() uint64

func (*AppendEntriesResponse) ProtoMessage

func (*AppendEntriesResponse) ProtoMessage()

func (*AppendEntriesResponse) ProtoReflect

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

func (*AppendEntriesResponse) Reset

func (x *AppendEntriesResponse) Reset()

func (*AppendEntriesResponse) String

func (x *AppendEntriesResponse) String() string

func (*AppendEntriesResponse) Validate

func (m *AppendEntriesResponse) Validate() error

Validate checks the field values on AppendEntriesResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AppendEntriesResponse) ValidateAll

func (m *AppendEntriesResponse) ValidateAll() error

ValidateAll checks the field values on AppendEntriesResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AppendEntriesResponseMultiError, or nil if none found.

type AppendEntriesResponseMultiError

type AppendEntriesResponseMultiError []error

AppendEntriesResponseMultiError is an error wrapping multiple validation errors returned by AppendEntriesResponse.ValidateAll() if the designated constraints aren't met.

func (AppendEntriesResponseMultiError) AllErrors

func (m AppendEntriesResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AppendEntriesResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type AppendEntriesResponseValidationError

type AppendEntriesResponseValidationError struct {
	// contains filtered or unexported fields
}

AppendEntriesResponseValidationError is the validation error returned by AppendEntriesResponse.Validate if the designated constraints aren't met.

func (AppendEntriesResponseValidationError) Cause

Cause function returns cause value.

func (AppendEntriesResponseValidationError) Error

Error satisfies the builtin error interface

func (AppendEntriesResponseValidationError) ErrorName

ErrorName returns error name.

func (AppendEntriesResponseValidationError) Field

Field function returns field value.

func (AppendEntriesResponseValidationError) Key

Key function returns key value.

func (AppendEntriesResponseValidationError) Reason

Reason function returns reason value.

type InstallSnapshotRequest

type InstallSnapshotRequest struct {
	RpcHeader          *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	SnapshotVersion    int64      `protobuf:"varint,11,opt,name=snapshot_version,json=snapshotVersion,proto3" json:"snapshot_version,omitempty"`
	Term               uint64     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Leader             []byte     `protobuf:"bytes,3,opt,name=leader,proto3" json:"leader,omitempty"`
	LastLogIndex       uint64     `protobuf:"varint,4,opt,name=last_log_index,json=lastLogIndex,proto3" json:"last_log_index,omitempty"`
	LastLogTerm        uint64     `protobuf:"varint,5,opt,name=last_log_term,json=lastLogTerm,proto3" json:"last_log_term,omitempty"`
	Peers              []byte     `protobuf:"bytes,6,opt,name=peers,proto3" json:"peers,omitempty"`
	Configuration      []byte     `protobuf:"bytes,7,opt,name=configuration,proto3" json:"configuration,omitempty"`
	ConfigurationIndex uint64     `protobuf:"varint,8,opt,name=configuration_index,json=configurationIndex,proto3" json:"configuration_index,omitempty"`
	Size               int64      `protobuf:"varint,9,opt,name=size,proto3" json:"size,omitempty"`
	Data               []byte     `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

The first InstallSnapshotRequest on the stream contains all the metadata. All further messages contain only data.

func (*InstallSnapshotRequest) Descriptor deprecated

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

Deprecated: Use InstallSnapshotRequest.ProtoReflect.Descriptor instead.

func (*InstallSnapshotRequest) GetConfiguration

func (x *InstallSnapshotRequest) GetConfiguration() []byte

func (*InstallSnapshotRequest) GetConfigurationIndex

func (x *InstallSnapshotRequest) GetConfigurationIndex() uint64

func (*InstallSnapshotRequest) GetData

func (x *InstallSnapshotRequest) GetData() []byte

func (*InstallSnapshotRequest) GetLastLogIndex

func (x *InstallSnapshotRequest) GetLastLogIndex() uint64

func (*InstallSnapshotRequest) GetLastLogTerm

func (x *InstallSnapshotRequest) GetLastLogTerm() uint64

func (*InstallSnapshotRequest) GetLeader

func (x *InstallSnapshotRequest) GetLeader() []byte

func (*InstallSnapshotRequest) GetPeers

func (x *InstallSnapshotRequest) GetPeers() []byte

func (*InstallSnapshotRequest) GetRpcHeader

func (x *InstallSnapshotRequest) GetRpcHeader() *RPCHeader

func (*InstallSnapshotRequest) GetSize

func (x *InstallSnapshotRequest) GetSize() int64

func (*InstallSnapshotRequest) GetSnapshotVersion

func (x *InstallSnapshotRequest) GetSnapshotVersion() int64

func (*InstallSnapshotRequest) GetTerm

func (x *InstallSnapshotRequest) GetTerm() uint64

func (*InstallSnapshotRequest) ProtoMessage

func (*InstallSnapshotRequest) ProtoMessage()

func (*InstallSnapshotRequest) ProtoReflect

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

func (*InstallSnapshotRequest) Reset

func (x *InstallSnapshotRequest) Reset()

func (*InstallSnapshotRequest) String

func (x *InstallSnapshotRequest) String() string

func (*InstallSnapshotRequest) Validate

func (m *InstallSnapshotRequest) Validate() error

Validate checks the field values on InstallSnapshotRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*InstallSnapshotRequest) ValidateAll

func (m *InstallSnapshotRequest) ValidateAll() error

ValidateAll checks the field values on InstallSnapshotRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InstallSnapshotRequestMultiError, or nil if none found.

type InstallSnapshotRequestMultiError

type InstallSnapshotRequestMultiError []error

InstallSnapshotRequestMultiError is an error wrapping multiple validation errors returned by InstallSnapshotRequest.ValidateAll() if the designated constraints aren't met.

func (InstallSnapshotRequestMultiError) AllErrors

func (m InstallSnapshotRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (InstallSnapshotRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type InstallSnapshotRequestValidationError

type InstallSnapshotRequestValidationError struct {
	// contains filtered or unexported fields
}

InstallSnapshotRequestValidationError is the validation error returned by InstallSnapshotRequest.Validate if the designated constraints aren't met.

func (InstallSnapshotRequestValidationError) Cause

Cause function returns cause value.

func (InstallSnapshotRequestValidationError) Error

Error satisfies the builtin error interface

func (InstallSnapshotRequestValidationError) ErrorName

ErrorName returns error name.

func (InstallSnapshotRequestValidationError) Field

Field function returns field value.

func (InstallSnapshotRequestValidationError) Key

Key function returns key value.

func (InstallSnapshotRequestValidationError) Reason

Reason function returns reason value.

type InstallSnapshotResponse

type InstallSnapshotResponse struct {
	RpcHeader *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	Term      uint64     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Success   bool       `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*InstallSnapshotResponse) Descriptor deprecated

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

Deprecated: Use InstallSnapshotResponse.ProtoReflect.Descriptor instead.

func (*InstallSnapshotResponse) GetRpcHeader

func (x *InstallSnapshotResponse) GetRpcHeader() *RPCHeader

func (*InstallSnapshotResponse) GetSuccess

func (x *InstallSnapshotResponse) GetSuccess() bool

func (*InstallSnapshotResponse) GetTerm

func (x *InstallSnapshotResponse) GetTerm() uint64

func (*InstallSnapshotResponse) ProtoMessage

func (*InstallSnapshotResponse) ProtoMessage()

func (*InstallSnapshotResponse) ProtoReflect

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

func (*InstallSnapshotResponse) Reset

func (x *InstallSnapshotResponse) Reset()

func (*InstallSnapshotResponse) String

func (x *InstallSnapshotResponse) String() string

func (*InstallSnapshotResponse) Validate

func (m *InstallSnapshotResponse) Validate() error

Validate checks the field values on InstallSnapshotResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*InstallSnapshotResponse) ValidateAll

func (m *InstallSnapshotResponse) ValidateAll() error

ValidateAll checks the field values on InstallSnapshotResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InstallSnapshotResponseMultiError, or nil if none found.

type InstallSnapshotResponseMultiError

type InstallSnapshotResponseMultiError []error

InstallSnapshotResponseMultiError is an error wrapping multiple validation errors returned by InstallSnapshotResponse.ValidateAll() if the designated constraints aren't met.

func (InstallSnapshotResponseMultiError) AllErrors

func (m InstallSnapshotResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (InstallSnapshotResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type InstallSnapshotResponseValidationError

type InstallSnapshotResponseValidationError struct {
	// contains filtered or unexported fields
}

InstallSnapshotResponseValidationError is the validation error returned by InstallSnapshotResponse.Validate if the designated constraints aren't met.

func (InstallSnapshotResponseValidationError) Cause

Cause function returns cause value.

func (InstallSnapshotResponseValidationError) Error

Error satisfies the builtin error interface

func (InstallSnapshotResponseValidationError) ErrorName

ErrorName returns error name.

func (InstallSnapshotResponseValidationError) Field

Field function returns field value.

func (InstallSnapshotResponseValidationError) Key

Key function returns key value.

func (InstallSnapshotResponseValidationError) Reason

Reason function returns reason value.

type Log

type Log struct {
	Index      uint64                 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Term       uint64                 `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Type       Log_LogType            `protobuf:"varint,3,opt,name=type,proto3,enum=transport.v1.Log_LogType" json:"type,omitempty"`
	Data       []byte                 `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Extensions []byte                 `protobuf:"bytes,5,opt,name=extensions,proto3" json:"extensions,omitempty"`
	AppendedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=appended_at,json=appendedAt,proto3" json:"appended_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

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

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetAppendedAt

func (x *Log) GetAppendedAt() *timestamppb.Timestamp

func (*Log) GetData

func (x *Log) GetData() []byte

func (*Log) GetExtensions

func (x *Log) GetExtensions() []byte

func (*Log) GetIndex

func (x *Log) GetIndex() uint64

func (*Log) GetTerm

func (x *Log) GetTerm() uint64

func (*Log) GetType

func (x *Log) GetType() Log_LogType

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

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

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

func (*Log) Validate

func (m *Log) Validate() error

Validate checks the field values on Log with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Log) ValidateAll

func (m *Log) ValidateAll() error

ValidateAll checks the field values on Log with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LogMultiError, or nil if none found.

type LogMultiError

type LogMultiError []error

LogMultiError is an error wrapping multiple validation errors returned by Log.ValidateAll() if the designated constraints aren't met.

func (LogMultiError) AllErrors

func (m LogMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LogMultiError) Error

func (m LogMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LogValidationError

type LogValidationError struct {
	// contains filtered or unexported fields
}

LogValidationError is the validation error returned by Log.Validate if the designated constraints aren't met.

func (LogValidationError) Cause

func (e LogValidationError) Cause() error

Cause function returns cause value.

func (LogValidationError) Error

func (e LogValidationError) Error() string

Error satisfies the builtin error interface

func (LogValidationError) ErrorName

func (e LogValidationError) ErrorName() string

ErrorName returns error name.

func (LogValidationError) Field

func (e LogValidationError) Field() string

Field function returns field value.

func (LogValidationError) Key

func (e LogValidationError) Key() bool

Key function returns key value.

func (LogValidationError) Reason

func (e LogValidationError) Reason() string

Reason function returns reason value.

type Log_LogType

type Log_LogType int32
const (
	Log_LOG_COMMAND                Log_LogType = 0
	Log_LOG_NOOP                   Log_LogType = 1
	Log_LOG_ADD_PEER_DEPRECATED    Log_LogType = 2
	Log_LOG_REMOVE_PEER_DEPRECATED Log_LogType = 3
	Log_LOG_BARRIER                Log_LogType = 4
	Log_LOG_CONFIGURATION          Log_LogType = 5
)

func (Log_LogType) Descriptor

func (Log_LogType) Enum

func (x Log_LogType) Enum() *Log_LogType

func (Log_LogType) EnumDescriptor deprecated

func (Log_LogType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Log_LogType.Descriptor instead.

func (Log_LogType) Number

func (x Log_LogType) Number() protoreflect.EnumNumber

func (Log_LogType) String

func (x Log_LogType) String() string

func (Log_LogType) Type

type RPCHeader

type RPCHeader struct {
	ProtocolVersion int64  `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	Id              []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Addr            []byte `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
	// contains filtered or unexported fields
}

func (*RPCHeader) Descriptor deprecated

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

Deprecated: Use RPCHeader.ProtoReflect.Descriptor instead.

func (*RPCHeader) GetAddr

func (x *RPCHeader) GetAddr() []byte

func (*RPCHeader) GetId

func (x *RPCHeader) GetId() []byte

func (*RPCHeader) GetProtocolVersion

func (x *RPCHeader) GetProtocolVersion() int64

func (*RPCHeader) ProtoMessage

func (*RPCHeader) ProtoMessage()

func (*RPCHeader) ProtoReflect

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

func (*RPCHeader) Reset

func (x *RPCHeader) Reset()

func (*RPCHeader) String

func (x *RPCHeader) String() string

func (*RPCHeader) Validate

func (m *RPCHeader) Validate() error

Validate checks the field values on RPCHeader with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RPCHeader) ValidateAll

func (m *RPCHeader) ValidateAll() error

ValidateAll checks the field values on RPCHeader with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RPCHeaderMultiError, or nil if none found.

type RPCHeaderMultiError

type RPCHeaderMultiError []error

RPCHeaderMultiError is an error wrapping multiple validation errors returned by RPCHeader.ValidateAll() if the designated constraints aren't met.

func (RPCHeaderMultiError) AllErrors

func (m RPCHeaderMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RPCHeaderMultiError) Error

func (m RPCHeaderMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type RPCHeaderValidationError

type RPCHeaderValidationError struct {
	// contains filtered or unexported fields
}

RPCHeaderValidationError is the validation error returned by RPCHeader.Validate if the designated constraints aren't met.

func (RPCHeaderValidationError) Cause

func (e RPCHeaderValidationError) Cause() error

Cause function returns cause value.

func (RPCHeaderValidationError) Error

func (e RPCHeaderValidationError) Error() string

Error satisfies the builtin error interface

func (RPCHeaderValidationError) ErrorName

func (e RPCHeaderValidationError) ErrorName() string

ErrorName returns error name.

func (RPCHeaderValidationError) Field

func (e RPCHeaderValidationError) Field() string

Field function returns field value.

func (RPCHeaderValidationError) Key

Key function returns key value.

func (RPCHeaderValidationError) Reason

func (e RPCHeaderValidationError) Reason() string

Reason function returns reason value.

type RaftTransportClient

type RaftTransportClient interface {
	// AppendEntriesPipeline opens an AppendEntries message stream.
	AppendEntriesPipeline(ctx context.Context, opts ...grpc.CallOption) (RaftTransport_AppendEntriesPipelineClient, error)
	// AppendEntries performs a single append entries request / response.
	AppendEntries(ctx context.Context, in *AppendEntriesRequest, opts ...grpc.CallOption) (*AppendEntriesResponse, error)
	// RequestVote is the command used by a candidate to ask a Raft peer for a vote in an election.
	RequestVote(ctx context.Context, in *RequestVoteRequest, opts ...grpc.CallOption) (*RequestVoteResponse, error)
	// TimeoutNow is used to start a leadership transfer to the target node.
	TimeoutNow(ctx context.Context, in *TimeoutNowRequest, opts ...grpc.CallOption) (*TimeoutNowResponse, error)
	// InstallSnapshot is the command sent to a Raft peer to bootstrap its log (and state machine) from a snapshot on another peer.
	InstallSnapshot(ctx context.Context, opts ...grpc.CallOption) (RaftTransport_InstallSnapshotClient, error)
}

RaftTransportClient is the client API for RaftTransport service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type RaftTransportServer

type RaftTransportServer interface {
	// AppendEntriesPipeline opens an AppendEntries message stream.
	AppendEntriesPipeline(RaftTransport_AppendEntriesPipelineServer) error
	// AppendEntries performs a single append entries request / response.
	AppendEntries(context.Context, *AppendEntriesRequest) (*AppendEntriesResponse, error)
	// RequestVote is the command used by a candidate to ask a Raft peer for a vote in an election.
	RequestVote(context.Context, *RequestVoteRequest) (*RequestVoteResponse, error)
	// TimeoutNow is used to start a leadership transfer to the target node.
	TimeoutNow(context.Context, *TimeoutNowRequest) (*TimeoutNowResponse, error)
	// InstallSnapshot is the command sent to a Raft peer to bootstrap its log (and state machine) from a snapshot on another peer.
	InstallSnapshot(RaftTransport_InstallSnapshotServer) error
}

RaftTransportServer is the server API for RaftTransport service. All implementations should embed UnimplementedRaftTransportServer for forward compatibility

type RaftTransport_AppendEntriesPipelineClient

type RaftTransport_AppendEntriesPipelineClient interface {
	Send(*AppendEntriesRequest) error
	Recv() (*AppendEntriesResponse, error)
	grpc.ClientStream
}

type RaftTransport_AppendEntriesPipelineServer

type RaftTransport_AppendEntriesPipelineServer interface {
	Send(*AppendEntriesResponse) error
	Recv() (*AppendEntriesRequest, error)
	grpc.ServerStream
}

type RaftTransport_InstallSnapshotClient

type RaftTransport_InstallSnapshotClient interface {
	Send(*InstallSnapshotRequest) error
	CloseAndRecv() (*InstallSnapshotResponse, error)
	grpc.ClientStream
}

type RaftTransport_InstallSnapshotServer

type RaftTransport_InstallSnapshotServer interface {
	SendAndClose(*InstallSnapshotResponse) error
	Recv() (*InstallSnapshotRequest, error)
	grpc.ServerStream
}

type RequestVoteRequest

type RequestVoteRequest struct {
	RpcHeader          *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	Term               uint64     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Candidate          []byte     `protobuf:"bytes,3,opt,name=candidate,proto3" json:"candidate,omitempty"`
	LastLogIndex       uint64     `protobuf:"varint,4,opt,name=last_log_index,json=lastLogIndex,proto3" json:"last_log_index,omitempty"`
	LastLogTerm        uint64     `protobuf:"varint,5,opt,name=last_log_term,json=lastLogTerm,proto3" json:"last_log_term,omitempty"`
	LeadershipTransfer bool       `protobuf:"varint,6,opt,name=leadership_transfer,json=leadershipTransfer,proto3" json:"leadership_transfer,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestVoteRequest) Descriptor deprecated

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

Deprecated: Use RequestVoteRequest.ProtoReflect.Descriptor instead.

func (*RequestVoteRequest) GetCandidate

func (x *RequestVoteRequest) GetCandidate() []byte

func (*RequestVoteRequest) GetLastLogIndex

func (x *RequestVoteRequest) GetLastLogIndex() uint64

func (*RequestVoteRequest) GetLastLogTerm

func (x *RequestVoteRequest) GetLastLogTerm() uint64

func (*RequestVoteRequest) GetLeadershipTransfer

func (x *RequestVoteRequest) GetLeadershipTransfer() bool

func (*RequestVoteRequest) GetRpcHeader

func (x *RequestVoteRequest) GetRpcHeader() *RPCHeader

func (*RequestVoteRequest) GetTerm

func (x *RequestVoteRequest) GetTerm() uint64

func (*RequestVoteRequest) ProtoMessage

func (*RequestVoteRequest) ProtoMessage()

func (*RequestVoteRequest) ProtoReflect

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

func (*RequestVoteRequest) Reset

func (x *RequestVoteRequest) Reset()

func (*RequestVoteRequest) String

func (x *RequestVoteRequest) String() string

func (*RequestVoteRequest) Validate

func (m *RequestVoteRequest) Validate() error

Validate checks the field values on RequestVoteRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RequestVoteRequest) ValidateAll

func (m *RequestVoteRequest) ValidateAll() error

ValidateAll checks the field values on RequestVoteRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RequestVoteRequestMultiError, or nil if none found.

type RequestVoteRequestMultiError

type RequestVoteRequestMultiError []error

RequestVoteRequestMultiError is an error wrapping multiple validation errors returned by RequestVoteRequest.ValidateAll() if the designated constraints aren't met.

func (RequestVoteRequestMultiError) AllErrors

func (m RequestVoteRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RequestVoteRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RequestVoteRequestValidationError

type RequestVoteRequestValidationError struct {
	// contains filtered or unexported fields
}

RequestVoteRequestValidationError is the validation error returned by RequestVoteRequest.Validate if the designated constraints aren't met.

func (RequestVoteRequestValidationError) Cause

Cause function returns cause value.

func (RequestVoteRequestValidationError) Error

Error satisfies the builtin error interface

func (RequestVoteRequestValidationError) ErrorName

ErrorName returns error name.

func (RequestVoteRequestValidationError) Field

Field function returns field value.

func (RequestVoteRequestValidationError) Key

Key function returns key value.

func (RequestVoteRequestValidationError) Reason

Reason function returns reason value.

type RequestVoteResponse

type RequestVoteResponse struct {
	RpcHeader *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	Term      uint64     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Peers     []byte     `protobuf:"bytes,3,opt,name=peers,proto3" json:"peers,omitempty"`
	Granted   bool       `protobuf:"varint,4,opt,name=granted,proto3" json:"granted,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestVoteResponse) Descriptor deprecated

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

Deprecated: Use RequestVoteResponse.ProtoReflect.Descriptor instead.

func (*RequestVoteResponse) GetGranted

func (x *RequestVoteResponse) GetGranted() bool

func (*RequestVoteResponse) GetPeers

func (x *RequestVoteResponse) GetPeers() []byte

func (*RequestVoteResponse) GetRpcHeader

func (x *RequestVoteResponse) GetRpcHeader() *RPCHeader

func (*RequestVoteResponse) GetTerm

func (x *RequestVoteResponse) GetTerm() uint64

func (*RequestVoteResponse) ProtoMessage

func (*RequestVoteResponse) ProtoMessage()

func (*RequestVoteResponse) ProtoReflect

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

func (*RequestVoteResponse) Reset

func (x *RequestVoteResponse) Reset()

func (*RequestVoteResponse) String

func (x *RequestVoteResponse) String() string

func (*RequestVoteResponse) Validate

func (m *RequestVoteResponse) Validate() error

Validate checks the field values on RequestVoteResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RequestVoteResponse) ValidateAll

func (m *RequestVoteResponse) ValidateAll() error

ValidateAll checks the field values on RequestVoteResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RequestVoteResponseMultiError, or nil if none found.

type RequestVoteResponseMultiError

type RequestVoteResponseMultiError []error

RequestVoteResponseMultiError is an error wrapping multiple validation errors returned by RequestVoteResponse.ValidateAll() if the designated constraints aren't met.

func (RequestVoteResponseMultiError) AllErrors

func (m RequestVoteResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RequestVoteResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RequestVoteResponseValidationError

type RequestVoteResponseValidationError struct {
	// contains filtered or unexported fields
}

RequestVoteResponseValidationError is the validation error returned by RequestVoteResponse.Validate if the designated constraints aren't met.

func (RequestVoteResponseValidationError) Cause

Cause function returns cause value.

func (RequestVoteResponseValidationError) Error

Error satisfies the builtin error interface

func (RequestVoteResponseValidationError) ErrorName

ErrorName returns error name.

func (RequestVoteResponseValidationError) Field

Field function returns field value.

func (RequestVoteResponseValidationError) Key

Key function returns key value.

func (RequestVoteResponseValidationError) Reason

Reason function returns reason value.

type TimeoutNowRequest

type TimeoutNowRequest struct {
	RpcHeader *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	// contains filtered or unexported fields
}

func (*TimeoutNowRequest) Descriptor deprecated

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

Deprecated: Use TimeoutNowRequest.ProtoReflect.Descriptor instead.

func (*TimeoutNowRequest) GetRpcHeader

func (x *TimeoutNowRequest) GetRpcHeader() *RPCHeader

func (*TimeoutNowRequest) ProtoMessage

func (*TimeoutNowRequest) ProtoMessage()

func (*TimeoutNowRequest) ProtoReflect

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

func (*TimeoutNowRequest) Reset

func (x *TimeoutNowRequest) Reset()

func (*TimeoutNowRequest) String

func (x *TimeoutNowRequest) String() string

func (*TimeoutNowRequest) Validate

func (m *TimeoutNowRequest) Validate() error

Validate checks the field values on TimeoutNowRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TimeoutNowRequest) ValidateAll

func (m *TimeoutNowRequest) ValidateAll() error

ValidateAll checks the field values on TimeoutNowRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TimeoutNowRequestMultiError, or nil if none found.

type TimeoutNowRequestMultiError

type TimeoutNowRequestMultiError []error

TimeoutNowRequestMultiError is an error wrapping multiple validation errors returned by TimeoutNowRequest.ValidateAll() if the designated constraints aren't met.

func (TimeoutNowRequestMultiError) AllErrors

func (m TimeoutNowRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TimeoutNowRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type TimeoutNowRequestValidationError

type TimeoutNowRequestValidationError struct {
	// contains filtered or unexported fields
}

TimeoutNowRequestValidationError is the validation error returned by TimeoutNowRequest.Validate if the designated constraints aren't met.

func (TimeoutNowRequestValidationError) Cause

Cause function returns cause value.

func (TimeoutNowRequestValidationError) Error

Error satisfies the builtin error interface

func (TimeoutNowRequestValidationError) ErrorName

ErrorName returns error name.

func (TimeoutNowRequestValidationError) Field

Field function returns field value.

func (TimeoutNowRequestValidationError) Key

Key function returns key value.

func (TimeoutNowRequestValidationError) Reason

Reason function returns reason value.

type TimeoutNowResponse

type TimeoutNowResponse struct {
	RpcHeader *RPCHeader `protobuf:"bytes,1,opt,name=rpc_header,json=rpcHeader,proto3" json:"rpc_header,omitempty"`
	// contains filtered or unexported fields
}

func (*TimeoutNowResponse) Descriptor deprecated

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

Deprecated: Use TimeoutNowResponse.ProtoReflect.Descriptor instead.

func (*TimeoutNowResponse) GetRpcHeader

func (x *TimeoutNowResponse) GetRpcHeader() *RPCHeader

func (*TimeoutNowResponse) ProtoMessage

func (*TimeoutNowResponse) ProtoMessage()

func (*TimeoutNowResponse) ProtoReflect

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

func (*TimeoutNowResponse) Reset

func (x *TimeoutNowResponse) Reset()

func (*TimeoutNowResponse) String

func (x *TimeoutNowResponse) String() string

func (*TimeoutNowResponse) Validate

func (m *TimeoutNowResponse) Validate() error

Validate checks the field values on TimeoutNowResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TimeoutNowResponse) ValidateAll

func (m *TimeoutNowResponse) ValidateAll() error

ValidateAll checks the field values on TimeoutNowResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TimeoutNowResponseMultiError, or nil if none found.

type TimeoutNowResponseMultiError

type TimeoutNowResponseMultiError []error

TimeoutNowResponseMultiError is an error wrapping multiple validation errors returned by TimeoutNowResponse.ValidateAll() if the designated constraints aren't met.

func (TimeoutNowResponseMultiError) AllErrors

func (m TimeoutNowResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TimeoutNowResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type TimeoutNowResponseValidationError

type TimeoutNowResponseValidationError struct {
	// contains filtered or unexported fields
}

TimeoutNowResponseValidationError is the validation error returned by TimeoutNowResponse.Validate if the designated constraints aren't met.

func (TimeoutNowResponseValidationError) Cause

Cause function returns cause value.

func (TimeoutNowResponseValidationError) Error

Error satisfies the builtin error interface

func (TimeoutNowResponseValidationError) ErrorName

ErrorName returns error name.

func (TimeoutNowResponseValidationError) Field

Field function returns field value.

func (TimeoutNowResponseValidationError) Key

Key function returns key value.

func (TimeoutNowResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedRaftTransportServer

type UnimplementedRaftTransportServer struct {
}

UnimplementedRaftTransportServer should be embedded to have forward compatible implementations.

func (UnimplementedRaftTransportServer) AppendEntries

func (UnimplementedRaftTransportServer) AppendEntriesPipeline

func (UnimplementedRaftTransportServer) InstallSnapshot

func (UnimplementedRaftTransportServer) RequestVote

func (UnimplementedRaftTransportServer) TimeoutNow

type UnsafeRaftTransportServer

type UnsafeRaftTransportServer interface {
	// contains filtered or unexported methods
}

UnsafeRaftTransportServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RaftTransportServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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