raft

package
v0.0.0-...-dde4a86 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KSMType_name = map[int32]string{
		0: "KSM_TYPE_UNSPECIFIED",
		1: "KSM_TYPE_UPDATE_KEY_PIECE",
		2: "KSM_TYPE_NEW_GENERATION",
		3: "KSM_TYPE_OWNER_COMPLETE",
	}
	KSMType_value = map[string]int32{
		"KSM_TYPE_UNSPECIFIED":      0,
		"KSM_TYPE_UPDATE_KEY_PIECE": 1,
		"KSM_TYPE_NEW_GENERATION":   2,
		"KSM_TYPE_OWNER_COMPLETE":   3,
	}
)

Enum value maps for KSMType.

View Source
var (
	ConfigurationType_name = map[int32]string{
		0: "CONFIGURATION_TYPE_UNSPECIFIED",
		1: "CONFIGURATION_TYPE_CURRENT",
		2: "CONFIGURATION_TYPE_FUTURE",
	}
	ConfigurationType_value = map[string]int32{
		"CONFIGURATION_TYPE_UNSPECIFIED": 0,
		"CONFIGURATION_TYPE_CURRENT":     1,
		"CONFIGURATION_TYPE_FUTURE":      2,
	}
)

Enum value maps for ConfigurationType.

View Source
var (
	EntryType_name = map[int32]string{
		0: "ENTRY_TYPE_UNSPECIFIED",
		1: "ENTRY_TYPE_STATE_MACHINE_COMMAND",
		2: "ENTRY_TYPE_CONFIGURATION_CHANGE",
		3: "ENTRY_TYPE_DEMO",
		4: "ENTRY_TYPE_KEY_STATE_COMMAND",
	}
	EntryType_value = map[string]int32{
		"ENTRY_TYPE_UNSPECIFIED":           0,
		"ENTRY_TYPE_STATE_MACHINE_COMMAND": 1,
		"ENTRY_TYPE_CONFIGURATION_CHANGE":  2,
		"ENTRY_TYPE_DEMO":                  3,
		"ENTRY_TYPE_KEY_STATE_COMMAND":     4,
	}
)

Enum value maps for EntryType.

View Source
var File_paranoid_raft_v1_raft_proto protoreflect.FileDescriptor
View Source
var RaftNetworkService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "paranoid.raft.v1.RaftNetworkService",
	HandlerType: (*RaftNetworkServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AppendEntries",
			Handler:    _RaftNetworkService_AppendEntries_Handler,
		},
		{
			MethodName: "RequestVote",
			Handler:    _RaftNetworkService_RequestVote_Handler,
		},
		{
			MethodName: "ClientToLeader",
			Handler:    _RaftNetworkService_ClientToLeader_Handler,
		},
		{
			MethodName: "Snapshot",
			Handler:    _RaftNetworkService_Snapshot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "paranoid/raft/v1/raft.proto",
}

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

Functions

func RegisterRaftNetworkServiceServer

func RegisterRaftNetworkServiceServer(s grpc.ServiceRegistrar, srv RaftNetworkServiceServer)

Types

type AppendEntriesRequest

type AppendEntriesRequest struct {
	Term         uint64   `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`                                       // required
	LeaderId     string   `protobuf:"bytes,2,opt,name=leader_id,json=leaderId,proto3" json:"leader_id,omitempty"`                // required
	PrevLogIndex uint64   `protobuf:"varint,3,opt,name=prev_log_index,json=prevLogIndex,proto3" json:"prev_log_index,omitempty"` // required
	PrevLogTerm  uint64   `protobuf:"varint,4,opt,name=prev_log_term,json=prevLogTerm,proto3" json:"prev_log_term,omitempty"`    // required
	Entries      []*Entry `protobuf:"bytes,5,rep,name=entries,proto3" json:"entries,omitempty"`                                  // optional
	LeaderCommit uint64   `protobuf:"varint,6,opt,name=leader_commit,json=leaderCommit,proto3" json:"leader_commit,omitempty"`   // required
	// 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() []*Entry

func (*AppendEntriesRequest) GetLeaderCommit

func (x *AppendEntriesRequest) GetLeaderCommit() uint64

func (*AppendEntriesRequest) GetLeaderId

func (x *AppendEntriesRequest) GetLeaderId() string

func (*AppendEntriesRequest) GetPrevLogIndex

func (x *AppendEntriesRequest) GetPrevLogIndex() uint64

func (*AppendEntriesRequest) GetPrevLogTerm

func (x *AppendEntriesRequest) GetPrevLogTerm() uint64

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

type AppendEntriesResponse

type AppendEntriesResponse struct {
	Term      uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`                            // required
	NextIndex uint64 `protobuf:"varint,2,opt,name=next_index,json=nextIndex,proto3" json:"next_index,omitempty"` // required
	Success   bool   `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`                      // required
	// contains filtered or unexported fields
}

func (*AppendEntriesResponse) Descriptor deprecated

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

Deprecated: Use AppendEntriesResponse.ProtoReflect.Descriptor instead.

func (*AppendEntriesResponse) GetNextIndex

func (x *AppendEntriesResponse) GetNextIndex() uint64

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

type ClientToLeaderRequest

type ClientToLeaderRequest struct {
	SenderId string `protobuf:"bytes,1,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` // required
	Entry    *Entry `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"`                       // required
	// contains filtered or unexported fields
}

func (*ClientToLeaderRequest) Descriptor deprecated

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

Deprecated: Use ClientToLeaderRequest.ProtoReflect.Descriptor instead.

func (*ClientToLeaderRequest) GetEntry

func (x *ClientToLeaderRequest) GetEntry() *Entry

func (*ClientToLeaderRequest) GetSenderId

func (x *ClientToLeaderRequest) GetSenderId() string

func (*ClientToLeaderRequest) ProtoMessage

func (*ClientToLeaderRequest) ProtoMessage()

func (*ClientToLeaderRequest) ProtoReflect

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

func (*ClientToLeaderRequest) Reset

func (x *ClientToLeaderRequest) Reset()

func (*ClientToLeaderRequest) String

func (x *ClientToLeaderRequest) String() string

type ClientToLeaderResponse

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

func (*ClientToLeaderResponse) Descriptor deprecated

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

Deprecated: Use ClientToLeaderResponse.ProtoReflect.Descriptor instead.

func (*ClientToLeaderResponse) ProtoMessage

func (*ClientToLeaderResponse) ProtoMessage()

func (*ClientToLeaderResponse) ProtoReflect

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

func (*ClientToLeaderResponse) Reset

func (x *ClientToLeaderResponse) Reset()

func (*ClientToLeaderResponse) String

func (x *ClientToLeaderResponse) String() string

type Configuration

type Configuration struct {
	Type  ConfigurationType `protobuf:"varint,1,opt,name=type,proto3,enum=paranoid.raft.v1.ConfigurationType" json:"type,omitempty"` // required
	Nodes []*Node           `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`                                        // required
	// contains filtered or unexported fields
}

func (*Configuration) Descriptor deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetNodes

func (x *Configuration) GetNodes() []*Node

func (*Configuration) GetType

func (x *Configuration) GetType() ConfigurationType

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

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

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type ConfigurationType

type ConfigurationType int32
const (
	ConfigurationType_CONFIGURATION_TYPE_UNSPECIFIED ConfigurationType = 0
	ConfigurationType_CONFIGURATION_TYPE_CURRENT     ConfigurationType = 1
	ConfigurationType_CONFIGURATION_TYPE_FUTURE      ConfigurationType = 2
)

func (ConfigurationType) Descriptor

func (ConfigurationType) Enum

func (ConfigurationType) EnumDescriptor deprecated

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

Deprecated: Use ConfigurationType.Descriptor instead.

func (ConfigurationType) Number

func (ConfigurationType) String

func (x ConfigurationType) String() string

func (ConfigurationType) Type

type DemoCommand

type DemoCommand struct {
	Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // required
	// contains filtered or unexported fields
}

func (*DemoCommand) Descriptor deprecated

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

Deprecated: Use DemoCommand.ProtoReflect.Descriptor instead.

func (*DemoCommand) GetNumber

func (x *DemoCommand) GetNumber() uint64

func (*DemoCommand) ProtoMessage

func (*DemoCommand) ProtoMessage()

func (*DemoCommand) ProtoReflect

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

func (*DemoCommand) Reset

func (x *DemoCommand) Reset()

func (*DemoCommand) String

func (x *DemoCommand) String() string

type EmptyMessage

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

func (*EmptyMessage) Descriptor deprecated

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

Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead.

func (*EmptyMessage) ProtoMessage

func (*EmptyMessage) ProtoMessage()

func (*EmptyMessage) ProtoReflect

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

func (*EmptyMessage) Reset

func (x *EmptyMessage) Reset()

func (*EmptyMessage) String

func (x *EmptyMessage) String() string

type Entry

type Entry struct {
	Type       EntryType            `protobuf:"varint,1,opt,name=type,proto3,enum=paranoid.raft.v1.EntryType" json:"type,omitempty"` // required
	Uuid       string               `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`                                  // required
	Command    *StateMachineCommand `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`                            // optional
	Config     *Configuration       `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`                              // optional
	Demo       *DemoCommand         `protobuf:"bytes,5,opt,name=demo,proto3" json:"demo,omitempty"`                                  // optional
	KeyCommand *KeyStateCommand     `protobuf:"bytes,6,opt,name=key_command,json=keyCommand,proto3" json:"key_command,omitempty"`    // optional
	// contains filtered or unexported fields
}

func (*Entry) Descriptor deprecated

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

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetCommand

func (x *Entry) GetCommand() *StateMachineCommand

func (*Entry) GetConfig

func (x *Entry) GetConfig() *Configuration

func (*Entry) GetDemo

func (x *Entry) GetDemo() *DemoCommand

func (*Entry) GetKeyCommand

func (x *Entry) GetKeyCommand() *KeyStateCommand

func (*Entry) GetType

func (x *Entry) GetType() EntryType

func (*Entry) GetUuid

func (x *Entry) GetUuid() string

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

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

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type EntryType

type EntryType int32
const (
	EntryType_ENTRY_TYPE_UNSPECIFIED           EntryType = 0
	EntryType_ENTRY_TYPE_STATE_MACHINE_COMMAND EntryType = 1
	EntryType_ENTRY_TYPE_CONFIGURATION_CHANGE  EntryType = 2
	EntryType_ENTRY_TYPE_DEMO                  EntryType = 3
	EntryType_ENTRY_TYPE_KEY_STATE_COMMAND     EntryType = 4
)

func (EntryType) Descriptor

func (EntryType) Descriptor() protoreflect.EnumDescriptor

func (EntryType) Enum

func (x EntryType) Enum() *EntryType

func (EntryType) EnumDescriptor deprecated

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

Deprecated: Use EntryType.Descriptor instead.

func (EntryType) Number

func (x EntryType) Number() protoreflect.EnumNumber

func (EntryType) String

func (x EntryType) String() string

func (EntryType) Type

type KSMType

type KSMType int32
const (
	KSMType_KSM_TYPE_UNSPECIFIED      KSMType = 0
	KSMType_KSM_TYPE_UPDATE_KEY_PIECE KSMType = 1
	KSMType_KSM_TYPE_NEW_GENERATION   KSMType = 2
	KSMType_KSM_TYPE_OWNER_COMPLETE   KSMType = 3
)

func (KSMType) Descriptor

func (KSMType) Descriptor() protoreflect.EnumDescriptor

func (KSMType) Enum

func (x KSMType) Enum() *KSMType

func (KSMType) EnumDescriptor deprecated

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

Deprecated: Use KSMType.Descriptor instead.

func (KSMType) Number

func (x KSMType) Number() protoreflect.EnumNumber

func (KSMType) String

func (x KSMType) String() string

func (KSMType) Type

func (KSMType) Type() protoreflect.EnumType

type KeyStateCommand

type KeyStateCommand struct {
	Type KSMType `protobuf:"varint,1,opt,name=type,proto3,enum=paranoid.raft.v1.KSMType" json:"type,omitempty"`
	// UpdateKeyPiece arguments
	KeyOwner   *Node `protobuf:"bytes,2,opt,name=key_owner,json=keyOwner,proto3" json:"key_owner,omitempty"`    // optional
	KeyHolder  *Node `protobuf:"bytes,3,opt,name=key_holder,json=keyHolder,proto3" json:"key_holder,omitempty"` // optional
	Generation int64 `protobuf:"varint,4,opt,name=generation,proto3" json:"generation,omitempty"`               // optional
	// NewGeneration arguments
	NewNode string `protobuf:"bytes,5,opt,name=new_node,json=newNode,proto3" json:"new_node,omitempty"` // optional
	// OwnerCompete arguments
	OwnerComplete string `protobuf:"bytes,6,opt,name=owner_complete,json=ownerComplete,proto3" json:"owner_complete,omitempty"` // optional
	// contains filtered or unexported fields
}

func (*KeyStateCommand) Descriptor deprecated

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

Deprecated: Use KeyStateCommand.ProtoReflect.Descriptor instead.

func (*KeyStateCommand) GetGeneration

func (x *KeyStateCommand) GetGeneration() int64

func (*KeyStateCommand) GetKeyHolder

func (x *KeyStateCommand) GetKeyHolder() *Node

func (*KeyStateCommand) GetKeyOwner

func (x *KeyStateCommand) GetKeyOwner() *Node

func (*KeyStateCommand) GetNewNode

func (x *KeyStateCommand) GetNewNode() string

func (*KeyStateCommand) GetOwnerComplete

func (x *KeyStateCommand) GetOwnerComplete() string

func (*KeyStateCommand) GetType

func (x *KeyStateCommand) GetType() KSMType

func (*KeyStateCommand) ProtoMessage

func (*KeyStateCommand) ProtoMessage()

func (*KeyStateCommand) ProtoReflect

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

func (*KeyStateCommand) Reset

func (x *KeyStateCommand) Reset()

func (*KeyStateCommand) String

func (x *KeyStateCommand) String() string

type LogEntry

type LogEntry struct {
	Term  uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`  // required
	Entry *Entry `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"` // required
	// contains filtered or unexported fields
}

func (*LogEntry) Descriptor deprecated

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

Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.

func (*LogEntry) GetEntry

func (x *LogEntry) GetEntry() *Entry

func (*LogEntry) GetTerm

func (x *LogEntry) GetTerm() uint64

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) ProtoReflect

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

func (*LogEntry) Reset

func (x *LogEntry) Reset()

func (*LogEntry) String

func (x *LogEntry) String() string

type Node

type Node struct {
	Ip         string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`                                   // required
	Port       string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`                               // required
	CommonName string `protobuf:"bytes,3,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"` // required
	NodeId     string `protobuf:"bytes,4,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`             // required
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetCommonName

func (x *Node) GetCommonName() string

func (*Node) GetIp

func (x *Node) GetIp() string

func (*Node) GetNodeId

func (x *Node) GetNodeId() string

func (*Node) GetPort

func (x *Node) GetPort() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type RaftNetworkServiceClient

type RaftNetworkServiceClient interface {
	AppendEntries(ctx context.Context, in *AppendEntriesRequest, opts ...grpc.CallOption) (*AppendEntriesResponse, error)
	RequestVote(ctx context.Context, in *RequestVoteRequest, opts ...grpc.CallOption) (*RequestVoteResponse, error)
	ClientToLeader(ctx context.Context, in *ClientToLeaderRequest, opts ...grpc.CallOption) (*ClientToLeaderResponse, error)
	Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (*SnapshotResponse, error)
}

RaftNetworkServiceClient is the client API for RaftNetworkService 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 RaftNetworkServiceServer

type RaftNetworkServiceServer interface {
	AppendEntries(context.Context, *AppendEntriesRequest) (*AppendEntriesResponse, error)
	RequestVote(context.Context, *RequestVoteRequest) (*RequestVoteResponse, error)
	ClientToLeader(context.Context, *ClientToLeaderRequest) (*ClientToLeaderResponse, error)
	Snapshot(context.Context, *SnapshotRequest) (*SnapshotResponse, error)
	// contains filtered or unexported methods
}

RaftNetworkServiceServer is the server API for RaftNetworkService service. All implementations must embed UnimplementedRaftNetworkServiceServer for forward compatibility

type RequestVoteRequest

type RequestVoteRequest struct {
	Term         uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`                                       // required
	CandidateId  string `protobuf:"bytes,2,opt,name=candidate_id,json=candidateId,proto3" json:"candidate_id,omitempty"`       // required
	LastLogIndex uint64 `protobuf:"varint,3,opt,name=last_log_index,json=lastLogIndex,proto3" json:"last_log_index,omitempty"` // required
	LastLogTerm  uint64 `protobuf:"varint,4,opt,name=last_log_term,json=lastLogTerm,proto3" json:"last_log_term,omitempty"`    // required
	// contains filtered or unexported fields
}

func (*RequestVoteRequest) Descriptor deprecated

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

Deprecated: Use RequestVoteRequest.ProtoReflect.Descriptor instead.

func (*RequestVoteRequest) GetCandidateId

func (x *RequestVoteRequest) GetCandidateId() string

func (*RequestVoteRequest) GetLastLogIndex

func (x *RequestVoteRequest) GetLastLogIndex() uint64

func (*RequestVoteRequest) GetLastLogTerm

func (x *RequestVoteRequest) GetLastLogTerm() uint64

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

type RequestVoteResponse

type RequestVoteResponse struct {
	Term        uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`                                  // required
	VoteGranted bool   `protobuf:"varint,2,opt,name=vote_granted,json=voteGranted,proto3" json:"vote_granted,omitempty"` // required
	// contains filtered or unexported fields
}

func (*RequestVoteResponse) Descriptor deprecated

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

Deprecated: Use RequestVoteResponse.ProtoReflect.Descriptor instead.

func (*RequestVoteResponse) GetTerm

func (x *RequestVoteResponse) GetTerm() uint64

func (*RequestVoteResponse) GetVoteGranted

func (x *RequestVoteResponse) GetVoteGranted() bool

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

type SnapshotRequest

type SnapshotRequest struct {
	Term              uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`                                                      // required
	LeaderId          string `protobuf:"bytes,2,opt,name=leader_id,json=leaderId,proto3" json:"leader_id,omitempty"`                               // required
	LastIncludedIndex uint64 `protobuf:"varint,3,opt,name=last_included_index,json=lastIncludedIndex,proto3" json:"last_included_index,omitempty"` // required
	LastIncludedTerm  uint64 `protobuf:"varint,4,opt,name=last_included_term,json=lastIncludedTerm,proto3" json:"last_included_term,omitempty"`    // required
	Offset            uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`                                                  // required
	Data              []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`                                                       // required
	Done              bool   `protobuf:"varint,7,opt,name=done,proto3" json:"done,omitempty"`                                                      // required
	// contains filtered or unexported fields
}

func (*SnapshotRequest) Descriptor deprecated

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

Deprecated: Use SnapshotRequest.ProtoReflect.Descriptor instead.

func (*SnapshotRequest) GetData

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

func (*SnapshotRequest) GetDone

func (x *SnapshotRequest) GetDone() bool

func (*SnapshotRequest) GetLastIncludedIndex

func (x *SnapshotRequest) GetLastIncludedIndex() uint64

func (*SnapshotRequest) GetLastIncludedTerm

func (x *SnapshotRequest) GetLastIncludedTerm() uint64

func (*SnapshotRequest) GetLeaderId

func (x *SnapshotRequest) GetLeaderId() string

func (*SnapshotRequest) GetOffset

func (x *SnapshotRequest) GetOffset() uint64

func (*SnapshotRequest) GetTerm

func (x *SnapshotRequest) GetTerm() uint64

func (*SnapshotRequest) ProtoMessage

func (*SnapshotRequest) ProtoMessage()

func (*SnapshotRequest) ProtoReflect

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

func (*SnapshotRequest) Reset

func (x *SnapshotRequest) Reset()

func (*SnapshotRequest) String

func (x *SnapshotRequest) String() string

type SnapshotResponse

type SnapshotResponse struct {
	Term uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"` // required
	// contains filtered or unexported fields
}

func (*SnapshotResponse) Descriptor deprecated

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

Deprecated: Use SnapshotResponse.ProtoReflect.Descriptor instead.

func (*SnapshotResponse) GetTerm

func (x *SnapshotResponse) GetTerm() uint64

func (*SnapshotResponse) ProtoMessage

func (*SnapshotResponse) ProtoMessage()

func (*SnapshotResponse) ProtoReflect

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

func (*SnapshotResponse) Reset

func (x *SnapshotResponse) Reset()

func (*SnapshotResponse) String

func (x *SnapshotResponse) String() string

type StateMachineCommand

type StateMachineCommand struct {
	Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // required
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`  // required
	//Used for Write command
	Data   []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`      // optional
	Offset int64  `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` // optional
	//Used for Write and Truncate commands
	Length int64 `protobuf:"varint,5,opt,name=length,proto3" json:"length,omitempty"` // optional
	//Used for Link and Rename commands
	OldPath string `protobuf:"bytes,6,opt,name=old_path,json=oldPath,proto3" json:"old_path,omitempty"` // optional
	NewPath string `protobuf:"bytes,7,opt,name=new_path,json=newPath,proto3" json:"new_path,omitempty"` // optional
	//Used for Create, Chmod and Mkdir commands
	Mode uint32 `protobuf:"varint,8,opt,name=mode,proto3" json:"mode,omitempty"` // optional
	//Used for Utimes command
	AccessSeconds     int64 `protobuf:"varint,9,opt,name=access_seconds,json=accessSeconds,proto3" json:"access_seconds,omitempty"`              // optional
	AccessNanoseconds int64 `protobuf:"varint,10,opt,name=access_nanoseconds,json=accessNanoseconds,proto3" json:"access_nanoseconds,omitempty"` // optional
	ModifySeconds     int64 `protobuf:"varint,11,opt,name=modify_seconds,json=modifySeconds,proto3" json:"modify_seconds,omitempty"`             // optional
	ModifyNanoseconds int64 `protobuf:"varint,12,opt,name=modify_nanoseconds,json=modifyNanoseconds,proto3" json:"modify_nanoseconds,omitempty"` // optional
	// contains filtered or unexported fields
}

func (*StateMachineCommand) Descriptor deprecated

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

Deprecated: Use StateMachineCommand.ProtoReflect.Descriptor instead.

func (*StateMachineCommand) GetAccessNanoseconds

func (x *StateMachineCommand) GetAccessNanoseconds() int64

func (*StateMachineCommand) GetAccessSeconds

func (x *StateMachineCommand) GetAccessSeconds() int64

func (*StateMachineCommand) GetData

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

func (*StateMachineCommand) GetLength

func (x *StateMachineCommand) GetLength() int64

func (*StateMachineCommand) GetMode

func (x *StateMachineCommand) GetMode() uint32

func (*StateMachineCommand) GetModifyNanoseconds

func (x *StateMachineCommand) GetModifyNanoseconds() int64

func (*StateMachineCommand) GetModifySeconds

func (x *StateMachineCommand) GetModifySeconds() int64

func (*StateMachineCommand) GetNewPath

func (x *StateMachineCommand) GetNewPath() string

func (*StateMachineCommand) GetOffset

func (x *StateMachineCommand) GetOffset() int64

func (*StateMachineCommand) GetOldPath

func (x *StateMachineCommand) GetOldPath() string

func (*StateMachineCommand) GetPath

func (x *StateMachineCommand) GetPath() string

func (*StateMachineCommand) GetType

func (x *StateMachineCommand) GetType() uint32

func (*StateMachineCommand) ProtoMessage

func (*StateMachineCommand) ProtoMessage()

func (*StateMachineCommand) ProtoReflect

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

func (*StateMachineCommand) Reset

func (x *StateMachineCommand) Reset()

func (*StateMachineCommand) String

func (x *StateMachineCommand) String() string

type UnimplementedRaftNetworkServiceServer

type UnimplementedRaftNetworkServiceServer struct {
}

UnimplementedRaftNetworkServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRaftNetworkServiceServer) AppendEntries

func (UnimplementedRaftNetworkServiceServer) ClientToLeader

func (UnimplementedRaftNetworkServiceServer) RequestVote

func (UnimplementedRaftNetworkServiceServer) Snapshot

type UnsafeRaftNetworkServiceServer

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

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

Jump to

Keyboard shortcuts

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