raftpb

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRaft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRaft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRaft = fmt.Errorf("proto: unexpected end of group")
)
View Source
var MemberType_name = map[int32]string{
	0: "voter",
	1: "removed",
	2: "learner",
	3: "staging",
	4: "local",
}
View Source
var MemberType_value = map[string]int32{
	"voter":   0,
	"removed": 1,
	"learner": 2,
	"staging": 3,
	"local":   4,
}
View Source
var SnapshotState_Version_name = map[int32]string{
	0: "V0",
}
View Source
var SnapshotState_Version_value = map[string]int32{
	"V0": 0,
}

Functions

This section is empty.

Types

type JoinResponse

type JoinResponse struct {
	// ID specifies the ID assigned to the new member..
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Members specifies the cluster pool members.
	Members              []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JoinResponse) Descriptor

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

func (*JoinResponse) Marshal

func (m *JoinResponse) Marshal() (dAtA []byte, err error)

func (*JoinResponse) MarshalTo

func (m *JoinResponse) MarshalTo(dAtA []byte) (int, error)

func (*JoinResponse) MarshalToSizedBuffer

func (m *JoinResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*JoinResponse) ProtoMessage

func (*JoinResponse) ProtoMessage()

func (*JoinResponse) Reset

func (m *JoinResponse) Reset()

func (*JoinResponse) Size

func (m *JoinResponse) Size() (n int)

func (*JoinResponse) String

func (m *JoinResponse) String() string

func (*JoinResponse) Unmarshal

func (m *JoinResponse) Unmarshal(dAtA []byte) error

func (*JoinResponse) XXX_DiscardUnknown

func (m *JoinResponse) XXX_DiscardUnknown()

func (*JoinResponse) XXX_Marshal

func (m *JoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JoinResponse) XXX_Merge

func (m *JoinResponse) XXX_Merge(src proto.Message)

func (*JoinResponse) XXX_Size

func (m *JoinResponse) XXX_Size() int

func (*JoinResponse) XXX_Unmarshal

func (m *JoinResponse) XXX_Unmarshal(b []byte) error

type Member

type Member struct {
	// ID specifies the cluster member id.
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Address specifies the address of the cluster member.
	Address string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	// Type used to distinguish members (local, remote, etc).
	Type MemberType `protobuf:"varint,3,opt,name=type,proto3,enum=raftpb.MemberType" json:"type,omitempty"`
	// Context is treated as an opaque payload and can be used to
	// attach an extra info/data on member.
	Context              []byte   `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Member) Descriptor

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

func (*Member) Marshal

func (m *Member) Marshal() (dAtA []byte, err error)

func (*Member) MarshalTo

func (m *Member) MarshalTo(dAtA []byte) (int, error)

func (*Member) MarshalToSizedBuffer

func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) Size

func (m *Member) Size() (n int)

func (*Member) String

func (m *Member) String() string

func (*Member) Unmarshal

func (m *Member) Unmarshal(dAtA []byte) error

func (*Member) XXX_DiscardUnknown

func (m *Member) XXX_DiscardUnknown()

func (*Member) XXX_Marshal

func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Member) XXX_Merge

func (m *Member) XXX_Merge(src proto.Message)

func (*Member) XXX_Size

func (m *Member) XXX_Size() int

func (*Member) XXX_Unmarshal

func (m *Member) XXX_Unmarshal(b []byte) error

type MemberType

type MemberType int32
const (
	VoterMember   MemberType = 0
	RemovedMember MemberType = 1
	LearnerMember MemberType = 2
	StagingMember MemberType = 3
	LocalMember   MemberType = 4
)

func (MemberType) EnumDescriptor

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

func (MemberType) String

func (x MemberType) String() string

type Replicate

type Replicate struct {
	// CID specifies the transaction change id.
	CID uint64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"`
	// Data specifies the raw replicate data.
	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Replicate) Descriptor

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

func (*Replicate) Marshal

func (m *Replicate) Marshal() (dAtA []byte, err error)

func (*Replicate) MarshalTo

func (m *Replicate) MarshalTo(dAtA []byte) (int, error)

func (*Replicate) MarshalToSizedBuffer

func (m *Replicate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Replicate) ProtoMessage

func (*Replicate) ProtoMessage()

func (*Replicate) Reset

func (m *Replicate) Reset()

func (*Replicate) Size

func (m *Replicate) Size() (n int)

func (*Replicate) String

func (m *Replicate) String() string

func (*Replicate) Unmarshal

func (m *Replicate) Unmarshal(dAtA []byte) error

func (*Replicate) XXX_DiscardUnknown

func (m *Replicate) XXX_DiscardUnknown()

func (*Replicate) XXX_Marshal

func (m *Replicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Replicate) XXX_Merge

func (m *Replicate) XXX_Merge(src proto.Message)

func (*Replicate) XXX_Size

func (m *Replicate) XXX_Size() int

func (*Replicate) XXX_Unmarshal

func (m *Replicate) XXX_Unmarshal(b []byte) error

type SnapshotState

type SnapshotState struct {
	// CRC specifies the snapshot crc sum.
	CRC []byte `protobuf:"bytes,1,opt,name=CRC,proto3" json:"CRC,omitempty"`
	// Version specifies the snapshot file version.
	Version SnapshotState_Version `protobuf:"varint,2,opt,name=version,proto3,enum=raftpb.SnapshotState_Version" json:"version,omitempty"`
	// Members specifies the cluster pool members.
	Members []Member `protobuf:"bytes,3,rep,name=members,proto3" json:"members"`
	// Raw specifies the the etcd raftpb snapshot.
	Raw                  raftpb.Snapshot `protobuf:"bytes,4,opt,name=Raw,proto3" json:"Raw"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*SnapshotState) Descriptor

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

func (*SnapshotState) Marshal

func (m *SnapshotState) Marshal() (dAtA []byte, err error)

func (*SnapshotState) MarshalTo

func (m *SnapshotState) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotState) MarshalToSizedBuffer

func (m *SnapshotState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SnapshotState) ProtoMessage

func (*SnapshotState) ProtoMessage()

func (*SnapshotState) Reset

func (m *SnapshotState) Reset()

func (*SnapshotState) Size

func (m *SnapshotState) Size() (n int)

func (*SnapshotState) String

func (m *SnapshotState) String() string

func (*SnapshotState) Unmarshal

func (m *SnapshotState) Unmarshal(dAtA []byte) error

func (*SnapshotState) XXX_DiscardUnknown

func (m *SnapshotState) XXX_DiscardUnknown()

func (*SnapshotState) XXX_Marshal

func (m *SnapshotState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapshotState) XXX_Merge

func (m *SnapshotState) XXX_Merge(src proto.Message)

func (*SnapshotState) XXX_Size

func (m *SnapshotState) XXX_Size() int

func (*SnapshotState) XXX_Unmarshal

func (m *SnapshotState) XXX_Unmarshal(b []byte) error

type SnapshotState_Version

type SnapshotState_Version int32

Version represents the snapshot file version.

const (
	// V0 is the initial version of the snapshot file.
	V0 SnapshotState_Version = 0
)

func (SnapshotState_Version) EnumDescriptor

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

func (SnapshotState_Version) String

func (x SnapshotState_Version) String() string

Jump to

Keyboard shortcuts

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