xwalpb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_wal_entry_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type WALEntry

type WALEntry struct {

	// Log Sequence Number
	LSN uint64 `protobuf:"varint,1,opt,name=LSN,proto3" json:"LSN,omitempty"`
	// Actual log data
	Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"`
	// Cyclic Redundant Check
	CRC uint32 `protobuf:"varint,3,opt,name=CRC,proto3" json:"CRC,omitempty"`
	// contains filtered or unexported fields
}

func (*WALEntry) Checksum

func (w *WALEntry) Checksum() (uint32, error)

This function implements a CRC checksum algorithm for a WAL entry. The checksum is calculated over the entire entry, except for the last 4 bytes, which are assumed to be the checksum itself. The implementation uses crc32 ChecksumIEEE as the CRC algorithm.

func (*WALEntry) Descriptor deprecated

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

Deprecated: Use WALEntry.ProtoReflect.Descriptor instead.

func (*WALEntry) GetCRC

func (x *WALEntry) GetCRC() uint32

func (*WALEntry) GetData

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

func (*WALEntry) GetLSN

func (x *WALEntry) GetLSN() uint64

func (*WALEntry) ProtoMessage

func (*WALEntry) ProtoMessage()

func (*WALEntry) ProtoReflect

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

func (*WALEntry) Reset

func (x *WALEntry) Reset()

func (*WALEntry) String

func (x *WALEntry) String() string

Jump to

Keyboard shortcuts

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