Documentation
¶
Index ¶
- Variables
- func ValidateSnapshotForWrite(e *Snapshot) error
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetCrc() uint32
- func (x *Record) GetData() []byte
- func (x *Record) GetType() int64
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- func (rec *Record) Validate(crc uint32) error
- type Snapshot
- func (s *Snapshot) Clone() *Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)deprecated
- func (x *Snapshot) GetConfState() *raftpb.ConfState
- func (x *Snapshot) GetIndex() uint64
- func (x *Snapshot) GetTerm() uint64
- func (*Snapshot) ProtoMessage()
- func (x *Snapshot) ProtoReflect() protoreflect.Message
- func (x *Snapshot) Reset()
- func (x *Snapshot) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCRCMismatch = errors.New("walpb: crc mismatch")
View Source
var File_record_proto protoreflect.FileDescriptor
Functions ¶
func ValidateSnapshotForWrite ¶
ValidateSnapshotForWrite ensures the Snapshot the newly written snapshot is valid.
There might exist log-entries written by old etcd versions that does not conform to the requirements.
Types ¶
type Record ¶
type Record struct {
Type *int64 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"`
Crc *uint32 `protobuf:"varint,2,opt,name=crc" json:"crc,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*Record) Descriptor
deprecated
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶ added in v3.7.0
func (x *Record) ProtoReflect() protoreflect.Message
type Snapshot ¶
type Snapshot struct {
Index *uint64 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
Term *uint64 `protobuf:"varint,2,opt,name=term" json:"term,omitempty"`
// Field populated since >=etcd-3.5.0.
ConfState *raftpb.ConfState `protobuf:"bytes,3,opt,name=conf_state,json=confState" json:"conf_state,omitempty"`
// contains filtered or unexported fields
}
Keep in sync with raftpb.SnapshotMetadata.
func (*Snapshot) Clone ¶ added in v3.7.0
Clone returns a deep copy of s, or an empty Snapshot if s is nil.
func (*Snapshot) Descriptor
deprecated
func (*Snapshot) GetConfState ¶ added in v3.7.0
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) ProtoReflect ¶ added in v3.7.0
func (x *Snapshot) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.