// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v3.20.3 // source: kevo/replication.proto package replication_proto import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // FragmentType indicates how a WAL entry is fragmented across multiple messages. type FragmentType int32 const ( // A complete, unfragmented entry FragmentType_FULL FragmentType = 0 // The first fragment of a multi-fragment entry FragmentType_FIRST FragmentType = 1 // A middle fragment of a multi-fragment entry FragmentType_MIDDLE FragmentType = 2 // The last fragment of a multi-fragment entry FragmentType_LAST FragmentType = 3 ) // Enum value maps for FragmentType. var ( FragmentType_name = map[int32]string{ 0: "FULL", 1: "FIRST", 2: "MIDDLE", 3: "LAST", } FragmentType_value = map[string]int32{ "FULL": 0, "FIRST": 1, "MIDDLE": 2, "LAST": 3, } ) func (x FragmentType) Enum() *FragmentType { p := new(FragmentType) *p = x return p } func (x FragmentType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FragmentType) Descriptor() protoreflect.EnumDescriptor { return file_kevo_replication_proto_enumTypes[0].Descriptor() } func (FragmentType) Type() protoreflect.EnumType { return &file_kevo_replication_proto_enumTypes[0] } func (x FragmentType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use FragmentType.Descriptor instead. func (FragmentType) EnumDescriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{0} } // CompressionCodec defines the supported compression algorithms. type CompressionCodec int32 const ( // No compression CompressionCodec_NONE CompressionCodec = 0 // ZSTD compression algorithm CompressionCodec_ZSTD CompressionCodec = 1 // Snappy compression algorithm CompressionCodec_SNAPPY CompressionCodec = 2 ) // Enum value maps for CompressionCodec. var ( CompressionCodec_name = map[int32]string{ 0: "NONE", 1: "ZSTD", 2: "SNAPPY", } CompressionCodec_value = map[string]int32{ "NONE": 0, "ZSTD": 1, "SNAPPY": 2, } ) func (x CompressionCodec) Enum() *CompressionCodec { p := new(CompressionCodec) *p = x return p } func (x CompressionCodec) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CompressionCodec) Descriptor() protoreflect.EnumDescriptor { return file_kevo_replication_proto_enumTypes[1].Descriptor() } func (CompressionCodec) Type() protoreflect.EnumType { return &file_kevo_replication_proto_enumTypes[1] } func (x CompressionCodec) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use CompressionCodec.Descriptor instead. func (CompressionCodec) EnumDescriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{1} } // WALStreamRequest is sent by replicas to initiate or resume WAL streaming. type WALStreamRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // The sequence number to start streaming from (exclusive) StartSequence uint64 `protobuf:"varint,1,opt,name=start_sequence,json=startSequence,proto3" json:"start_sequence,omitempty"` // Protocol version for negotiation and backward compatibility ProtocolVersion uint32 `protobuf:"varint,2,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` // Whether the replica supports compressed payloads CompressionSupported bool `protobuf:"varint,3,opt,name=compression_supported,json=compressionSupported,proto3" json:"compression_supported,omitempty"` // Preferred compression codec PreferredCodec CompressionCodec `protobuf:"varint,4,opt,name=preferred_codec,json=preferredCodec,proto3,enum=kevo.replication.CompressionCodec" json:"preferred_codec,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *WALStreamRequest) Reset() { *x = WALStreamRequest{} mi := &file_kevo_replication_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *WALStreamRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*WALStreamRequest) ProtoMessage() {} func (x *WALStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WALStreamRequest.ProtoReflect.Descriptor instead. func (*WALStreamRequest) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{0} } func (x *WALStreamRequest) GetStartSequence() uint64 { if x != nil { return x.StartSequence } return 0 } func (x *WALStreamRequest) GetProtocolVersion() uint32 { if x != nil { return x.ProtocolVersion } return 0 } func (x *WALStreamRequest) GetCompressionSupported() bool { if x != nil { return x.CompressionSupported } return false } func (x *WALStreamRequest) GetPreferredCodec() CompressionCodec { if x != nil { return x.PreferredCodec } return CompressionCodec_NONE } // WALStreamResponse contains a batch of WAL entries sent from the primary to a replica. type WALStreamResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // The batch of WAL entries being streamed Entries []*WALEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // Whether the payload is compressed Compressed bool `protobuf:"varint,2,opt,name=compressed,proto3" json:"compressed,omitempty"` // The compression codec used if compressed is true Codec CompressionCodec `protobuf:"varint,3,opt,name=codec,proto3,enum=kevo.replication.CompressionCodec" json:"codec,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *WALStreamResponse) Reset() { *x = WALStreamResponse{} mi := &file_kevo_replication_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *WALStreamResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*WALStreamResponse) ProtoMessage() {} func (x *WALStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WALStreamResponse.ProtoReflect.Descriptor instead. func (*WALStreamResponse) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{1} } func (x *WALStreamResponse) GetEntries() []*WALEntry { if x != nil { return x.Entries } return nil } func (x *WALStreamResponse) GetCompressed() bool { if x != nil { return x.Compressed } return false } func (x *WALStreamResponse) GetCodec() CompressionCodec { if x != nil { return x.Codec } return CompressionCodec_NONE } // WALEntry represents a single entry from the WAL. type WALEntry struct { state protoimpl.MessageState `protogen:"open.v1"` // The unique, monotonically increasing sequence number (Lamport clock) SequenceNumber uint64 `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` // The serialized entry data Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // The fragment type for handling large entries that span multiple messages FragmentType FragmentType `protobuf:"varint,3,opt,name=fragment_type,json=fragmentType,proto3,enum=kevo.replication.FragmentType" json:"fragment_type,omitempty"` // CRC32 checksum of the payload for data integrity verification Checksum uint32 `protobuf:"varint,4,opt,name=checksum,proto3" json:"checksum,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *WALEntry) Reset() { *x = WALEntry{} mi := &file_kevo_replication_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *WALEntry) String() string { return protoimpl.X.MessageStringOf(x) } func (*WALEntry) ProtoMessage() {} func (x *WALEntry) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WALEntry.ProtoReflect.Descriptor instead. func (*WALEntry) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{2} } func (x *WALEntry) GetSequenceNumber() uint64 { if x != nil { return x.SequenceNumber } return 0 } func (x *WALEntry) GetPayload() []byte { if x != nil { return x.Payload } return nil } func (x *WALEntry) GetFragmentType() FragmentType { if x != nil { return x.FragmentType } return FragmentType_FULL } func (x *WALEntry) GetChecksum() uint32 { if x != nil { return x.Checksum } return 0 } // Ack is sent by replicas to acknowledge successful application and persistence // of WAL entries up to a specific sequence number. type Ack struct { state protoimpl.MessageState `protogen:"open.v1"` // The highest sequence number that has been successfully // applied and persisted by the replica AcknowledgedUpTo uint64 `protobuf:"varint,1,opt,name=acknowledged_up_to,json=acknowledgedUpTo,proto3" json:"acknowledged_up_to,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Ack) Reset() { *x = Ack{} mi := &file_kevo_replication_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Ack) String() string { return protoimpl.X.MessageStringOf(x) } func (*Ack) ProtoMessage() {} func (x *Ack) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Ack.ProtoReflect.Descriptor instead. func (*Ack) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{3} } func (x *Ack) GetAcknowledgedUpTo() uint64 { if x != nil { return x.AcknowledgedUpTo } return 0 } // AckResponse is sent by the primary in response to an Ack message. type AckResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Whether the acknowledgment was processed successfully Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // An optional message providing additional details Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *AckResponse) Reset() { *x = AckResponse{} mi := &file_kevo_replication_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *AckResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*AckResponse) ProtoMessage() {} func (x *AckResponse) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AckResponse.ProtoReflect.Descriptor instead. func (*AckResponse) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{4} } func (x *AckResponse) GetSuccess() bool { if x != nil { return x.Success } return false } func (x *AckResponse) GetMessage() string { if x != nil { return x.Message } return "" } // Nack (Negative Acknowledgement) is sent by replicas when they detect // a gap in sequence numbers, requesting retransmission from a specific sequence. type Nack struct { state protoimpl.MessageState `protogen:"open.v1"` // The sequence number from which to resend WAL entries MissingFromSequence uint64 `protobuf:"varint,1,opt,name=missing_from_sequence,json=missingFromSequence,proto3" json:"missing_from_sequence,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Nack) Reset() { *x = Nack{} mi := &file_kevo_replication_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Nack) String() string { return protoimpl.X.MessageStringOf(x) } func (*Nack) ProtoMessage() {} func (x *Nack) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Nack.ProtoReflect.Descriptor instead. func (*Nack) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{5} } func (x *Nack) GetMissingFromSequence() uint64 { if x != nil { return x.MissingFromSequence } return 0 } // NackResponse is sent by the primary in response to a Nack message. type NackResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Whether the negative acknowledgment was processed successfully Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // An optional message providing additional details Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *NackResponse) Reset() { *x = NackResponse{} mi := &file_kevo_replication_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *NackResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*NackResponse) ProtoMessage() {} func (x *NackResponse) ProtoReflect() protoreflect.Message { mi := &file_kevo_replication_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use NackResponse.ProtoReflect.Descriptor instead. func (*NackResponse) Descriptor() ([]byte, []int) { return file_kevo_replication_proto_rawDescGZIP(), []int{6} } func (x *NackResponse) GetSuccess() bool { if x != nil { return x.Success } return false } func (x *NackResponse) GetMessage() string { if x != nil { return x.Message } return "" } var File_kevo_replication_proto protoreflect.FileDescriptor const file_kevo_replication_proto_rawDesc = "" + "\n" + "\x16kevo/replication.proto\x12\x10kevo.replication\"\xe6\x01\n" + "\x10WALStreamRequest\x12%\n" + "\x0estart_sequence\x18\x01 \x01(\x04R\rstartSequence\x12)\n" + "\x10protocol_version\x18\x02 \x01(\rR\x0fprotocolVersion\x123\n" + "\x15compression_supported\x18\x03 \x01(\bR\x14compressionSupported\x12K\n" + "\x0fpreferred_codec\x18\x04 \x01(\x0e2\".kevo.replication.CompressionCodecR\x0epreferredCodec\"\xa3\x01\n" + "\x11WALStreamResponse\x124\n" + "\aentries\x18\x01 \x03(\v2\x1a.kevo.replication.WALEntryR\aentries\x12\x1e\n" + "\n" + "compressed\x18\x02 \x01(\bR\n" + "compressed\x128\n" + "\x05codec\x18\x03 \x01(\x0e2\".kevo.replication.CompressionCodecR\x05codec\"\xae\x01\n" + "\bWALEntry\x12'\n" + "\x0fsequence_number\x18\x01 \x01(\x04R\x0esequenceNumber\x12\x18\n" + "\apayload\x18\x02 \x01(\fR\apayload\x12C\n" + "\rfragment_type\x18\x03 \x01(\x0e2\x1e.kevo.replication.FragmentTypeR\ffragmentType\x12\x1a\n" + "\bchecksum\x18\x04 \x01(\rR\bchecksum\"3\n" + "\x03Ack\x12,\n" + "\x12acknowledged_up_to\x18\x01 \x01(\x04R\x10acknowledgedUpTo\"A\n" + "\vAckResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage\":\n" + "\x04Nack\x122\n" + "\x15missing_from_sequence\x18\x01 \x01(\x04R\x13missingFromSequence\"B\n" + "\fNackResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage*9\n" + "\fFragmentType\x12\b\n" + "\x04FULL\x10\x00\x12\t\n" + "\x05FIRST\x10\x01\x12\n" + "\n" + "\x06MIDDLE\x10\x02\x12\b\n" + "\x04LAST\x10\x03*2\n" + "\x10CompressionCodec\x12\b\n" + "\x04NONE\x10\x00\x12\b\n" + "\x04ZSTD\x10\x01\x12\n" + "\n" + "\x06SNAPPY\x10\x022\x83\x02\n" + "\x15WALReplicationService\x12V\n" + "\tStreamWAL\x12\".kevo.replication.WALStreamRequest\x1a#.kevo.replication.WALStreamResponse0\x01\x12C\n" + "\vAcknowledge\x12\x15.kevo.replication.Ack\x1a\x1d.kevo.replication.AckResponse\x12M\n" + "\x13NegativeAcknowledge\x12\x16.kevo.replication.Nack\x1a\x1e.kevo.replication.NackResponseB@Z>github.com/KevoDB/kevo/pkg/replication/proto;replication_protob\x06proto3" var ( file_kevo_replication_proto_rawDescOnce sync.Once file_kevo_replication_proto_rawDescData []byte ) func file_kevo_replication_proto_rawDescGZIP() []byte { file_kevo_replication_proto_rawDescOnce.Do(func() { file_kevo_replication_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kevo_replication_proto_rawDesc), len(file_kevo_replication_proto_rawDesc))) }) return file_kevo_replication_proto_rawDescData } var file_kevo_replication_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_kevo_replication_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_kevo_replication_proto_goTypes = []any{ (FragmentType)(0), // 0: kevo.replication.FragmentType (CompressionCodec)(0), // 1: kevo.replication.CompressionCodec (*WALStreamRequest)(nil), // 2: kevo.replication.WALStreamRequest (*WALStreamResponse)(nil), // 3: kevo.replication.WALStreamResponse (*WALEntry)(nil), // 4: kevo.replication.WALEntry (*Ack)(nil), // 5: kevo.replication.Ack (*AckResponse)(nil), // 6: kevo.replication.AckResponse (*Nack)(nil), // 7: kevo.replication.Nack (*NackResponse)(nil), // 8: kevo.replication.NackResponse } var file_kevo_replication_proto_depIdxs = []int32{ 1, // 0: kevo.replication.WALStreamRequest.preferred_codec:type_name -> kevo.replication.CompressionCodec 4, // 1: kevo.replication.WALStreamResponse.entries:type_name -> kevo.replication.WALEntry 1, // 2: kevo.replication.WALStreamResponse.codec:type_name -> kevo.replication.CompressionCodec 0, // 3: kevo.replication.WALEntry.fragment_type:type_name -> kevo.replication.FragmentType 2, // 4: kevo.replication.WALReplicationService.StreamWAL:input_type -> kevo.replication.WALStreamRequest 5, // 5: kevo.replication.WALReplicationService.Acknowledge:input_type -> kevo.replication.Ack 7, // 6: kevo.replication.WALReplicationService.NegativeAcknowledge:input_type -> kevo.replication.Nack 3, // 7: kevo.replication.WALReplicationService.StreamWAL:output_type -> kevo.replication.WALStreamResponse 6, // 8: kevo.replication.WALReplicationService.Acknowledge:output_type -> kevo.replication.AckResponse 8, // 9: kevo.replication.WALReplicationService.NegativeAcknowledge:output_type -> kevo.replication.NackResponse 7, // [7:10] is the sub-list for method output_type 4, // [4:7] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_kevo_replication_proto_init() } func file_kevo_replication_proto_init() { if File_kevo_replication_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_kevo_replication_proto_rawDesc), len(file_kevo_replication_proto_rawDesc)), NumEnums: 2, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, GoTypes: file_kevo_replication_proto_goTypes, DependencyIndexes: file_kevo_replication_proto_depIdxs, EnumInfos: file_kevo_replication_proto_enumTypes, MessageInfos: file_kevo_replication_proto_msgTypes, }.Build() File_kevo_replication_proto = out.File file_kevo_replication_proto_goTypes = nil file_kevo_replication_proto_depIdxs = nil }