package walpb
import "go.etcd.io/etcd/server/v3/storage/wal/walpb"
Index ¶
- Variables
- func ValidateSnapshotForWrite(e *Snapshot) error
- type Record
- func (*Record) Descriptor() ([]byte, []int)
- 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)
- 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
Variables ¶
var ErrCRCMismatch = errors.New("walpb: crc mismatch")
var File_record_proto protoreflect.FileDescriptor
Functions ¶
func ValidateSnapshotForWrite ¶
func ValidateSnapshotForWrite(e *Snapshot) error
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: Use Record.ProtoReflect.Descriptor instead.
func (*Record) GetCrc ¶
func (*Record) GetData ¶
func (*Record) GetType ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
func (*Record) Reset ¶
func (x *Record) Reset()
func (*Record) String ¶
func (*Record) Validate ¶
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 ¶
func (s *Snapshot) Clone() *Snapshot
Clone returns a deep copy of s, or an empty Snapshot if s is nil.
func (*Snapshot) Descriptor ¶
Deprecated: Use Snapshot.ProtoReflect.Descriptor instead.
func (*Snapshot) GetConfState ¶
func (x *Snapshot) GetConfState() *raftpb.ConfState
func (*Snapshot) GetIndex ¶
func (*Snapshot) GetTerm ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) ProtoReflect ¶
func (x *Snapshot) ProtoReflect() protoreflect.Message
func (*Snapshot) Reset ¶
func (x *Snapshot) Reset()
func (*Snapshot) String ¶
Source Files ¶
record.go record.pb.go
- Version
- v3.7.1 (latest)
- Published
- Jul 23, 2026
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 4 hours ago –
Tools for package owners.