From 53ce3477ccff25e03a2aabe85311c0c34cac49cf Mon Sep 17 00:00:00 2001 From: asbjorn Date: Mon, 13 Jan 2025 13:07:48 +0100 Subject: [PATCH 01/10] added editions support and updated storage example to edition2023 --- cmd/protoc-gen-gorums/main.go | 15 ++- examples/go.mod | 2 +- examples/go.sum | 4 +- examples/storage/proto/storage.pb.go | 103 ++++++++++---------- examples/storage/proto/storage.proto | 14 +-- examples/storage/proto/storage_gorums.pb.go | 2 +- go.mod | 2 +- go.sum | 4 +- 8 files changed, 77 insertions(+), 69 deletions(-) diff --git a/cmd/protoc-gen-gorums/main.go b/cmd/protoc-gen-gorums/main.go index b4b5be120..d7e447f48 100644 --- a/cmd/protoc-gen-gorums/main.go +++ b/cmd/protoc-gen-gorums/main.go @@ -11,14 +11,17 @@ import ( "github.com/relab/gorums/internal/version" "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/pluginpb" ) const ( - bundleLen = len("--bundle=") - genGorumsDocURL = "https://github.com/relab/gorums/blob/master/doc/user-guide.md" - genGoDocURL = "https://developers.google.com/protocol-buffers/docs/reference/go-generated" - supportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) + bundleLen = len("--bundle=") + genGorumsDocURL = "https://github.com/relab/gorums/blob/master/doc/user-guide.md" + genGoDocURL = "https://developers.google.com/protocol-buffers/docs/reference/go-generated" + supportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) | uint64(pluginpb.CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS) + supportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2 + supportedEditionsMaximum = descriptorpb.Edition_EDITION_2023 ) func main() { @@ -51,6 +54,9 @@ func main() { ) opts.Run(func(gen *protogen.Plugin) error { + gen.SupportedFeatures = supportedFeatures + gen.SupportedEditionsMinimum = supportedEditionsMinimum + gen.SupportedEditionsMaximum = supportedEditionsMaximum for _, f := range gen.Files { if f.Generate { switch { @@ -61,7 +67,6 @@ func main() { } } } - gen.SupportedFeatures = supportedFeatures return nil }) } diff --git a/examples/go.mod b/examples/go.mod index 2342412b3..eb20b0b25 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -7,7 +7,7 @@ require ( github.com/relab/gorums v0.7.0 golang.org/x/term v0.18.0 google.golang.org/grpc v1.62.1 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.0 ) require ( diff --git a/examples/go.sum b/examples/go.sum index 48e139407..d366953b1 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -24,5 +24,5 @@ google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/examples/storage/proto/storage.pb.go b/examples/storage/proto/storage.pb.go index 7a42e148e..9f48bfddb 100644 --- a/examples/storage/proto/storage.pb.go +++ b/examples/storage/proto/storage.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.34.0 +// protoc v5.29.2 // source: storage/proto/storage.proto package proto @@ -28,7 +28,7 @@ type ReadRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` } func (x *ReadRequest) Reset() { @@ -75,9 +75,9 @@ type ReadResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - OK bool `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"` - Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time,proto3" json:"Time,omitempty"` + OK bool `protobuf:"varint,1,opt,name=OK" json:"OK,omitempty"` + Value string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time" json:"Time,omitempty"` } func (x *ReadResponse) Reset() { @@ -138,9 +138,9 @@ type WriteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time,proto3" json:"Time,omitempty"` + Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time" json:"Time,omitempty"` } func (x *WriteRequest) Reset() { @@ -201,7 +201,7 @@ type WriteResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - New bool `protobuf:"varint,1,opt,name=New,proto3" json:"New,omitempty"` + New bool `protobuf:"varint,1,opt,name=New" json:"New,omitempty"` } func (x *WriteResponse) Reset() { @@ -253,48 +253,51 @@ var file_storage_proto_storage_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x4b, 0x65, 0x79, 0x22, 0x64, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x4b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x02, 0x4f, 0x4b, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x0c, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x21, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x03, 0x4e, 0x65, 0x77, 0x32, 0xc4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x12, 0x38, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x52, 0x50, 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, + 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, + 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x22, 0x72, 0x0a, 0x0c, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x02, 0x4f, 0x4b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x02, 0x4f, + 0x4b, 0x12, 0x1b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, + 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x74, + 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x01, 0x02, + 0x08, 0x02, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x03, 0x4e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x03, 0x4e, 0x65, 0x77, 0x32, 0xc4, + 0x02, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x50, 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x50, 0x43, + 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x51, 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x50, 0x43, 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x51, - 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, - 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x57, 0x72, 0x69, 0x74, 0x65, 0x51, 0x43, 0x12, - 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, - 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x45, 0x0a, 0x0e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, - 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3e, + 0x0a, 0x07, 0x57, 0x72, 0x69, 0x74, 0x65, 0x51, 0x43, 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x45, + 0x0a, 0x0e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x04, 0x98, 0xb5, 0x18, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, + 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/examples/storage/proto/storage.proto b/examples/storage/proto/storage.proto index 26e9fbf4f..19da3a902 100644 --- a/examples/storage/proto/storage.proto +++ b/examples/storage/proto/storage.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package storage; @@ -29,18 +29,18 @@ service Storage { } } -message ReadRequest { string Key = 1; } +message ReadRequest { string Key = 1 [features.field_presence = IMPLICIT]; } message ReadResponse { - bool OK = 1; - string Value = 2; + bool OK = 1 [features.field_presence = IMPLICIT]; + string Value = 2 [features.field_presence = IMPLICIT]; google.protobuf.Timestamp Time = 3; } message WriteRequest { - string Key = 1; - string Value = 2; + string Key = 1 [features.field_presence = IMPLICIT]; + string Value = 2 [features.field_presence = IMPLICIT]; google.protobuf.Timestamp Time = 3; } -message WriteResponse { bool New = 1; } +message WriteResponse { bool New = 1 [features.field_presence = IMPLICIT]; } diff --git a/examples/storage/proto/storage_gorums.pb.go b/examples/storage/proto/storage_gorums.pb.go index 62680263e..07338f450 100644 --- a/examples/storage/proto/storage_gorums.pb.go +++ b/examples/storage/proto/storage_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: storage/proto/storage.proto package proto diff --git a/go.mod b/go.mod index 6a136d2b1..fcf99ca5d 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 google.golang.org/grpc v1.62.1 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.0 ) require ( diff --git a/go.sum b/go.sum index 40b66267e..a4a3eba27 100644 --- a/go.sum +++ b/go.sum @@ -20,5 +20,5 @@ google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= From e2e2545bc70cebd2c456d9eb6f8f30982b197a1b Mon Sep 17 00:00:00 2001 From: asbjorn Date: Wed, 29 Jan 2025 13:17:47 +0100 Subject: [PATCH 02/10] moving to editions 2023 with hybrid protobuf api --- Makefile | 11 +- async.go | 2 +- benchmark/benchmark.go | 22 +- benchmark/benchmark.pb.go | 486 ++++++------ benchmark/benchmark_gorums.pb.go | 2 +- benchmark/benchmark_protoopaque.pb.go | 736 ++++++++++++++++++ benchmark/qspec.go | 34 +- benchmark/server.go | 6 +- benchmark/stats.go | 26 +- channel.go | 12 +- cmd/benchmark/main.go | 10 +- cmd/protoc-gen-gorums/dev/zorums.pb.go | 179 ++--- .../dev/zorums_async_gorums.pb.go | 2 +- .../dev/zorums_correctable_gorums.pb.go | 2 +- .../dev/zorums_multicast_gorums.pb.go | 2 +- .../dev/zorums_protoopaque.pb.go | 456 +++++++++++ .../dev/zorums_qspec_gorums.pb.go | 2 +- .../dev/zorums_quorumcall_gorums.pb.go | 2 +- .../dev/zorums_rpc_gorums.pb.go | 2 +- .../dev/zorums_server_gorums.pb.go | 2 +- .../dev/zorums_types_gorums.pb.go | 2 +- .../dev/zorums_unicast_gorums.pb.go | 2 +- correctable.go | 4 +- encoding.go | 2 +- examples/Makefile | 1 + examples/go.mod | 22 +- examples/go.sum | 60 +- examples/storage/client.go | 30 +- examples/storage/proto/storage.pb.go | 388 ++++----- examples/storage/proto/storage.proto | 14 +- examples/storage/repl.go | 30 +- examples/storage/server.go | 28 +- go.mod | 21 +- go.sum | 56 +- gorums.pb.go | 8 +- gorums_protoopaque.pb.go | 201 +++++ internal/correctable/opts.pb.go | 8 +- internal/correctable/opts_protoopaque.pb.go | 111 +++ multicast.go | 2 +- ordering/ordering.pb.go | 102 +-- ordering/ordering_grpc.pb.go | 88 +-- ordering/ordering_protoopaque.pb.go | 185 +++++ quorumcall.go | 2 +- rpc.go | 2 +- server.go | 4 +- tests/config/config.pb.go | 68 +- tests/config/config_gorums.pb.go | 2 +- tests/correctable/correctable.pb.go | 63 +- tests/correctable/correctable_gorums.pb.go | 2 +- tests/dummy/dummy.pb.go | 34 +- tests/dummy/dummy_gorums.pb.go | 2 +- tests/metadata/metadata.pb.go | 66 +- tests/metadata/metadata_gorums.pb.go | 2 +- tests/oneway/oneway.pb.go | 63 +- tests/oneway/oneway_gorums.pb.go | 2 +- tests/ordering/order.pb.go | 66 +- tests/ordering/order_gorums.pb.go | 2 +- tests/qf/qf.pb.go | 66 +- tests/qf/qf_gorums.pb.go | 2 +- tests/tls/tls.pb.go | 63 +- tests/tls/tls_gorums.pb.go | 2 +- tests/unresponsive/unresponsive.pb.go | 34 +- tests/unresponsive/unresponsive_gorums.pb.go | 2 +- unicast.go | 2 +- 64 files changed, 2698 insertions(+), 1214 deletions(-) create mode 100644 benchmark/benchmark_protoopaque.pb.go create mode 100644 cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go create mode 100644 gorums_protoopaque.pb.go create mode 100644 internal/correctable/opts_protoopaque.pb.go create mode 100644 ordering/ordering_protoopaque.pb.go diff --git a/Makefile b/Makefile index 9ba6baa85..f32dbc123 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ dev: installgorums ordering/ordering.pb.go ordering/ordering_grpc.pb.go @protoc -I=$(proto_path) \ --go_out=:. \ --gorums_out=dev=true:. \ + --go_opt=default_api_level=API_HYBRID \ $(zorums_proto) benchmark: installgorums $(benchmark_deps) @@ -29,13 +30,17 @@ $(static_file): $(static_files) @protoc-gen-gorums --bundle=$(static_file) %.pb.go : %.proto - @protoc -I=$(proto_path) --go_out=paths=source_relative:. $^ + @protoc -I=$(proto_path) \ + --go_opt=default_api_level=API_HYBRID \ + --go_out=paths=source_relative:. $^ %_grpc.pb.go : %.proto - @protoc -I=$(proto_path) --go-grpc_out=paths=source_relative:. $^ + @protoc -I=$(proto_path) \ + --go-grpc_out=paths=source_relative:. $^ %_gorums.pb.go : %.proto - @protoc -I=$(proto_path) --gorums_out=paths=source_relative:. $^ + @protoc -I=$(proto_path) \ + --gorums_out=paths=source_relative:. $^ tools: @go mod download diff --git a/async.go b/async.go index 68f909c57..a383323a9 100644 --- a/async.go +++ b/async.go @@ -46,7 +46,7 @@ type asyncCallState struct { // This function should only be used by generated code. func (c RawConfiguration) AsyncCall(ctx context.Context, d QuorumCallData) *Async { expectedReplies := len(c) - md := &ordering.Metadata{MessageID: c.getMsgID(), Method: d.Method} + md := ordering.Metadata_builder{MessageID: c.getMsgID(), Method: d.Method}.Build() replyChan := make(chan response, expectedReplies) for _, n := range c { diff --git a/benchmark/benchmark.go b/benchmark/benchmark.go index 753c01704..e1eae0a54 100644 --- a/benchmark/benchmark.go +++ b/benchmark/benchmark.go @@ -40,7 +40,7 @@ type ( func runQCBenchmark(opts Options, cfg *Configuration, f qcFunc) (*Result, error) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - msg := &Echo{Payload: make([]byte, opts.Payload)} + msg := Echo_builder{Payload: make([]byte, opts.Payload)}.Build() s := &Stats{} var g errgroup.Group @@ -97,7 +97,7 @@ func runQCBenchmark(opts Options, cfg *Configuration, f qcFunc) (*Result, error) if err != nil { return nil, err } - result.ServerStats = memStats.MemoryStats + result.SetServerStats(memStats.GetMemoryStats()) } return result, nil @@ -106,7 +106,7 @@ func runQCBenchmark(opts Options, cfg *Configuration, f qcFunc) (*Result, error) func runAsyncQCBenchmark(opts Options, cfg *Configuration, f asyncQCFunc) (*Result, error) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - msg := &Echo{Payload: make([]byte, opts.Payload)} + msg := Echo_builder{Payload: make([]byte, opts.Payload)}.Build() s := &Stats{} var g errgroup.Group @@ -181,7 +181,7 @@ func runAsyncQCBenchmark(opts Options, cfg *Configuration, f asyncQCFunc) (*Resu if err != nil { return nil, err } - result.ServerStats = memStats.MemoryStats + result.SetServerStats(memStats.GetMemoryStats()) } return result, nil @@ -197,7 +197,7 @@ func runServerBenchmark(opts Options, cfg *Configuration, f serverFunc) (*Result benchmarkFunc := func(stopTime time.Time) { for !time.Now().After(stopTime) { - msg := &TimedMsg{SendTime: time.Now().UnixNano(), Payload: payload} + msg := TimedMsg_builder{SendTime: time.Now().UnixNano(), Payload: payload}.Build() f(ctx, msg) } } @@ -232,11 +232,11 @@ func runServerBenchmark(opts Options, cfg *Configuration, f serverFunc) (*Result return nil, err } - clientAllocs := (end.Mallocs - start.Mallocs) / resp.TotalOps - clientMem := (end.TotalAlloc - start.TotalAlloc) / resp.TotalOps + clientAllocs := (end.Mallocs - start.Mallocs) / resp.GetTotalOps() + clientMem := (end.TotalAlloc - start.TotalAlloc) / resp.GetTotalOps() - resp.AllocsPerOp = clientAllocs - resp.MemPerOp = clientMem + resp.SetAllocsPerOp(clientAllocs) + resp.SetMemPerOp(clientMem) return resp, nil } @@ -279,9 +279,9 @@ func RunBenchmarks(benchRegex *regexp.Regexp, options Options, cfg *Configuratio if err != nil { return nil, err } - result.Name = b.Name + result.SetName(b.Name) i := sort.Search(len(results), func(i int) bool { - return results[i].Name >= result.Name + return results[i].GetName() >= result.GetName() }) results = append(results, nil) copy(results[i+1:], results[i:]) diff --git a/benchmark/benchmark.pb.go b/benchmark/benchmark.pb.go index e7e7040ae..f124298e4 100644 --- a/benchmark/benchmark.pb.go +++ b/benchmark/benchmark.pb.go @@ -1,9 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: benchmark/benchmark.proto +//go:build !protoopaque + package benchmark import ( @@ -12,7 +14,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" - sync "sync" ) const ( @@ -23,20 +24,17 @@ const ( ) type Echo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` unknownFields protoimpl.UnknownFields - - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Echo) Reset() { *x = Echo{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Echo) String() string { @@ -47,7 +45,7 @@ func (*Echo) ProtoMessage() {} func (x *Echo) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57,11 +55,6 @@ func (x *Echo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Echo.ProtoReflect.Descriptor instead. -func (*Echo) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{0} -} - func (x *Echo) GetPayload() []byte { if x != nil { return x.Payload @@ -69,22 +62,40 @@ func (x *Echo) GetPayload() []byte { return nil } +func (x *Echo) SetPayload(v []byte) { + if v == nil { + v = []byte{} + } + x.Payload = v +} + +type Echo_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Payload []byte +} + +func (b0 Echo_builder) Build() *Echo { + m0 := &Echo{} + b, x := &b0, m0 + _, _ = b, x + x.Payload = b.Payload + return m0 +} + type TimedMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3" json:"SendTime,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` unknownFields protoimpl.UnknownFields - - SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3" json:"SendTime,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TimedMsg) Reset() { *x = TimedMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimedMsg) String() string { @@ -95,7 +106,7 @@ func (*TimedMsg) ProtoMessage() {} func (x *TimedMsg) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +116,6 @@ func (x *TimedMsg) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TimedMsg.ProtoReflect.Descriptor instead. -func (*TimedMsg) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{1} -} - func (x *TimedMsg) GetSendTime() int64 { if x != nil { return x.SendTime @@ -124,19 +130,44 @@ func (x *TimedMsg) GetPayload() []byte { return nil } +func (x *TimedMsg) SetSendTime(v int64) { + x.SendTime = v +} + +func (x *TimedMsg) SetPayload(v []byte) { + if v == nil { + v = []byte{} + } + x.Payload = v +} + +type TimedMsg_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + SendTime int64 + Payload []byte +} + +func (b0 TimedMsg_builder) Build() *TimedMsg { + m0 := &TimedMsg{} + b, x := &b0, m0 + _, _ = b, x + x.SendTime = b.SendTime + x.Payload = b.Payload + return m0 +} + type StartRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StartRequest) Reset() { *x = StartRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartRequest) String() string { @@ -147,7 +178,7 @@ func (*StartRequest) ProtoMessage() {} func (x *StartRequest) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,24 +188,29 @@ func (x *StartRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StartRequest.ProtoReflect.Descriptor instead. -func (*StartRequest) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{2} +type StartRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 StartRequest_builder) Build() *StartRequest { + m0 := &StartRequest{} + b, x := &b0, m0 + _, _ = b, x + return m0 } type StartResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StartResponse) Reset() { *x = StartResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartResponse) String() string { @@ -185,7 +221,7 @@ func (*StartResponse) ProtoMessage() {} func (x *StartResponse) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,24 +231,29 @@ func (x *StartResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StartResponse.ProtoReflect.Descriptor instead. -func (*StartResponse) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{3} +type StartResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 StartResponse_builder) Build() *StartResponse { + m0 := &StartResponse{} + b, x := &b0, m0 + _, _ = b, x + return m0 } type StopRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StopRequest) Reset() { *x = StopRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopRequest) String() string { @@ -223,7 +264,7 @@ func (*StopRequest) ProtoMessage() {} func (x *StopRequest) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,34 +274,38 @@ func (x *StopRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. -func (*StopRequest) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{4} +type StopRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 StopRequest_builder) Build() *StopRequest { + m0 := &StopRequest{} + b, x := &b0, m0 + _, _ = b, x + return m0 } type Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3" json:"TotalOps,omitempty"` + TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3" json:"TotalTime,omitempty"` + Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3" json:"Throughput,omitempty"` + LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3" json:"LatencyAvg,omitempty"` + LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3" json:"LatencyVar,omitempty"` + AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3" json:"AllocsPerOp,omitempty"` + MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3" json:"MemPerOp,omitempty"` + ServerStats []*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3" json:"ServerStats,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3" json:"TotalOps,omitempty"` - TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3" json:"TotalTime,omitempty"` - Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3" json:"Throughput,omitempty"` - LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3" json:"LatencyAvg,omitempty"` - LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3" json:"LatencyVar,omitempty"` - AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3" json:"AllocsPerOp,omitempty"` - MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3" json:"MemPerOp,omitempty"` - ServerStats []*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3" json:"ServerStats,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Result) Reset() { *x = Result{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Result) String() string { @@ -271,7 +316,7 @@ func (*Result) ProtoMessage() {} func (x *Result) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +326,6 @@ func (x *Result) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Result.ProtoReflect.Descriptor instead. -func (*Result) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{5} -} - func (x *Result) GetName() string { if x != nil { return x.Name @@ -349,22 +389,85 @@ func (x *Result) GetServerStats() []*MemoryStat { return nil } +func (x *Result) SetName(v string) { + x.Name = v +} + +func (x *Result) SetTotalOps(v uint64) { + x.TotalOps = v +} + +func (x *Result) SetTotalTime(v int64) { + x.TotalTime = v +} + +func (x *Result) SetThroughput(v float64) { + x.Throughput = v +} + +func (x *Result) SetLatencyAvg(v float64) { + x.LatencyAvg = v +} + +func (x *Result) SetLatencyVar(v float64) { + x.LatencyVar = v +} + +func (x *Result) SetAllocsPerOp(v uint64) { + x.AllocsPerOp = v +} + +func (x *Result) SetMemPerOp(v uint64) { + x.MemPerOp = v +} + +func (x *Result) SetServerStats(v []*MemoryStat) { + x.ServerStats = v +} + +type Result_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Name string + TotalOps uint64 + TotalTime int64 + Throughput float64 + LatencyAvg float64 + LatencyVar float64 + AllocsPerOp uint64 + MemPerOp uint64 + ServerStats []*MemoryStat +} + +func (b0 Result_builder) Build() *Result { + m0 := &Result{} + b, x := &b0, m0 + _, _ = b, x + x.Name = b.Name + x.TotalOps = b.TotalOps + x.TotalTime = b.TotalTime + x.Throughput = b.Throughput + x.LatencyAvg = b.LatencyAvg + x.LatencyVar = b.LatencyVar + x.AllocsPerOp = b.AllocsPerOp + x.MemPerOp = b.MemPerOp + x.ServerStats = b.ServerStats + return m0 +} + type MemoryStat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3" json:"Allocs,omitempty"` + Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3" json:"Memory,omitempty"` unknownFields protoimpl.UnknownFields - - Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3" json:"Allocs,omitempty"` - Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3" json:"Memory,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MemoryStat) Reset() { *x = MemoryStat{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemoryStat) String() string { @@ -375,7 +478,7 @@ func (*MemoryStat) ProtoMessage() {} func (x *MemoryStat) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +488,6 @@ func (x *MemoryStat) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MemoryStat.ProtoReflect.Descriptor instead. -func (*MemoryStat) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{6} -} - func (x *MemoryStat) GetAllocs() uint64 { if x != nil { return x.Allocs @@ -404,21 +502,42 @@ func (x *MemoryStat) GetMemory() uint64 { return 0 } +func (x *MemoryStat) SetAllocs(v uint64) { + x.Allocs = v +} + +func (x *MemoryStat) SetMemory(v uint64) { + x.Memory = v +} + +type MemoryStat_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Allocs uint64 + Memory uint64 +} + +func (b0 MemoryStat_builder) Build() *MemoryStat { + m0 := &MemoryStat{} + b, x := &b0, m0 + _, _ = b, x + x.Allocs = b.Allocs + x.Memory = b.Memory + return m0 +} + type MemoryStatList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + MemoryStats []*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3" json:"MemoryStats,omitempty"` unknownFields protoimpl.UnknownFields - - MemoryStats []*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3" json:"MemoryStats,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MemoryStatList) Reset() { *x = MemoryStatList{} - if protoimpl.UnsafeEnabled { - mi := &file_benchmark_benchmark_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_benchmark_benchmark_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemoryStatList) String() string { @@ -429,7 +548,7 @@ func (*MemoryStatList) ProtoMessage() {} func (x *MemoryStatList) ProtoReflect() protoreflect.Message { mi := &file_benchmark_benchmark_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +558,6 @@ func (x *MemoryStatList) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MemoryStatList.ProtoReflect.Descriptor instead. -func (*MemoryStatList) Descriptor() ([]byte, []int) { - return file_benchmark_benchmark_proto_rawDescGZIP(), []int{7} -} - func (x *MemoryStatList) GetMemoryStats() []*MemoryStat { if x != nil { return x.MemoryStats @@ -451,6 +565,24 @@ func (x *MemoryStatList) GetMemoryStats() []*MemoryStat { return nil } +func (x *MemoryStatList) SetMemoryStats(v []*MemoryStat) { + x.MemoryStats = v +} + +type MemoryStatList_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + MemoryStats []*MemoryStat +} + +func (b0 MemoryStatList_builder) Build() *MemoryStatList { + m0 := &MemoryStatList{} + b, x := &b0, m0 + _, _ = b, x + x.MemoryStats = b.MemoryStats + return m0 +} + var File_benchmark_benchmark_proto protoreflect.FileDescriptor var file_benchmark_benchmark_proto_rawDesc = []byte{ @@ -536,20 +668,8 @@ var file_benchmark_benchmark_proto_rawDesc = []byte{ 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var ( - file_benchmark_benchmark_proto_rawDescOnce sync.Once - file_benchmark_benchmark_proto_rawDescData = file_benchmark_benchmark_proto_rawDesc -) - -func file_benchmark_benchmark_proto_rawDescGZIP() []byte { - file_benchmark_benchmark_proto_rawDescOnce.Do(func() { - file_benchmark_benchmark_proto_rawDescData = protoimpl.X.CompressGZIP(file_benchmark_benchmark_proto_rawDescData) - }) - return file_benchmark_benchmark_proto_rawDescData -} - var file_benchmark_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_benchmark_benchmark_proto_goTypes = []interface{}{ +var file_benchmark_benchmark_proto_goTypes = []any{ (*Echo)(nil), // 0: benchmark.Echo (*TimedMsg)(nil), // 1: benchmark.TimedMsg (*StartRequest)(nil), // 2: benchmark.StartRequest @@ -591,104 +711,6 @@ func file_benchmark_benchmark_proto_init() { if File_benchmark_benchmark_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_benchmark_benchmark_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Echo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimedMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemoryStat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_benchmark_benchmark_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemoryStatList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/benchmark/benchmark_gorums.pb.go b/benchmark/benchmark_gorums.pb.go index e8eaf13ff..f75207dd7 100644 --- a/benchmark/benchmark_gorums.pb.go +++ b/benchmark/benchmark_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: benchmark/benchmark.proto package benchmark diff --git a/benchmark/benchmark_protoopaque.pb.go b/benchmark/benchmark_protoopaque.pb.go new file mode 100644 index 000000000..c4d5be775 --- /dev/null +++ b/benchmark/benchmark_protoopaque.pb.go @@ -0,0 +1,736 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.3 +// protoc v5.29.2 +// source: benchmark/benchmark.proto + +//go:build protoopaque + +package benchmark + +import ( + _ "github.com/relab/gorums" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" +) + +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) +) + +type Echo struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Echo) Reset() { + *x = Echo{} + mi := &file_benchmark_benchmark_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Echo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Echo) ProtoMessage() {} + +func (x *Echo) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +func (x *Echo) GetPayload() []byte { + if x != nil { + return x.xxx_hidden_Payload + } + return nil +} + +func (x *Echo) SetPayload(v []byte) { + if v == nil { + v = []byte{} + } + x.xxx_hidden_Payload = v +} + +type Echo_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Payload []byte +} + +func (b0 Echo_builder) Build() *Echo { + m0 := &Echo{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Payload = b.Payload + return m0 +} + +type TimedMsg struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3"` + xxx_hidden_Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimedMsg) Reset() { + *x = TimedMsg{} + mi := &file_benchmark_benchmark_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimedMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimedMsg) ProtoMessage() {} + +func (x *TimedMsg) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +func (x *TimedMsg) GetSendTime() int64 { + if x != nil { + return x.xxx_hidden_SendTime + } + return 0 +} + +func (x *TimedMsg) GetPayload() []byte { + if x != nil { + return x.xxx_hidden_Payload + } + return nil +} + +func (x *TimedMsg) SetSendTime(v int64) { + x.xxx_hidden_SendTime = v +} + +func (x *TimedMsg) SetPayload(v []byte) { + if v == nil { + v = []byte{} + } + x.xxx_hidden_Payload = v +} + +type TimedMsg_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + SendTime int64 + Payload []byte +} + +func (b0 TimedMsg_builder) Build() *TimedMsg { + m0 := &TimedMsg{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_SendTime = b.SendTime + x.xxx_hidden_Payload = b.Payload + return m0 +} + +type StartRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartRequest) Reset() { + *x = StartRequest{} + mi := &file_benchmark_benchmark_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartRequest) ProtoMessage() {} + +func (x *StartRequest) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +type StartRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 StartRequest_builder) Build() *StartRequest { + m0 := &StartRequest{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +type StartResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartResponse) Reset() { + *x = StartResponse{} + mi := &file_benchmark_benchmark_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartResponse) ProtoMessage() {} + +func (x *StartResponse) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +type StartResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 StartResponse_builder) Build() *StartResponse { + m0 := &StartResponse{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +type StopRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + mi := &file_benchmark_benchmark_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +type StopRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 StopRequest_builder) Build() *StopRequest { + m0 := &StopRequest{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +type Result struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=Name,proto3"` + xxx_hidden_TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3"` + xxx_hidden_TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3"` + xxx_hidden_Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3"` + xxx_hidden_LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3"` + xxx_hidden_LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3"` + xxx_hidden_AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3"` + xxx_hidden_MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3"` + xxx_hidden_ServerStats *[]*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Result) Reset() { + *x = Result{} + mi := &file_benchmark_benchmark_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Result) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Result) ProtoMessage() {} + +func (x *Result) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +func (x *Result) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *Result) GetTotalOps() uint64 { + if x != nil { + return x.xxx_hidden_TotalOps + } + return 0 +} + +func (x *Result) GetTotalTime() int64 { + if x != nil { + return x.xxx_hidden_TotalTime + } + return 0 +} + +func (x *Result) GetThroughput() float64 { + if x != nil { + return x.xxx_hidden_Throughput + } + return 0 +} + +func (x *Result) GetLatencyAvg() float64 { + if x != nil { + return x.xxx_hidden_LatencyAvg + } + return 0 +} + +func (x *Result) GetLatencyVar() float64 { + if x != nil { + return x.xxx_hidden_LatencyVar + } + return 0 +} + +func (x *Result) GetAllocsPerOp() uint64 { + if x != nil { + return x.xxx_hidden_AllocsPerOp + } + return 0 +} + +func (x *Result) GetMemPerOp() uint64 { + if x != nil { + return x.xxx_hidden_MemPerOp + } + return 0 +} + +func (x *Result) GetServerStats() []*MemoryStat { + if x != nil { + if x.xxx_hidden_ServerStats != nil { + return *x.xxx_hidden_ServerStats + } + } + return nil +} + +func (x *Result) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *Result) SetTotalOps(v uint64) { + x.xxx_hidden_TotalOps = v +} + +func (x *Result) SetTotalTime(v int64) { + x.xxx_hidden_TotalTime = v +} + +func (x *Result) SetThroughput(v float64) { + x.xxx_hidden_Throughput = v +} + +func (x *Result) SetLatencyAvg(v float64) { + x.xxx_hidden_LatencyAvg = v +} + +func (x *Result) SetLatencyVar(v float64) { + x.xxx_hidden_LatencyVar = v +} + +func (x *Result) SetAllocsPerOp(v uint64) { + x.xxx_hidden_AllocsPerOp = v +} + +func (x *Result) SetMemPerOp(v uint64) { + x.xxx_hidden_MemPerOp = v +} + +func (x *Result) SetServerStats(v []*MemoryStat) { + x.xxx_hidden_ServerStats = &v +} + +type Result_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Name string + TotalOps uint64 + TotalTime int64 + Throughput float64 + LatencyAvg float64 + LatencyVar float64 + AllocsPerOp uint64 + MemPerOp uint64 + ServerStats []*MemoryStat +} + +func (b0 Result_builder) Build() *Result { + m0 := &Result{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Name = b.Name + x.xxx_hidden_TotalOps = b.TotalOps + x.xxx_hidden_TotalTime = b.TotalTime + x.xxx_hidden_Throughput = b.Throughput + x.xxx_hidden_LatencyAvg = b.LatencyAvg + x.xxx_hidden_LatencyVar = b.LatencyVar + x.xxx_hidden_AllocsPerOp = b.AllocsPerOp + x.xxx_hidden_MemPerOp = b.MemPerOp + x.xxx_hidden_ServerStats = &b.ServerStats + return m0 +} + +type MemoryStat struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3"` + xxx_hidden_Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoryStat) Reset() { + *x = MemoryStat{} + mi := &file_benchmark_benchmark_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryStat) ProtoMessage() {} + +func (x *MemoryStat) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_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) +} + +func (x *MemoryStat) GetAllocs() uint64 { + if x != nil { + return x.xxx_hidden_Allocs + } + return 0 +} + +func (x *MemoryStat) GetMemory() uint64 { + if x != nil { + return x.xxx_hidden_Memory + } + return 0 +} + +func (x *MemoryStat) SetAllocs(v uint64) { + x.xxx_hidden_Allocs = v +} + +func (x *MemoryStat) SetMemory(v uint64) { + x.xxx_hidden_Memory = v +} + +type MemoryStat_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Allocs uint64 + Memory uint64 +} + +func (b0 MemoryStat_builder) Build() *MemoryStat { + m0 := &MemoryStat{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Allocs = b.Allocs + x.xxx_hidden_Memory = b.Memory + return m0 +} + +type MemoryStatList struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_MemoryStats *[]*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoryStatList) Reset() { + *x = MemoryStatList{} + mi := &file_benchmark_benchmark_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryStatList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryStatList) ProtoMessage() {} + +func (x *MemoryStatList) ProtoReflect() protoreflect.Message { + mi := &file_benchmark_benchmark_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *MemoryStatList) GetMemoryStats() []*MemoryStat { + if x != nil { + if x.xxx_hidden_MemoryStats != nil { + return *x.xxx_hidden_MemoryStats + } + } + return nil +} + +func (x *MemoryStatList) SetMemoryStats(v []*MemoryStat) { + x.xxx_hidden_MemoryStats = &v +} + +type MemoryStatList_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + MemoryStats []*MemoryStat +} + +func (b0 MemoryStatList_builder) Build() *MemoryStatList { + m0 := &MemoryStatList{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_MemoryStats = &b.MemoryStats + return m0 +} + +var File_benchmark_benchmark_proto protoreflect.FileDescriptor + +var file_benchmark_benchmark_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2f, 0x62, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x62, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x20, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x22, 0x40, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, + 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xad, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x70, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x70, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0a, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x41, 0x76, 0x67, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x41, 0x76, 0x67, 0x12, 0x1e, + 0x0a, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x56, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x56, 0x61, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x50, 0x65, 0x72, 0x4f, 0x70, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x50, 0x65, 0x72, 0x4f, 0x70, + 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x65, 0x6d, 0x50, 0x65, 0x72, 0x4f, 0x70, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x4d, 0x65, 0x6d, 0x50, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x37, 0x0a, 0x0b, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x4d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4d, 0x65, 0x6d, + 0x6f, 0x72, 0x79, 0x22, 0x49, 0x0a, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x52, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x32, 0xb2, + 0x04, 0x0a, 0x09, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x4f, 0x0a, 0x14, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x46, 0x0a, + 0x13, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x49, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, + 0x12, 0x56, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x22, 0x16, 0xa0, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x51, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3d, + 0x0a, 0x0f, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, + 0x6c, 0x12, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, + 0x68, 0x6f, 0x1a, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, + 0x63, 0x68, 0x6f, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0x12, 0x34, 0x0a, + 0x0a, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x62, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x0f, 0x2e, 0x62, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x22, 0x04, 0xa0, + 0xb5, 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x09, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x12, 0x13, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x98, + 0xb5, 0x18, 0x01, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x62, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_benchmark_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_benchmark_benchmark_proto_goTypes = []any{ + (*Echo)(nil), // 0: benchmark.Echo + (*TimedMsg)(nil), // 1: benchmark.TimedMsg + (*StartRequest)(nil), // 2: benchmark.StartRequest + (*StartResponse)(nil), // 3: benchmark.StartResponse + (*StopRequest)(nil), // 4: benchmark.StopRequest + (*Result)(nil), // 5: benchmark.Result + (*MemoryStat)(nil), // 6: benchmark.MemoryStat + (*MemoryStatList)(nil), // 7: benchmark.MemoryStatList + (*emptypb.Empty)(nil), // 8: google.protobuf.Empty +} +var file_benchmark_benchmark_proto_depIdxs = []int32{ + 6, // 0: benchmark.Result.ServerStats:type_name -> benchmark.MemoryStat + 6, // 1: benchmark.MemoryStatList.MemoryStats:type_name -> benchmark.MemoryStat + 2, // 2: benchmark.Benchmark.StartServerBenchmark:input_type -> benchmark.StartRequest + 4, // 3: benchmark.Benchmark.StopServerBenchmark:input_type -> benchmark.StopRequest + 2, // 4: benchmark.Benchmark.StartBenchmark:input_type -> benchmark.StartRequest + 4, // 5: benchmark.Benchmark.StopBenchmark:input_type -> benchmark.StopRequest + 0, // 6: benchmark.Benchmark.QuorumCall:input_type -> benchmark.Echo + 0, // 7: benchmark.Benchmark.AsyncQuorumCall:input_type -> benchmark.Echo + 0, // 8: benchmark.Benchmark.SlowServer:input_type -> benchmark.Echo + 1, // 9: benchmark.Benchmark.Multicast:input_type -> benchmark.TimedMsg + 3, // 10: benchmark.Benchmark.StartServerBenchmark:output_type -> benchmark.StartResponse + 5, // 11: benchmark.Benchmark.StopServerBenchmark:output_type -> benchmark.Result + 3, // 12: benchmark.Benchmark.StartBenchmark:output_type -> benchmark.StartResponse + 6, // 13: benchmark.Benchmark.StopBenchmark:output_type -> benchmark.MemoryStat + 0, // 14: benchmark.Benchmark.QuorumCall:output_type -> benchmark.Echo + 0, // 15: benchmark.Benchmark.AsyncQuorumCall:output_type -> benchmark.Echo + 0, // 16: benchmark.Benchmark.SlowServer:output_type -> benchmark.Echo + 8, // 17: benchmark.Benchmark.Multicast:output_type -> google.protobuf.Empty + 10, // [10:18] is the sub-list for method output_type + 2, // [2:10] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_benchmark_benchmark_proto_init() } +func file_benchmark_benchmark_proto_init() { + if File_benchmark_benchmark_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_benchmark_benchmark_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_benchmark_benchmark_proto_goTypes, + DependencyIndexes: file_benchmark_benchmark_proto_depIdxs, + MessageInfos: file_benchmark_benchmark_proto_msgTypes, + }.Build() + File_benchmark_benchmark_proto = out.File + file_benchmark_benchmark_proto_rawDesc = nil + file_benchmark_benchmark_proto_goTypes = nil + file_benchmark_benchmark_proto_depIdxs = nil +} diff --git a/benchmark/qspec.go b/benchmark/qspec.go index 1cc6d5b6d..bbf0c2a42 100644 --- a/benchmark/qspec.go +++ b/benchmark/qspec.go @@ -42,26 +42,26 @@ func (qspec *QSpec) StopServerBenchmarkQF(_ *StopRequest, replies map[uint32]*Re // combine results, calculating averages and pooled variance resp := &Result{} for _, reply := range replies { - if resp.Name != "" { - resp.Name = reply.Name + if resp.GetName() != "" { + resp.SetName(reply.GetName()) } - resp.TotalOps += reply.TotalOps - resp.TotalTime += reply.TotalTime - resp.Throughput += reply.Throughput - resp.LatencyAvg += reply.LatencyAvg * float64(reply.TotalOps) - resp.ServerStats = append(resp.ServerStats, &MemoryStat{ - Allocs: reply.AllocsPerOp * resp.TotalOps, - Memory: reply.MemPerOp * resp.TotalOps, - }) + resp.SetTotalOps(resp.GetTotalOps() + reply.GetTotalOps()) + resp.SetTotalTime(resp.GetTotalTime() + reply.GetTotalTime()) + resp.SetThroughput(resp.GetThroughput() + reply.GetThroughput()) + resp.SetLatencyAvg(resp.GetLatencyAvg() + reply.GetLatencyAvg()*float64(reply.GetTotalOps())) + resp.SetServerStats(append(resp.GetServerStats(), MemoryStat_builder{ + Allocs: reply.GetAllocsPerOp() * resp.GetTotalOps(), + Memory: reply.GetMemPerOp() * resp.GetTotalOps(), + }.Build())) } - resp.LatencyAvg /= float64(resp.TotalOps) + resp.SetLatencyAvg(resp.GetLatencyAvg() / float64(resp.GetTotalOps())) for _, reply := range replies { - resp.LatencyVar += float64(reply.TotalOps-1) * reply.LatencyVar + resp.SetLatencyVar(resp.GetLatencyVar() + float64(reply.GetTotalOps()-1)*reply.GetLatencyVar()) } - resp.LatencyVar /= float64(resp.TotalOps) - float64(len(replies)) - resp.TotalOps /= uint64(len(replies)) - resp.TotalTime /= int64(len(replies)) - resp.Throughput /= float64(len(replies)) + resp.SetLatencyVar(resp.GetLatencyVar()/float64(resp.GetTotalOps()) - float64(len(replies))) + resp.SetTotalOps(resp.GetTotalOps() / uint64(len(replies))) + resp.SetTotalTime(resp.GetTotalTime() / int64(len(replies))) + resp.SetThroughput(resp.GetThroughput() / float64(len(replies))) return resp, true } @@ -90,7 +90,7 @@ func (qspec *QSpec) StopBenchmarkQF(_ *StopRequest, replies map[uint32]*MemorySt for _, v := range replies { replyList = append(replyList, v) } - return &MemoryStatList{MemoryStats: replyList}, true + return MemoryStatList_builder{MemoryStats: replyList}.Build(), true } // QuorumCallQF is the quorum function for the QuorumCall quorumcall diff --git a/benchmark/server.go b/benchmark/server.go index 220b33189..72145911e 100644 --- a/benchmark/server.go +++ b/benchmark/server.go @@ -29,7 +29,7 @@ func (srv *server) SlowServer(ctx gorums.ServerCtx, in *Echo) (resp *Echo, err e } func (srv *server) Multicast(_ gorums.ServerCtx, msg *TimedMsg) { - latency := time.Now().UnixNano() - msg.SendTime + latency := time.Now().UnixNano() - msg.GetSendTime() srv.stats.AddLatency(time.Duration(latency)) } @@ -52,10 +52,10 @@ func (srv *server) StartBenchmark(_ gorums.ServerCtx, _ *StartRequest) (resp *St func (srv *server) StopBenchmark(_ gorums.ServerCtx, _ *StopRequest) (resp *MemoryStat, err error) { srv.stats.End() - return &MemoryStat{ + return MemoryStat_builder{ Allocs: srv.stats.endMs.Mallocs - srv.stats.startMs.Mallocs, Memory: srv.stats.endMs.TotalAlloc - srv.stats.startMs.TotalAlloc, - }, nil + }.Build(), nil } // Server is a unified server for both ordered and unordered methods diff --git a/benchmark/stats.go b/benchmark/stats.go index 30dd4a84a..c7a31e176 100644 --- a/benchmark/stats.go +++ b/benchmark/stats.go @@ -12,12 +12,12 @@ import ( // Format returns a tab formatted string representation of the result func (r *Result) Format() string { b := new(strings.Builder) - fmt.Fprintf(b, "%s\t", r.Name) - fmt.Fprintf(b, "%.2f ops/sec\t", r.Throughput) - fmt.Fprintf(b, "%.2f ms\t", r.LatencyAvg/float64(time.Millisecond)) - fmt.Fprintf(b, "%.2f ms\t", math.Sqrt(r.LatencyVar)/float64(time.Millisecond)) - fmt.Fprintf(b, "%d B/op\t", r.MemPerOp) - fmt.Fprintf(b, "%d allocs/op\t", r.AllocsPerOp) + fmt.Fprintf(b, "%s\t", r.GetName()) + fmt.Fprintf(b, "%.2f ops/sec\t", r.GetThroughput()) + fmt.Fprintf(b, "%.2f ms\t", r.GetLatencyAvg()/float64(time.Millisecond)) + fmt.Fprintf(b, "%.2f ms\t", math.Sqrt(r.GetLatencyVar())/float64(time.Millisecond)) + fmt.Fprintf(b, "%d B/op\t", r.GetMemPerOp()) + fmt.Fprintf(b, "%d allocs/op\t", r.GetAllocsPerOp()) return b.String() } @@ -70,15 +70,15 @@ func (s *Stats) GetResult() *Result { defer s.mut.Unlock() r := &Result{} - r.TotalOps = s.count - r.TotalTime = int64(s.endTime.Sub(s.startTime)) - r.Throughput = float64(r.TotalOps) / float64(time.Duration(r.TotalTime).Seconds()) - r.LatencyAvg = s.mean + r.SetTotalOps(s.count) + r.SetTotalTime(int64(s.endTime.Sub(s.startTime))) + r.SetThroughput(float64(r.GetTotalOps()) / float64(time.Duration(r.GetTotalTime()).Seconds())) + r.SetLatencyAvg(s.mean) if s.count > 2 { - r.LatencyVar = s.m2 / float64(s.count-1) + r.SetLatencyVar(s.m2 / float64(s.count-1)) } - r.AllocsPerOp = (s.endMs.Mallocs - s.startMs.Mallocs) / r.TotalOps - r.MemPerOp = (s.endMs.TotalAlloc - s.startMs.TotalAlloc) / r.TotalOps + r.SetAllocsPerOp((s.endMs.Mallocs - s.startMs.Mallocs) / r.GetTotalOps()) + r.SetMemPerOp((s.endMs.TotalAlloc - s.startMs.TotalAlloc) / r.GetTotalOps()) return r } diff --git a/channel.go b/channel.go index c6243961c..5edf88715 100644 --- a/channel.go +++ b/channel.go @@ -139,14 +139,14 @@ func (c *channel) routeResponse(msgID uint64, resp response) { func (c *channel) enqueue(req request, responseChan chan<- response, streaming bool) { if responseChan != nil { c.responseMut.Lock() - c.responseRouters[req.msg.Metadata.MessageID] = responseRouter{responseChan, streaming} + c.responseRouters[req.msg.Metadata.GetMessageID()] = responseRouter{responseChan, streaming} c.responseMut.Unlock() } // either enqueue the request on the sendQ or respond // with error if the node is closed select { case <-c.parentCtx.Done(): - c.routeResponse(req.msg.Metadata.MessageID, response{nid: c.node.ID(), err: fmt.Errorf("channel closed")}) + c.routeResponse(req.msg.Metadata.GetMessageID(), response{nid: c.node.ID(), err: fmt.Errorf("channel closed")}) return case c.sendQ <- req: } @@ -168,7 +168,7 @@ func (c *channel) sendMsg(req request) (err error) { // eventually clean up the responseRouter map by calling routeResponse. if req.waitForSend() { // unblock the caller and clean up the responseRouter map - c.routeResponse(req.msg.Metadata.MessageID, response{}) + c.routeResponse(req.msg.Metadata.GetMessageID(), response{}) } }() @@ -230,14 +230,14 @@ func (c *channel) sender() { } // return error if stream is broken if c.streamBroken.get() { - c.routeResponse(req.msg.Metadata.MessageID, response{nid: c.node.ID(), err: streamDownErr}) + c.routeResponse(req.msg.Metadata.GetMessageID(), response{nid: c.node.ID(), err: streamDownErr}) continue } // else try to send message err := c.sendMsg(req) if err != nil { // return the error - c.routeResponse(req.msg.Metadata.MessageID, response{nid: c.node.ID(), err: err}) + c.routeResponse(req.msg.Metadata.GetMessageID(), response{nid: c.node.ID(), err: err}) } } } @@ -261,7 +261,7 @@ func (c *channel) receiver() { } else { c.streamMut.RUnlock() err := status.FromProto(resp.Metadata.GetStatus()).Err() - c.routeResponse(resp.Metadata.MessageID, response{nid: c.node.ID(), msg: resp.Message, err: err}) + c.routeResponse(resp.Metadata.GetMessageID(), response{nid: c.node.ID(), msg: resp.Message, err: err}) } select { diff --git a/cmd/benchmark/main.go b/cmd/benchmark/main.go index dbe1e3d14..486a380d0 100644 --- a/cmd/benchmark/main.go +++ b/cmd/benchmark/main.go @@ -95,15 +95,15 @@ func printResults(results []*benchmark.Result, options benchmark.Options, server fmt.Fprintln(resultWriter) for _, r := range results { if !serverStats && options.Remote { - for _, s := range r.ServerStats { - r.MemPerOp += s.Memory / r.TotalOps - r.AllocsPerOp += s.Allocs / r.TotalOps + for _, s := range r.GetServerStats() { + r.SetMemPerOp(r.GetMemPerOp() + s.GetMemory()/r.GetTotalOps()) + r.SetAllocsPerOp(r.GetAllocsPerOp() + s.GetAllocs()/r.GetTotalOps()) } } fmt.Fprint(resultWriter, r.Format()) if serverStats && options.Remote { - for _, s := range r.ServerStats { - fmt.Fprintf(resultWriter, "%d B/op\t%d allocs/op\t", s.Memory/r.TotalOps, s.Allocs/r.TotalOps) + for _, s := range r.GetServerStats() { + fmt.Fprintf(resultWriter, "%d B/op\t%d allocs/op\t", s.GetMemory()/r.GetTotalOps(), s.GetAllocs()/r.GetTotalOps()) } } fmt.Fprintln(resultWriter) diff --git a/cmd/protoc-gen-gorums/dev/zorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums.pb.go index 8b4bbc2c7..ef8ac5793 100644 --- a/cmd/protoc-gen-gorums/dev/zorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums.pb.go @@ -1,9 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: zorums.proto +//go:build !protoopaque + package dev import ( @@ -12,7 +14,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" - sync "sync" ) const ( @@ -23,20 +24,17 @@ const ( ) type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_zorums_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_zorums_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -47,7 +45,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_zorums_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57,11 +55,6 @@ func (x *Request) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Request.ProtoReflect.Descriptor instead. -func (*Request) Descriptor() ([]byte, []int) { - return file_zorums_proto_rawDescGZIP(), []int{0} -} - func (x *Request) GetValue() string { if x != nil { return x.Value @@ -69,21 +62,36 @@ func (x *Request) GetValue() string { return "" } +func (x *Request) SetValue(v string) { + x.Value = v +} + +type Request_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Value string +} + +func (b0 Request_builder) Build() *Request { + m0 := &Request{} + b, x := &b0, m0 + _, _ = b, x + x.Value = b.Value + return m0 +} + type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"` unknownFields protoimpl.UnknownFields - - Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_zorums_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_zorums_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -94,7 +102,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_zorums_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104,11 +112,6 @@ func (x *Response) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_zorums_proto_rawDescGZIP(), []int{1} -} - func (x *Response) GetResult() int64 { if x != nil { return x.Result @@ -116,21 +119,36 @@ func (x *Response) GetResult() int64 { return 0 } +func (x *Response) SetResult(v int64) { + x.Result = v +} + +type Response_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Result int64 +} + +func (b0 Response_builder) Build() *Response { + m0 := &Response{} + b, x := &b0, m0 + _, _ = b, x + x.Result = b.Result + return m0 +} + type MyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MyResponse) Reset() { *x = MyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_zorums_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_zorums_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MyResponse) String() string { @@ -141,7 +159,7 @@ func (*MyResponse) ProtoMessage() {} func (x *MyResponse) ProtoReflect() protoreflect.Message { mi := &file_zorums_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +169,6 @@ func (x *MyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MyResponse.ProtoReflect.Descriptor instead. -func (*MyResponse) Descriptor() ([]byte, []int) { - return file_zorums_proto_rawDescGZIP(), []int{2} -} - func (x *MyResponse) GetValue() string { if x != nil { return x.Value @@ -163,6 +176,24 @@ func (x *MyResponse) GetValue() string { return "" } +func (x *MyResponse) SetValue(v string) { + x.Value = v +} + +type MyResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Value string +} + +func (b0 MyResponse_builder) Build() *MyResponse { + m0 := &MyResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Value = b.Value + return m0 +} + var File_zorums_proto protoreflect.FileDescriptor var file_zorums_proto_rawDesc = []byte{ @@ -318,20 +349,8 @@ var file_zorums_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var ( - file_zorums_proto_rawDescOnce sync.Once - file_zorums_proto_rawDescData = file_zorums_proto_rawDesc -) - -func file_zorums_proto_rawDescGZIP() []byte { - file_zorums_proto_rawDescOnce.Do(func() { - file_zorums_proto_rawDescData = protoimpl.X.CompressGZIP(file_zorums_proto_rawDescData) - }) - return file_zorums_proto_rawDescData -} - var file_zorums_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_zorums_proto_goTypes = []interface{}{ +var file_zorums_proto_goTypes = []any{ (*Request)(nil), // 0: dev.Request (*Response)(nil), // 1: dev.Response (*MyResponse)(nil), // 2: dev.MyResponse @@ -416,44 +435,6 @@ func file_zorums_proto_init() { if File_zorums_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_zorums_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_zorums_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_zorums_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cmd/protoc-gen-gorums/dev/zorums_async_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_async_gorums.pb.go index a32fcacb3..def34a53f 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_async_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_async_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_correctable_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_correctable_gorums.pb.go index 5cb8b8f48..4aaae1e15 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_correctable_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_correctable_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_multicast_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_multicast_gorums.pb.go index 005a7c15d..d82005ffa 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_multicast_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_multicast_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go b/cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go new file mode 100644 index 000000000..ec27d3931 --- /dev/null +++ b/cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go @@ -0,0 +1,456 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.3 +// protoc v5.29.2 +// source: zorums.proto + +//go:build protoopaque + +package dev + +import ( + _ "github.com/relab/gorums" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" +) + +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) +) + +type Request struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Request) Reset() { + *x = Request{} + mi := &file_zorums_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_zorums_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) +} + +func (x *Request) GetValue() string { + if x != nil { + return x.xxx_hidden_Value + } + return "" +} + +func (x *Request) SetValue(v string) { + x.xxx_hidden_Value = v +} + +type Request_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Value string +} + +func (b0 Request_builder) Build() *Request { + m0 := &Request{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Value = b.Value + return m0 +} + +type Response struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Result int64 `protobuf:"varint,1,opt,name=Result,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_zorums_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_zorums_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) +} + +func (x *Response) GetResult() int64 { + if x != nil { + return x.xxx_hidden_Result + } + return 0 +} + +func (x *Response) SetResult(v int64) { + x.xxx_hidden_Result = v +} + +type Response_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Result int64 +} + +func (b0 Response_builder) Build() *Response { + m0 := &Response{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Result = b.Result + return m0 +} + +type MyResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MyResponse) Reset() { + *x = MyResponse{} + mi := &file_zorums_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MyResponse) ProtoMessage() {} + +func (x *MyResponse) ProtoReflect() protoreflect.Message { + mi := &file_zorums_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) +} + +func (x *MyResponse) GetValue() string { + if x != nil { + return x.xxx_hidden_Value + } + return "" +} + +func (x *MyResponse) SetValue(v string) { + x.xxx_hidden_Value = v +} + +type MyResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Value string +} + +func (b0 MyResponse_builder) Build() *MyResponse { + m0 := &MyResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Value = b.Value + return m0 +} + +var File_zorums_proto protoreflect.FileDescriptor + +var file_zorums_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x7a, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, + 0x64, 0x65, 0x76, 0x1a, 0x0c, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, + 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x22, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x22, 0x0a, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x86, 0x11, 0x0a, 0x0d, 0x5a, 0x6f, 0x72, 0x75, + 0x6d, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x47, 0x52, 0x50, + 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x0a, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, + 0x6c, 0x6c, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3d, 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, + 0x61, 0x6c, 0x6c, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, 0x0c, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, + 0xa0, 0xb6, 0x18, 0x01, 0x12, 0x4d, 0x0a, 0x1a, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, + 0x6c, 0x6c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x12, 0xa0, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, + 0x6c, 0x43, 0x6f, 0x6d, 0x62, 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0xa0, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, + 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0f, 0x51, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x10, 0x51, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x12, + 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x2e, 0x0a, 0x09, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x3c, 0x0a, 0x13, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, + 0x72, 0x67, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x08, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0x12, 0x2f, 0x0a, 0x0a, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x0a, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x33, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, + 0x98, 0xb5, 0x18, 0x01, 0x12, 0x42, 0x0a, 0x0a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x34, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x0f, 0x51, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x0c, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, + 0x18, 0x01, 0x12, 0x46, 0x0a, 0x19, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, + 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0xa0, 0xb5, + 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0x12, 0x56, 0x0a, 0x1f, 0x51, 0x75, + 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0xa0, 0xb5, 0x18, 0x01, + 0xd0, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x62, 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, + 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x10, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, + 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0x12, 0x46, + 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x08, 0xa0, 0xb5, + 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0x12, 0x48, 0x0a, 0x15, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, + 0x12, 0x30, 0x0a, 0x0b, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa8, 0xb5, + 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x15, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, 0x0c, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, + 0x18, 0x01, 0x12, 0x4e, 0x0a, 0x1b, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, + 0xa8, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, + 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x10, 0x43, + 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x40, 0x0a, 0x11, 0x43, + 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, + 0x11, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x1b, 0x43, 0x6f, 0x72, 0x72, 0x65, + 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x4e, + 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0x30, 0x01, 0x12, + 0x56, 0x0a, 0x21, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x12, 0xa8, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x16, 0x43, 0x6f, 0x72, 0x72, 0x65, + 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6d, 0x62, + 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, + 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x16, 0x43, 0x6f, 0x72, 0x72, + 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, + 0x12, 0x48, 0x0a, 0x17, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, 0x12, 0x2c, 0x0a, 0x07, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x36, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x90, 0xb5, 0x18, 0x01, + 0x42, 0x1b, 0x5a, 0x19, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, + 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_zorums_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_zorums_proto_goTypes = []any{ + (*Request)(nil), // 0: dev.Request + (*Response)(nil), // 1: dev.Response + (*MyResponse)(nil), // 2: dev.MyResponse + (*emptypb.Empty)(nil), // 3: google.protobuf.Empty +} +var file_zorums_proto_depIdxs = []int32{ + 0, // 0: dev.ZorumsService.GRPCCall:input_type -> dev.Request + 0, // 1: dev.ZorumsService.QuorumCall:input_type -> dev.Request + 0, // 2: dev.ZorumsService.QuorumCallPerNodeArg:input_type -> dev.Request + 0, // 3: dev.ZorumsService.QuorumCallCustomReturnType:input_type -> dev.Request + 0, // 4: dev.ZorumsService.QuorumCallCombo:input_type -> dev.Request + 3, // 5: dev.ZorumsService.QuorumCallEmpty:input_type -> google.protobuf.Empty + 0, // 6: dev.ZorumsService.QuorumCallEmpty2:input_type -> dev.Request + 0, // 7: dev.ZorumsService.Multicast:input_type -> dev.Request + 0, // 8: dev.ZorumsService.MulticastPerNodeArg:input_type -> dev.Request + 0, // 9: dev.ZorumsService.Multicast2:input_type -> dev.Request + 0, // 10: dev.ZorumsService.Multicast3:input_type -> dev.Request + 3, // 11: dev.ZorumsService.Multicast4:input_type -> google.protobuf.Empty + 0, // 12: dev.ZorumsService.QuorumCallAsync:input_type -> dev.Request + 0, // 13: dev.ZorumsService.QuorumCallAsyncPerNodeArg:input_type -> dev.Request + 0, // 14: dev.ZorumsService.QuorumCallAsyncCustomReturnType:input_type -> dev.Request + 0, // 15: dev.ZorumsService.QuorumCallAsyncCombo:input_type -> dev.Request + 0, // 16: dev.ZorumsService.QuorumCallAsync2:input_type -> dev.Request + 0, // 17: dev.ZorumsService.QuorumCallAsyncEmpty:input_type -> dev.Request + 3, // 18: dev.ZorumsService.QuorumCallAsyncEmpty2:input_type -> google.protobuf.Empty + 0, // 19: dev.ZorumsService.Correctable:input_type -> dev.Request + 0, // 20: dev.ZorumsService.CorrectablePerNodeArg:input_type -> dev.Request + 0, // 21: dev.ZorumsService.CorrectableCustomReturnType:input_type -> dev.Request + 0, // 22: dev.ZorumsService.CorrectableCombo:input_type -> dev.Request + 0, // 23: dev.ZorumsService.CorrectableEmpty:input_type -> dev.Request + 3, // 24: dev.ZorumsService.CorrectableEmpty2:input_type -> google.protobuf.Empty + 0, // 25: dev.ZorumsService.CorrectableStream:input_type -> dev.Request + 0, // 26: dev.ZorumsService.CorrectableStreamPerNodeArg:input_type -> dev.Request + 0, // 27: dev.ZorumsService.CorrectableStreamCustomReturnType:input_type -> dev.Request + 0, // 28: dev.ZorumsService.CorrectableStreamCombo:input_type -> dev.Request + 0, // 29: dev.ZorumsService.CorrectableStreamEmpty:input_type -> dev.Request + 3, // 30: dev.ZorumsService.CorrectableStreamEmpty2:input_type -> google.protobuf.Empty + 0, // 31: dev.ZorumsService.Unicast:input_type -> dev.Request + 0, // 32: dev.ZorumsService.Unicast2:input_type -> dev.Request + 1, // 33: dev.ZorumsService.GRPCCall:output_type -> dev.Response + 1, // 34: dev.ZorumsService.QuorumCall:output_type -> dev.Response + 1, // 35: dev.ZorumsService.QuorumCallPerNodeArg:output_type -> dev.Response + 1, // 36: dev.ZorumsService.QuorumCallCustomReturnType:output_type -> dev.Response + 1, // 37: dev.ZorumsService.QuorumCallCombo:output_type -> dev.Response + 1, // 38: dev.ZorumsService.QuorumCallEmpty:output_type -> dev.Response + 3, // 39: dev.ZorumsService.QuorumCallEmpty2:output_type -> google.protobuf.Empty + 1, // 40: dev.ZorumsService.Multicast:output_type -> dev.Response + 1, // 41: dev.ZorumsService.MulticastPerNodeArg:output_type -> dev.Response + 1, // 42: dev.ZorumsService.Multicast2:output_type -> dev.Response + 3, // 43: dev.ZorumsService.Multicast3:output_type -> google.protobuf.Empty + 3, // 44: dev.ZorumsService.Multicast4:output_type -> google.protobuf.Empty + 1, // 45: dev.ZorumsService.QuorumCallAsync:output_type -> dev.Response + 1, // 46: dev.ZorumsService.QuorumCallAsyncPerNodeArg:output_type -> dev.Response + 1, // 47: dev.ZorumsService.QuorumCallAsyncCustomReturnType:output_type -> dev.Response + 1, // 48: dev.ZorumsService.QuorumCallAsyncCombo:output_type -> dev.Response + 1, // 49: dev.ZorumsService.QuorumCallAsync2:output_type -> dev.Response + 3, // 50: dev.ZorumsService.QuorumCallAsyncEmpty:output_type -> google.protobuf.Empty + 1, // 51: dev.ZorumsService.QuorumCallAsyncEmpty2:output_type -> dev.Response + 1, // 52: dev.ZorumsService.Correctable:output_type -> dev.Response + 1, // 53: dev.ZorumsService.CorrectablePerNodeArg:output_type -> dev.Response + 1, // 54: dev.ZorumsService.CorrectableCustomReturnType:output_type -> dev.Response + 1, // 55: dev.ZorumsService.CorrectableCombo:output_type -> dev.Response + 3, // 56: dev.ZorumsService.CorrectableEmpty:output_type -> google.protobuf.Empty + 1, // 57: dev.ZorumsService.CorrectableEmpty2:output_type -> dev.Response + 1, // 58: dev.ZorumsService.CorrectableStream:output_type -> dev.Response + 1, // 59: dev.ZorumsService.CorrectableStreamPerNodeArg:output_type -> dev.Response + 1, // 60: dev.ZorumsService.CorrectableStreamCustomReturnType:output_type -> dev.Response + 1, // 61: dev.ZorumsService.CorrectableStreamCombo:output_type -> dev.Response + 3, // 62: dev.ZorumsService.CorrectableStreamEmpty:output_type -> google.protobuf.Empty + 1, // 63: dev.ZorumsService.CorrectableStreamEmpty2:output_type -> dev.Response + 1, // 64: dev.ZorumsService.Unicast:output_type -> dev.Response + 3, // 65: dev.ZorumsService.Unicast2:output_type -> google.protobuf.Empty + 33, // [33:66] is the sub-list for method output_type + 0, // [0:33] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_zorums_proto_init() } +func file_zorums_proto_init() { + if File_zorums_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_zorums_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_zorums_proto_goTypes, + DependencyIndexes: file_zorums_proto_depIdxs, + MessageInfos: file_zorums_proto_msgTypes, + }.Build() + File_zorums_proto = out.File + file_zorums_proto_rawDesc = nil + file_zorums_proto_goTypes = nil + file_zorums_proto_depIdxs = nil +} diff --git a/cmd/protoc-gen-gorums/dev/zorums_qspec_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_qspec_gorums.pb.go index 6b71a3062..2f62f0b04 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_qspec_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_qspec_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_quorumcall_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_quorumcall_gorums.pb.go index 0d4baa37e..8cb5d330b 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_quorumcall_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_quorumcall_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_rpc_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_rpc_gorums.pb.go index 4e57c69ec..a2f2f0ac8 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_rpc_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_rpc_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_server_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_server_gorums.pb.go index 6feaaef2b..48f5fc794 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_server_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_server_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_types_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_types_gorums.pb.go index 670dc1383..bcfe30d37 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_types_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_types_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/cmd/protoc-gen-gorums/dev/zorums_unicast_gorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums_unicast_gorums.pb.go index 0d9b4b333..dc5a4d23f 100644 --- a/cmd/protoc-gen-gorums/dev/zorums_unicast_gorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums_unicast_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: zorums.proto package dev diff --git a/correctable.go b/correctable.go index 901eacde8..309d734e6 100644 --- a/correctable.go +++ b/correctable.go @@ -102,7 +102,7 @@ type correctableCallState struct { // This method should only be used by generated code. func (c RawConfiguration) CorrectableCall(ctx context.Context, d CorrectableCallData) *Correctable { expectedReplies := len(c) - md := &ordering.Metadata{MessageID: c.getMsgID(), Method: d.Method} + md := ordering.Metadata_builder{MessageID: c.getMsgID(), Method: d.Method}.Build() replyChan := make(chan response, expectedReplies) for _, n := range c { @@ -141,7 +141,7 @@ func (c RawConfiguration) handleCorrectableCall(ctx context.Context, corr *Corre if state.data.ServerStream { for _, n := range c { - defer n.channel.deleteRouter(state.md.MessageID) + defer n.channel.deleteRouter(state.md.GetMessageID()) } } diff --git a/encoding.go b/encoding.go index a1802d213..e15170b4d 100644 --- a/encoding.go +++ b/encoding.go @@ -110,7 +110,7 @@ func (c Codec) gorumsUnmarshal(b []byte, msg *Message) (err error) { } // get method descriptor from registry - desc, err := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(msg.Metadata.Method)) + desc, err := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(msg.Metadata.GetMethod())) if err != nil { return err } diff --git a/examples/Makefile b/examples/Makefile index 12404d2e4..c18b5fc81 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -26,4 +26,5 @@ tools: download @protoc -I=$(proto_include):. \ --go_out=paths=source_relative:. \ --gorums_out=paths=source_relative:. \ + --go_opt=default_api_level=API_OPAQUE \ $< diff --git a/examples/go.mod b/examples/go.mod index eb20b0b25..8fbd6a23f 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -5,21 +5,21 @@ go 1.22.1 require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/relab/gorums v0.7.0 - golang.org/x/term v0.18.0 - google.golang.org/grpc v1.62.1 - google.golang.org/protobuf v1.34.0 + golang.org/x/term v0.28.0 + google.golang.org/grpc v1.69.4 + google.golang.org/protobuf v1.36.3 ) require ( - github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.19.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.29.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/tools v0.29.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 // indirect ) replace github.com/relab/gorums => ../ diff --git a/examples/go.sum b/examples/go.sum index d366953b1..0de3f77e3 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1,28 +1,44 @@ +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= diff --git a/examples/storage/client.go b/examples/storage/client.go index 8fa9ba218..a26a594a6 100644 --- a/examples/storage/client.go +++ b/examples/storage/client.go @@ -5,7 +5,7 @@ import ( "time" "github.com/relab/gorums" - "github.com/relab/gorums/examples/storage/proto" + pb "github.com/relab/gorums/examples/storage/proto" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) @@ -16,7 +16,7 @@ func runClient(addresses []string) { } // init gorums manager - mgr := proto.NewManager( + mgr := pb.NewManager( gorums.WithDialTimeout(1*time.Second), gorums.WithGrpcDialOptions( grpc.WithBlock(), // block until connections are made @@ -41,7 +41,7 @@ type qspec struct { // supplied to the ReadQC method at call time, and may or may not // be used by the quorum function. If the in parameter is not needed // you should implement your quorum function with '_ *ReadRequest'. -func (q qspec) ReadQCQF(_ *proto.ReadRequest, replies map[uint32]*proto.ReadResponse) (*proto.ReadResponse, bool) { +func (q qspec) ReadQCQF(_ *pb.ReadRequest, replies map[uint32]*pb.ReadResponse) (*pb.ReadResponse, bool) { // wait until at least half of the replicas have responded if len(replies) <= q.cfgSize/2 { return nil, false @@ -55,25 +55,25 @@ func (q qspec) ReadQCQF(_ *proto.ReadRequest, replies map[uint32]*proto.ReadResp // supplied to the WriteQC method at call time, and may or may not // be used by the quorum function. If the in parameter is not needed // you should implement your quorum function with '_ *WriteRequest'. -func (q qspec) WriteQCQF(in *proto.WriteRequest, replies map[uint32]*proto.WriteResponse) (*proto.WriteResponse, bool) { +func (q qspec) WriteQCQF(in *pb.WriteRequest, replies map[uint32]*pb.WriteResponse) (*pb.WriteResponse, bool) { // wait until at least half of the replicas have responded and have updated their value - if numUpdated(replies) <= q.cfgSize/2 { - // if all replicas have responded, there must have been another write before ours - // that had a newer timestamp - if len(replies) == q.cfgSize { - return &proto.WriteResponse{New: false}, true - } - return nil, false + if numUpdated(replies) > q.cfgSize/2 { + return pb.WriteResponse_builder{New: true}.Build(), true + } + // if all replicas have responded, there must have been another write before ours + // that had a newer timestamp + if len(replies) == q.cfgSize { + return pb.WriteResponse_builder{New: false}.Build(), true } - return &proto.WriteResponse{New: true}, true + return nil, false } // newestValue returns the reply that had the most recent timestamp -func newestValue(values map[uint32]*proto.ReadResponse) *proto.ReadResponse { +func newestValue(values map[uint32]*pb.ReadResponse) *pb.ReadResponse { if len(values) < 1 { return nil } - var newest *proto.ReadResponse + var newest *pb.ReadResponse for _, v := range values { if v.GetTime().AsTime().After(newest.GetTime().AsTime()) { newest = v @@ -83,7 +83,7 @@ func newestValue(values map[uint32]*proto.ReadResponse) *proto.ReadResponse { } // numUpdated returns the number of replicas that updated their value -func numUpdated(replies map[uint32]*proto.WriteResponse) int { +func numUpdated(replies map[uint32]*pb.WriteResponse) int { count := 0 for _, r := range replies { if r.GetNew() { diff --git a/examples/storage/proto/storage.pb.go b/examples/storage/proto/storage.pb.go index 9f48bfddb..3e4cc623f 100644 --- a/examples/storage/proto/storage.pb.go +++ b/examples/storage/proto/storage.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.36.3 // protoc v5.29.2 // source: storage/proto/storage.proto @@ -13,7 +13,6 @@ import ( emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" - sync "sync" ) const ( @@ -24,20 +23,17 @@ const ( ) type ReadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Key string `protobuf:"bytes,1,opt,name=Key"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReadRequest) Reset() { *x = ReadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_storage_proto_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_storage_proto_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRequest) String() string { @@ -48,7 +44,7 @@ func (*ReadRequest) ProtoMessage() {} func (x *ReadRequest) ProtoReflect() protoreflect.Message { mi := &file_storage_proto_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58,35 +54,45 @@ func (x *ReadRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead. -func (*ReadRequest) Descriptor() ([]byte, []int) { - return file_storage_proto_storage_proto_rawDescGZIP(), []int{0} -} - func (x *ReadRequest) GetKey() string { if x != nil { - return x.Key + return x.xxx_hidden_Key } return "" } -type ReadResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *ReadRequest) SetKey(v string) { + x.xxx_hidden_Key = v +} - OK bool `protobuf:"varint,1,opt,name=OK" json:"OK,omitempty"` - Value string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time" json:"Time,omitempty"` +type ReadRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Key string +} + +func (b0 ReadRequest_builder) Build() *ReadRequest { + m0 := &ReadRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Key = b.Key + return m0 +} + +type ReadResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_OK bool `protobuf:"varint,1,opt,name=OK"` + xxx_hidden_Value string `protobuf:"bytes,2,opt,name=Value"` + xxx_hidden_Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReadResponse) Reset() { *x = ReadResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_storage_proto_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_storage_proto_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadResponse) String() string { @@ -97,7 +103,7 @@ func (*ReadResponse) ProtoMessage() {} func (x *ReadResponse) ProtoReflect() protoreflect.Message { mi := &file_storage_proto_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107,49 +113,82 @@ func (x *ReadResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead. -func (*ReadResponse) Descriptor() ([]byte, []int) { - return file_storage_proto_storage_proto_rawDescGZIP(), []int{1} -} - func (x *ReadResponse) GetOK() bool { if x != nil { - return x.OK + return x.xxx_hidden_OK } return false } func (x *ReadResponse) GetValue() string { if x != nil { - return x.Value + return x.xxx_hidden_Value } return "" } func (x *ReadResponse) GetTime() *timestamppb.Timestamp { if x != nil { - return x.Time + return x.xxx_hidden_Time } return nil } -type WriteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *ReadResponse) SetOK(v bool) { + x.xxx_hidden_OK = v +} + +func (x *ReadResponse) SetValue(v string) { + x.xxx_hidden_Value = v +} + +func (x *ReadResponse) SetTime(v *timestamppb.Timestamp) { + x.xxx_hidden_Time = v +} + +func (x *ReadResponse) HasTime() bool { + if x == nil { + return false + } + return x.xxx_hidden_Time != nil +} + +func (x *ReadResponse) ClearTime() { + x.xxx_hidden_Time = nil +} + +type ReadResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + OK bool + Value string + Time *timestamppb.Timestamp +} + +func (b0 ReadResponse_builder) Build() *ReadResponse { + m0 := &ReadResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_OK = b.OK + x.xxx_hidden_Value = b.Value + x.xxx_hidden_Time = b.Time + return m0 +} - Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time" json:"Time,omitempty"` +type WriteRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Key string `protobuf:"bytes,1,opt,name=Key"` + xxx_hidden_Value string `protobuf:"bytes,2,opt,name=Value"` + xxx_hidden_Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Time"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *WriteRequest) Reset() { *x = WriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_storage_proto_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_storage_proto_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteRequest) String() string { @@ -160,7 +199,7 @@ func (*WriteRequest) ProtoMessage() {} func (x *WriteRequest) ProtoReflect() protoreflect.Message { mi := &file_storage_proto_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,47 +209,80 @@ func (x *WriteRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead. -func (*WriteRequest) Descriptor() ([]byte, []int) { - return file_storage_proto_storage_proto_rawDescGZIP(), []int{2} -} - func (x *WriteRequest) GetKey() string { if x != nil { - return x.Key + return x.xxx_hidden_Key } return "" } func (x *WriteRequest) GetValue() string { if x != nil { - return x.Value + return x.xxx_hidden_Value } return "" } func (x *WriteRequest) GetTime() *timestamppb.Timestamp { if x != nil { - return x.Time + return x.xxx_hidden_Time } return nil } -type WriteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *WriteRequest) SetKey(v string) { + x.xxx_hidden_Key = v +} + +func (x *WriteRequest) SetValue(v string) { + x.xxx_hidden_Value = v +} + +func (x *WriteRequest) SetTime(v *timestamppb.Timestamp) { + x.xxx_hidden_Time = v +} + +func (x *WriteRequest) HasTime() bool { + if x == nil { + return false + } + return x.xxx_hidden_Time != nil +} + +func (x *WriteRequest) ClearTime() { + x.xxx_hidden_Time = nil +} + +type WriteRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - New bool `protobuf:"varint,1,opt,name=New" json:"New,omitempty"` + Key string + Value string + Time *timestamppb.Timestamp +} + +func (b0 WriteRequest_builder) Build() *WriteRequest { + m0 := &WriteRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Key = b.Key + x.xxx_hidden_Value = b.Value + x.xxx_hidden_Time = b.Time + return m0 +} + +type WriteResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_New bool `protobuf:"varint,1,opt,name=New"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *WriteResponse) Reset() { *x = WriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_storage_proto_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_storage_proto_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteResponse) String() string { @@ -221,7 +293,7 @@ func (*WriteResponse) ProtoMessage() {} func (x *WriteResponse) ProtoReflect() protoreflect.Message { mi := &file_storage_proto_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,18 +303,31 @@ func (x *WriteResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead. -func (*WriteResponse) Descriptor() ([]byte, []int) { - return file_storage_proto_storage_proto_rawDescGZIP(), []int{3} -} - func (x *WriteResponse) GetNew() bool { if x != nil { - return x.New + return x.xxx_hidden_New } return false } +func (x *WriteResponse) SetNew(v bool) { + x.xxx_hidden_New = v +} + +type WriteResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + New bool +} + +func (b0 WriteResponse_builder) Build() *WriteResponse { + m0 := &WriteResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_New = b.New + return m0 +} + var File_storage_proto_storage_proto protoreflect.FileDescriptor var file_storage_proto_storage_proto_rawDesc = []byte{ @@ -253,67 +338,52 @@ var file_storage_proto_storage_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x17, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x22, 0x72, 0x0a, 0x0c, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x02, 0x4f, 0x4b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x02, 0x4f, - 0x4b, 0x12, 0x1b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, - 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x74, - 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, - 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x01, 0x02, - 0x08, 0x02, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, - 0x54, 0x69, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x03, 0x4e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x02, 0x52, 0x03, 0x4e, 0x65, 0x77, 0x32, 0xc4, - 0x02, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x50, 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x50, 0x43, - 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x51, 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, + 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x4b, 0x65, 0x79, 0x22, 0x64, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x4b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x02, 0x4f, 0x4b, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x0c, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x54, 0x69, 0x6d, + 0x65, 0x22, 0x21, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x03, 0x4e, 0x65, 0x77, 0x32, 0xc4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x12, 0x38, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x52, 0x50, 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3e, - 0x0a, 0x07, 0x57, 0x72, 0x69, 0x74, 0x65, 0x51, 0x43, 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x45, - 0x0a, 0x0e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, - 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x04, 0x98, 0xb5, 0x18, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, - 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x70, 0xe8, 0x07, -} - -var ( - file_storage_proto_storage_proto_rawDescOnce sync.Once - file_storage_proto_storage_proto_rawDescData = file_storage_proto_storage_proto_rawDesc -) - -func file_storage_proto_storage_proto_rawDescGZIP() []byte { - file_storage_proto_storage_proto_rawDescOnce.Do(func() { - file_storage_proto_storage_proto_rawDescData = protoimpl.X.CompressGZIP(file_storage_proto_storage_proto_rawDescData) - }) - return file_storage_proto_storage_proto_rawDescData + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x52, 0x50, 0x43, 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x51, + 0x43, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, + 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x57, 0x72, 0x69, 0x74, 0x65, 0x51, 0x43, 0x12, + 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, + 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x45, 0x0a, 0x0e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x42, 0x35, 0x5a, 0x2e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, + 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x92, 0x03, 0x02, + 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var file_storage_proto_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_storage_proto_storage_proto_goTypes = []interface{}{ +var file_storage_proto_storage_proto_goTypes = []any{ (*ReadRequest)(nil), // 0: storage.ReadRequest (*ReadResponse)(nil), // 1: storage.ReadResponse (*WriteRequest)(nil), // 2: storage.WriteRequest @@ -346,56 +416,6 @@ func file_storage_proto_storage_proto_init() { if File_storage_proto_storage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_storage_proto_storage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_storage_proto_storage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_storage_proto_storage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_storage_proto_storage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/examples/storage/proto/storage.proto b/examples/storage/proto/storage.proto index 19da3a902..e96c9a625 100644 --- a/examples/storage/proto/storage.proto +++ b/examples/storage/proto/storage.proto @@ -4,6 +4,8 @@ package storage; option go_package = "github.com/relab/gorums/examples/storage/proto"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; @@ -29,18 +31,18 @@ service Storage { } } -message ReadRequest { string Key = 1 [features.field_presence = IMPLICIT]; } +message ReadRequest { string Key = 1; } message ReadResponse { - bool OK = 1 [features.field_presence = IMPLICIT]; - string Value = 2 [features.field_presence = IMPLICIT]; + bool OK = 1; + string Value = 2; google.protobuf.Timestamp Time = 3; } message WriteRequest { - string Key = 1 [features.field_presence = IMPLICIT]; - string Value = 2 [features.field_presence = IMPLICIT]; + string Key = 1; + string Value = 2; google.protobuf.Timestamp Time = 3; } -message WriteResponse { bool New = 1 [features.field_presence = IMPLICIT]; } +message WriteResponse { bool New = 1; } diff --git a/examples/storage/repl.go b/examples/storage/repl.go index 05015ca16..59978e867 100644 --- a/examples/storage/repl.go +++ b/examples/storage/repl.go @@ -12,7 +12,7 @@ import ( "github.com/google/shlex" "github.com/relab/gorums" - "github.com/relab/gorums/examples/storage/proto" + pb "github.com/relab/gorums/examples/storage/proto" "golang.org/x/term" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -52,12 +52,12 @@ The command performs the write quorum call on node 0 and 2 ` type repl struct { - mgr *proto.Manager - cfg *proto.Configuration + mgr *pb.Manager + cfg *pb.Configuration term *term.Terminal } -func newRepl(mgr *proto.Manager, cfg *proto.Configuration) *repl { +func newRepl(mgr *pb.Manager, cfg *pb.Configuration) *repl { return &repl{ mgr: mgr, cfg: cfg, @@ -90,7 +90,7 @@ func (r repl) ReadLine() (string, error) { // Repl runs an interactive Read-eval-print loop, that allows users to run commands that perform // RPCs and quorum calls using the manager and configuration. -func Repl(mgr *proto.Manager, defaultCfg *proto.Configuration) { +func Repl(mgr *pb.Manager, defaultCfg *pb.Configuration) { r := newRepl(mgr, defaultCfg) fmt.Println(help) @@ -174,7 +174,7 @@ func (r repl) multicast(args []string) { } ctx, cancel := context.WithTimeout(context.Background(), time.Second) - r.cfg.WriteMulticast(ctx, &proto.WriteRequest{Key: args[0], Value: args[1]}) + r.cfg.WriteMulticast(ctx, pb.WriteRequest_builder{Key: args[0], Value: args[1]}.Build()) cancel() fmt.Println("Multicast OK: (server output not synchronized)") } @@ -210,13 +210,13 @@ func (r repl) qcCfg(args []string) { } } -func (repl) readRPC(args []string, node *proto.Node) { +func (repl) readRPC(args []string, node *pb.Node) { if len(args) < 1 { fmt.Println("Read requires a key to read.") return } ctx, cancel := context.WithTimeout(context.Background(), time.Second) - resp, err := node.ReadRPC(ctx, &proto.ReadRequest{Key: args[0]}) + resp, err := node.ReadRPC(ctx, pb.ReadRequest_builder{Key: args[0]}.Build()) cancel() if err != nil { fmt.Printf("Read RPC finished with error: %v\n", err) @@ -229,13 +229,13 @@ func (repl) readRPC(args []string, node *proto.Node) { fmt.Printf("%s = %s\n", args[0], resp.GetValue()) } -func (repl) writeRPC(args []string, node *proto.Node) { +func (repl) writeRPC(args []string, node *pb.Node) { if len(args) < 2 { fmt.Println("Write requires a key and a value to write.") return } ctx, cancel := context.WithTimeout(context.Background(), time.Second) - resp, err := node.WriteRPC(ctx, &proto.WriteRequest{Key: args[0], Value: args[1], Time: timestamppb.Now()}) + resp, err := node.WriteRPC(ctx, pb.WriteRequest_builder{Key: args[0], Value: args[1], Time: timestamppb.Now()}.Build()) cancel() if err != nil { fmt.Printf("Write RPC finished with error: %v\n", err) @@ -248,13 +248,13 @@ func (repl) writeRPC(args []string, node *proto.Node) { fmt.Println("Write OK") } -func (repl) readQC(args []string, cfg *proto.Configuration) { +func (repl) readQC(args []string, cfg *pb.Configuration) { if len(args) < 1 { fmt.Println("Read requires a key to read.") return } ctx, cancel := context.WithTimeout(context.Background(), time.Second) - resp, err := cfg.ReadQC(ctx, &proto.ReadRequest{Key: args[0]}) + resp, err := cfg.ReadQC(ctx, pb.ReadRequest_builder{Key: args[0]}.Build()) cancel() if err != nil { fmt.Printf("Read RPC finished with error: %v\n", err) @@ -267,13 +267,13 @@ func (repl) readQC(args []string, cfg *proto.Configuration) { fmt.Printf("%s = %s\n", args[0], resp.GetValue()) } -func (repl) writeQC(args []string, cfg *proto.Configuration) { +func (repl) writeQC(args []string, cfg *pb.Configuration) { if len(args) < 2 { fmt.Println("Write requires a key and a value to write.") return } ctx, cancel := context.WithTimeout(context.Background(), time.Second) - resp, err := cfg.WriteQC(ctx, &proto.WriteRequest{Key: args[0], Value: args[1], Time: timestamppb.Now()}) + resp, err := cfg.WriteQC(ctx, pb.WriteRequest_builder{Key: args[0], Value: args[1], Time: timestamppb.Now()}.Build()) cancel() if err != nil { fmt.Printf("Write RPC finished with error: %v\n", err) @@ -286,7 +286,7 @@ func (repl) writeQC(args []string, cfg *proto.Configuration) { fmt.Println("Write OK") } -func (r repl) parseConfiguration(cfgStr string) (cfg *proto.Configuration) { +func (r repl) parseConfiguration(cfgStr string) (cfg *pb.Configuration) { // configuration using range syntax if i := strings.Index(cfgStr, ":"); i > -1 { var start, stop int diff --git a/examples/storage/server.go b/examples/storage/server.go index c5d00a993..4e6660434 100644 --- a/examples/storage/server.go +++ b/examples/storage/server.go @@ -11,7 +11,7 @@ import ( "time" "github.com/relab/gorums" - "github.com/relab/gorums/examples/storage/proto" + pb "github.com/relab/gorums/examples/storage/proto" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -29,7 +29,7 @@ func startServer(address string) (*gorums.Server, string) { // create Gorums server srv := gorums.NewServer() // register server implementation with Gorums server - proto.RegisterStorageServer(srv, storage) + pb.RegisterStorageServer(srv, storage) // handle requests on listener go func() { err := srv.Serve(lis) @@ -60,7 +60,7 @@ type state struct { Time time.Time } -// storageServer is an implementation of proto.Storage +// storageServer is an implementation of pb.Storage type storageServer struct { storage map[string]state mut sync.RWMutex @@ -74,26 +74,26 @@ func newStorageServer() *storageServer { } // ReadRPC is an RPC handler -func (s *storageServer) ReadRPC(_ gorums.ServerCtx, req *proto.ReadRequest) (resp *proto.ReadResponse, err error) { +func (s *storageServer) ReadRPC(_ gorums.ServerCtx, req *pb.ReadRequest) (resp *pb.ReadResponse, err error) { return s.Read(req) } // WriteRPC is an RPC handler -func (s *storageServer) WriteRPC(_ gorums.ServerCtx, req *proto.WriteRequest) (resp *proto.WriteResponse, err error) { +func (s *storageServer) WriteRPC(_ gorums.ServerCtx, req *pb.WriteRequest) (resp *pb.WriteResponse, err error) { return s.Write(req) } // ReadQC is an RPC handler for a quorum call -func (s *storageServer) ReadQC(_ gorums.ServerCtx, req *proto.ReadRequest) (resp *proto.ReadResponse, err error) { +func (s *storageServer) ReadQC(_ gorums.ServerCtx, req *pb.ReadRequest) (resp *pb.ReadResponse, err error) { return s.Read(req) } // WriteQC is an RPC handler for a quorum call -func (s *storageServer) WriteQC(_ gorums.ServerCtx, req *proto.WriteRequest) (resp *proto.WriteResponse, err error) { +func (s *storageServer) WriteQC(_ gorums.ServerCtx, req *pb.WriteRequest) (resp *pb.WriteResponse, err error) { return s.Write(req) } -func (s *storageServer) WriteMulticast(_ gorums.ServerCtx, req *proto.WriteRequest) { +func (s *storageServer) WriteMulticast(_ gorums.ServerCtx, req *pb.WriteRequest) { _, err := s.Write(req) if err != nil { s.logger.Printf("Write error: %v", err) @@ -101,26 +101,26 @@ func (s *storageServer) WriteMulticast(_ gorums.ServerCtx, req *proto.WriteReque } // Read reads a value from storage -func (s *storageServer) Read(req *proto.ReadRequest) (*proto.ReadResponse, error) { +func (s *storageServer) Read(req *pb.ReadRequest) (*pb.ReadResponse, error) { s.logger.Printf("Read '%s'\n", req.GetKey()) s.mut.RLock() defer s.mut.RUnlock() state, ok := s.storage[req.GetKey()] if !ok { - return &proto.ReadResponse{OK: false}, nil + return pb.ReadResponse_builder{OK: false}.Build(), nil } - return &proto.ReadResponse{OK: true, Value: state.Value, Time: timestamppb.New(state.Time)}, nil + return pb.ReadResponse_builder{OK: true, Value: state.Value, Time: timestamppb.New(state.Time)}.Build(), nil } // Write writes a new value to storage if it is newer than the old value -func (s *storageServer) Write(req *proto.WriteRequest) (*proto.WriteResponse, error) { +func (s *storageServer) Write(req *pb.WriteRequest) (*pb.WriteResponse, error) { s.logger.Printf("Write '%s' = '%s'\n", req.GetKey(), req.GetValue()) s.mut.Lock() defer s.mut.Unlock() oldState, ok := s.storage[req.GetKey()] if ok && oldState.Time.After(req.GetTime().AsTime()) { - return &proto.WriteResponse{New: false}, nil + return pb.WriteResponse_builder{New: false}.Build(), nil } s.storage[req.GetKey()] = state{Value: req.GetValue(), Time: req.GetTime().AsTime()} - return &proto.WriteResponse{New: true}, nil + return pb.WriteResponse_builder{New: true}.Build(), nil } diff --git a/go.mod b/go.mod index fcf99ca5d..a09844d2c 100644 --- a/go.mod +++ b/go.mod @@ -4,18 +4,17 @@ go 1.22.1 require ( github.com/google/go-cmp v0.6.0 - golang.org/x/sync v0.6.0 - golang.org/x/tools v0.19.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 - google.golang.org/grpc v1.62.1 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.34.0 + golang.org/x/sync v0.10.0 + golang.org/x/tools v0.29.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f + google.golang.org/grpc v1.69.4 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 + google.golang.org/protobuf v1.36.3 ) require ( - github.com/golang/protobuf v1.5.4 // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/sys v0.29.0 // indirect + golang.org/x/text v0.21.0 // indirect ) diff --git a/go.sum b/go.sum index a4a3eba27..e7193ec21 100644 --- a/go.sum +++ b/go.sum @@ -1,24 +1,40 @@ +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= diff --git a/gorums.pb.go b/gorums.pb.go index c4d807d2f..0e384e134 100644 --- a/gorums.pb.go +++ b/gorums.pb.go @@ -1,9 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: gorums.proto +//go:build !protoopaque + package gorums import ( @@ -154,7 +156,7 @@ var file_gorums_proto_rawDesc = []byte{ 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_gorums_proto_goTypes = []interface{}{ +var file_gorums_proto_goTypes = []any{ (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions } var file_gorums_proto_depIdxs = []int32{ diff --git a/gorums_protoopaque.pb.go b/gorums_protoopaque.pb.go new file mode 100644 index 000000000..d98d70b15 --- /dev/null +++ b/gorums_protoopaque.pb.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.3 +// protoc v5.29.2 +// source: gorums.proto + +//go:build protoopaque + +package gorums + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +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) +) + +var file_gorums_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50001, + Name: "gorums.rpc", + Tag: "varint,50001,opt,name=rpc", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50002, + Name: "gorums.unicast", + Tag: "varint,50002,opt,name=unicast", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50003, + Name: "gorums.multicast", + Tag: "varint,50003,opt,name=multicast", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50004, + Name: "gorums.quorumcall", + Tag: "varint,50004,opt,name=quorumcall", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50005, + Name: "gorums.correctable", + Tag: "varint,50005,opt,name=correctable", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50010, + Name: "gorums.async", + Tag: "varint,50010,opt,name=async", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50020, + Name: "gorums.per_node_arg", + Tag: "varint,50020,opt,name=per_node_arg", + Filename: "gorums.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50030, + Name: "gorums.custom_return_type", + Tag: "bytes,50030,opt,name=custom_return_type", + Filename: "gorums.proto", + }, +} + +// Extension fields to descriptorpb.MethodOptions. +var ( + // call types + // + // optional bool rpc = 50001; + E_Rpc = &file_gorums_proto_extTypes[0] + // optional bool unicast = 50002; + E_Unicast = &file_gorums_proto_extTypes[1] + // optional bool multicast = 50003; + E_Multicast = &file_gorums_proto_extTypes[2] + // optional bool quorumcall = 50004; + E_Quorumcall = &file_gorums_proto_extTypes[3] + // optional bool correctable = 50005; + E_Correctable = &file_gorums_proto_extTypes[4] + // options for call types + // + // optional bool async = 50010; + E_Async = &file_gorums_proto_extTypes[5] + // optional bool per_node_arg = 50020; + E_PerNodeArg = &file_gorums_proto_extTypes[6] + // optional string custom_return_type = 50030; + E_CustomReturnType = &file_gorums_proto_extTypes[7] +) + +var File_gorums_proto protoreflect.FileDescriptor + +var file_gorums_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, + 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x32, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x12, + 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xd1, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x0a, 0x07, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x3a, 0x3e, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd3, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x3a, 0x40, 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd4, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x63, 0x61, 0x6c, 0x6c, 0x3a, 0x42, 0x0a, 0x0b, 0x63, 0x6f, + 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd5, 0x86, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x36, + 0x0a, 0x05, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xda, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x42, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x61, 0x72, 0x67, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe4, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x70, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x3a, 0x4e, 0x0a, 0x12, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0xee, 0x86, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, + 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_gorums_proto_goTypes = []any{ + (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions +} +var file_gorums_proto_depIdxs = []int32{ + 0, // 0: gorums.rpc:extendee -> google.protobuf.MethodOptions + 0, // 1: gorums.unicast:extendee -> google.protobuf.MethodOptions + 0, // 2: gorums.multicast:extendee -> google.protobuf.MethodOptions + 0, // 3: gorums.quorumcall:extendee -> google.protobuf.MethodOptions + 0, // 4: gorums.correctable:extendee -> google.protobuf.MethodOptions + 0, // 5: gorums.async:extendee -> google.protobuf.MethodOptions + 0, // 6: gorums.per_node_arg:extendee -> google.protobuf.MethodOptions + 0, // 7: gorums.custom_return_type:extendee -> google.protobuf.MethodOptions + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 0, // [0:8] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_gorums_proto_init() } +func file_gorums_proto_init() { + if File_gorums_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gorums_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 8, + NumServices: 0, + }, + GoTypes: file_gorums_proto_goTypes, + DependencyIndexes: file_gorums_proto_depIdxs, + ExtensionInfos: file_gorums_proto_extTypes, + }.Build() + File_gorums_proto = out.File + file_gorums_proto_rawDesc = nil + file_gorums_proto_goTypes = nil + file_gorums_proto_depIdxs = nil +} diff --git a/internal/correctable/opts.pb.go b/internal/correctable/opts.pb.go index d1f15c0ef..34844ac3b 100644 --- a/internal/correctable/opts.pb.go +++ b/internal/correctable/opts.pb.go @@ -1,9 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: internal/correctable/opts.proto +//go:build !protoopaque + package correctable import ( @@ -70,7 +72,7 @@ var file_internal_correctable_opts_proto_rawDesc = []byte{ 0x62, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_internal_correctable_opts_proto_goTypes = []interface{}{ +var file_internal_correctable_opts_proto_goTypes = []any{ (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions } var file_internal_correctable_opts_proto_depIdxs = []int32{ diff --git a/internal/correctable/opts_protoopaque.pb.go b/internal/correctable/opts_protoopaque.pb.go new file mode 100644 index 000000000..aeec1172f --- /dev/null +++ b/internal/correctable/opts_protoopaque.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.3 +// protoc v5.29.2 +// source: internal/correctable/opts.proto + +//go:build protoopaque + +package correctable + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +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) +) + +var file_internal_correctable_opts_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 6200, + Name: "correctable.correctable", + Tag: "varint,6200,opt,name=correctable", + Filename: "internal/correctable/opts.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 6201, + Name: "correctable.correctable_stream", + Tag: "varint,6201,opt,name=correctable_stream", + Filename: "internal/correctable/opts.proto", + }, +} + +// Extension fields to descriptorpb.MethodOptions. +var ( + // optional bool correctable = 6200; + E_Correctable = &file_internal_correctable_opts_proto_extTypes[0] + // optional bool correctable_stream = 6201; + E_CorrectableStream = &file_internal_correctable_opts_proto_extTypes[1] +) + +var File_internal_correctable_opts_proto protoreflect.FileDescriptor + +var file_internal_correctable_opts_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x72, 0x65, + 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x20, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x3a, 0x41, 0x0a, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xb8, 0x30, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x3a, 0x4e, 0x0a, 0x12, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb9, 0x30, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_internal_correctable_opts_proto_goTypes = []any{ + (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions +} +var file_internal_correctable_opts_proto_depIdxs = []int32{ + 0, // 0: correctable.correctable:extendee -> google.protobuf.MethodOptions + 0, // 1: correctable.correctable_stream:extendee -> google.protobuf.MethodOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 0, // [0:2] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_internal_correctable_opts_proto_init() } +func file_internal_correctable_opts_proto_init() { + if File_internal_correctable_opts_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_internal_correctable_opts_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 2, + NumServices: 0, + }, + GoTypes: file_internal_correctable_opts_proto_goTypes, + DependencyIndexes: file_internal_correctable_opts_proto_depIdxs, + ExtensionInfos: file_internal_correctable_opts_proto_extTypes, + }.Build() + File_internal_correctable_opts_proto = out.File + file_internal_correctable_opts_proto_rawDesc = nil + file_internal_correctable_opts_proto_goTypes = nil + file_internal_correctable_opts_proto_depIdxs = nil +} diff --git a/multicast.go b/multicast.go index 1b265c8c8..f22c6550f 100644 --- a/multicast.go +++ b/multicast.go @@ -12,7 +12,7 @@ import ( // before the message has been sent. func (c RawConfiguration) Multicast(ctx context.Context, d QuorumCallData, opts ...CallOption) { o := getCallOptions(E_Multicast, opts) - md := &ordering.Metadata{MessageID: c.getMsgID(), Method: d.Method} + md := ordering.Metadata_builder{MessageID: c.getMsgID(), Method: d.Method}.Build() sentMsgs := 0 var replyChan chan response diff --git a/ordering/ordering.pb.go b/ordering/ordering.pb.go index 990c7bd75..acf740522 100644 --- a/ordering/ordering.pb.go +++ b/ordering/ordering.pb.go @@ -1,9 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: ordering/ordering.proto +//go:build !protoopaque + package ordering import ( @@ -11,7 +13,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - sync "sync" ) const ( @@ -24,22 +25,19 @@ const ( // Metadata is sent together with application-specific message types, // and contains information necessary for Gorums to handle the messages. type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"hybrid.v1"` + MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` + Method string `protobuf:"bytes,2,opt,name=Method,proto3" json:"Method,omitempty"` + Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"` unknownFields protoimpl.UnknownFields - - MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` - Method string `protobuf:"bytes,2,opt,name=Method,proto3" json:"Method,omitempty"` - Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_ordering_ordering_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ordering_ordering_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -50,7 +48,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_ordering_ordering_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60,11 +58,6 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_ordering_ordering_proto_rawDescGZIP(), []int{0} -} - func (x *Metadata) GetMessageID() uint64 { if x != nil { return x.MessageID @@ -86,6 +79,47 @@ func (x *Metadata) GetStatus() *status.Status { return nil } +func (x *Metadata) SetMessageID(v uint64) { + x.MessageID = v +} + +func (x *Metadata) SetMethod(v string) { + x.Method = v +} + +func (x *Metadata) SetStatus(v *status.Status) { + x.Status = v +} + +func (x *Metadata) HasStatus() bool { + if x == nil { + return false + } + return x.Status != nil +} + +func (x *Metadata) ClearStatus() { + x.Status = nil +} + +type Metadata_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + MessageID uint64 + Method string + Status *status.Status +} + +func (b0 Metadata_builder) Build() *Metadata { + m0 := &Metadata{} + b, x := &b0, m0 + _, _ = b, x + x.MessageID = b.MessageID + x.Method = b.Method + x.Status = b.Status + return m0 +} + var File_ordering_ordering_proto protoreflect.FileDescriptor var file_ordering_ordering_proto_rawDesc = []byte{ @@ -109,20 +143,8 @@ var file_ordering_ordering_proto_rawDesc = []byte{ 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var ( - file_ordering_ordering_proto_rawDescOnce sync.Once - file_ordering_ordering_proto_rawDescData = file_ordering_ordering_proto_rawDesc -) - -func file_ordering_ordering_proto_rawDescGZIP() []byte { - file_ordering_ordering_proto_rawDescOnce.Do(func() { - file_ordering_ordering_proto_rawDescData = protoimpl.X.CompressGZIP(file_ordering_ordering_proto_rawDescData) - }) - return file_ordering_ordering_proto_rawDescData -} - var file_ordering_ordering_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_ordering_ordering_proto_goTypes = []interface{}{ +var file_ordering_ordering_proto_goTypes = []any{ (*Metadata)(nil), // 0: ordering.Metadata (*status.Status)(nil), // 1: google.rpc.Status } @@ -142,20 +164,6 @@ func file_ordering_ordering_proto_init() { if File_ordering_ordering_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ordering_ordering_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ordering/ordering_grpc.pb.go b/ordering/ordering_grpc.pb.go index 2a1bdb4f8..385adba95 100644 --- a/ordering/ordering_grpc.pb.go +++ b/ordering/ordering_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.3 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.2 // source: ordering/ordering.proto package ordering @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Gorums_NodeStream_FullMethodName = "/ordering.Gorums/NodeStream" @@ -29,7 +29,7 @@ type GorumsClient interface { // NodeStream is a stream that connects a client to a Node. // The messages that are sent on the stream contain both Metadata // and an application-specific message. - NodeStream(ctx context.Context, opts ...grpc.CallOption) (Gorums_NodeStreamClient, error) + NodeStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Metadata, Metadata], error) } type gorumsClient struct { @@ -40,56 +40,42 @@ func NewGorumsClient(cc grpc.ClientConnInterface) GorumsClient { return &gorumsClient{cc} } -func (c *gorumsClient) NodeStream(ctx context.Context, opts ...grpc.CallOption) (Gorums_NodeStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &Gorums_ServiceDesc.Streams[0], Gorums_NodeStream_FullMethodName, opts...) +func (c *gorumsClient) NodeStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Metadata, Metadata], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Gorums_ServiceDesc.Streams[0], Gorums_NodeStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &gorumsNodeStreamClient{stream} + x := &grpc.GenericClientStream[Metadata, Metadata]{ClientStream: stream} return x, nil } -type Gorums_NodeStreamClient interface { - Send(*Metadata) error - Recv() (*Metadata, error) - grpc.ClientStream -} - -type gorumsNodeStreamClient struct { - grpc.ClientStream -} - -func (x *gorumsNodeStreamClient) Send(m *Metadata) error { - return x.ClientStream.SendMsg(m) -} - -func (x *gorumsNodeStreamClient) Recv() (*Metadata, error) { - m := new(Metadata) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Gorums_NodeStreamClient = grpc.BidiStreamingClient[Metadata, Metadata] // GorumsServer is the server API for Gorums service. // All implementations must embed UnimplementedGorumsServer -// for forward compatibility +// for forward compatibility. type GorumsServer interface { // NodeStream is a stream that connects a client to a Node. // The messages that are sent on the stream contain both Metadata // and an application-specific message. - NodeStream(Gorums_NodeStreamServer) error + NodeStream(grpc.BidiStreamingServer[Metadata, Metadata]) error mustEmbedUnimplementedGorumsServer() } -// UnimplementedGorumsServer must be embedded to have forward compatible implementations. -type UnimplementedGorumsServer struct { -} +// UnimplementedGorumsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGorumsServer struct{} -func (UnimplementedGorumsServer) NodeStream(Gorums_NodeStreamServer) error { +func (UnimplementedGorumsServer) NodeStream(grpc.BidiStreamingServer[Metadata, Metadata]) error { return status.Errorf(codes.Unimplemented, "method NodeStream not implemented") } func (UnimplementedGorumsServer) mustEmbedUnimplementedGorumsServer() {} +func (UnimplementedGorumsServer) testEmbeddedByValue() {} // UnsafeGorumsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GorumsServer will @@ -99,34 +85,22 @@ type UnsafeGorumsServer interface { } func RegisterGorumsServer(s grpc.ServiceRegistrar, srv GorumsServer) { + // If the following call pancis, it indicates UnimplementedGorumsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Gorums_ServiceDesc, srv) } func _Gorums_NodeStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(GorumsServer).NodeStream(&gorumsNodeStreamServer{stream}) -} - -type Gorums_NodeStreamServer interface { - Send(*Metadata) error - Recv() (*Metadata, error) - grpc.ServerStream -} - -type gorumsNodeStreamServer struct { - grpc.ServerStream + return srv.(GorumsServer).NodeStream(&grpc.GenericServerStream[Metadata, Metadata]{ServerStream: stream}) } -func (x *gorumsNodeStreamServer) Send(m *Metadata) error { - return x.ServerStream.SendMsg(m) -} - -func (x *gorumsNodeStreamServer) Recv() (*Metadata, error) { - m := new(Metadata) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Gorums_NodeStreamServer = grpc.BidiStreamingServer[Metadata, Metadata] // Gorums_ServiceDesc is the grpc.ServiceDesc for Gorums service. // It's only intended for direct use with grpc.RegisterService, diff --git a/ordering/ordering_protoopaque.pb.go b/ordering/ordering_protoopaque.pb.go new file mode 100644 index 000000000..58abede15 --- /dev/null +++ b/ordering/ordering_protoopaque.pb.go @@ -0,0 +1,185 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.3 +// protoc v5.29.2 +// source: ordering/ordering.proto + +//go:build protoopaque + +package ordering + +import ( + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +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) +) + +// Metadata is sent together with application-specific message types, +// and contains information necessary for Gorums to handle the messages. +type Metadata struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3"` + xxx_hidden_Method string `protobuf:"bytes,2,opt,name=Method,proto3"` + xxx_hidden_Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Metadata) Reset() { + *x = Metadata{} + mi := &file_ordering_ordering_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_ordering_ordering_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) +} + +func (x *Metadata) GetMessageID() uint64 { + if x != nil { + return x.xxx_hidden_MessageID + } + return 0 +} + +func (x *Metadata) GetMethod() string { + if x != nil { + return x.xxx_hidden_Method + } + return "" +} + +func (x *Metadata) GetStatus() *status.Status { + if x != nil { + return x.xxx_hidden_Status + } + return nil +} + +func (x *Metadata) SetMessageID(v uint64) { + x.xxx_hidden_MessageID = v +} + +func (x *Metadata) SetMethod(v string) { + x.xxx_hidden_Method = v +} + +func (x *Metadata) SetStatus(v *status.Status) { + x.xxx_hidden_Status = v +} + +func (x *Metadata) HasStatus() bool { + if x == nil { + return false + } + return x.xxx_hidden_Status != nil +} + +func (x *Metadata) ClearStatus() { + x.xxx_hidden_Status = nil +} + +type Metadata_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + MessageID uint64 + Method string + Status *status.Status +} + +func (b0 Metadata_builder) Build() *Metadata { + m0 := &Metadata{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_MessageID = b.MessageID + x.xxx_hidden_Method = b.Method + x.xxx_hidden_Status = b.Status + return m0 +} + +var File_ordering_ordering_proto protoreflect.FileDescriptor + +var file_ordering_ordering_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x42, 0x0a, 0x06, 0x47, 0x6f, + 0x72, 0x75, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x12, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x42, 0x22, + 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_ordering_ordering_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ordering_ordering_proto_goTypes = []any{ + (*Metadata)(nil), // 0: ordering.Metadata + (*status.Status)(nil), // 1: google.rpc.Status +} +var file_ordering_ordering_proto_depIdxs = []int32{ + 1, // 0: ordering.Metadata.Status:type_name -> google.rpc.Status + 0, // 1: ordering.Gorums.NodeStream:input_type -> ordering.Metadata + 0, // 2: ordering.Gorums.NodeStream:output_type -> ordering.Metadata + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_ordering_ordering_proto_init() } +func file_ordering_ordering_proto_init() { + if File_ordering_ordering_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ordering_ordering_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ordering_ordering_proto_goTypes, + DependencyIndexes: file_ordering_ordering_proto_depIdxs, + MessageInfos: file_ordering_ordering_proto_msgTypes, + }.Build() + File_ordering_ordering_proto = out.File + file_ordering_ordering_proto_rawDesc = nil + file_ordering_ordering_proto_goTypes = nil + file_ordering_ordering_proto_depIdxs = nil +} diff --git a/quorumcall.go b/quorumcall.go index 3e3f97e80..40d6c7be8 100644 --- a/quorumcall.go +++ b/quorumcall.go @@ -24,7 +24,7 @@ type QuorumCallData struct { // This method should be used by generated code only. func (c RawConfiguration) QuorumCall(ctx context.Context, d QuorumCallData) (resp protoreflect.ProtoMessage, err error) { expectedReplies := len(c) - md := &ordering.Metadata{MessageID: c.getMsgID(), Method: d.Method} + md := ordering.Metadata_builder{MessageID: c.getMsgID(), Method: d.Method}.Build() replyChan := make(chan response, expectedReplies) for _, n := range c { diff --git a/rpc.go b/rpc.go index ff2ad7a03..d864030bd 100644 --- a/rpc.go +++ b/rpc.go @@ -19,7 +19,7 @@ type CallData struct { // // This method should be used by generated code only. func (n *RawNode) RPCCall(ctx context.Context, d CallData) (protoreflect.ProtoMessage, error) { - md := &ordering.Metadata{MessageID: n.mgr.getMsgID(), Method: d.Method} + md := ordering.Metadata_builder{MessageID: n.mgr.getMsgID(), Method: d.Method}.Build() replyChan := make(chan response, 1) n.channel.enqueue(request{ctx: ctx, msg: &Message{Metadata: md, Message: d.Message}}, replyChan, false) diff --git a/server.go b/server.go index cce8efc78..ea0fd0e94 100644 --- a/server.go +++ b/server.go @@ -52,7 +52,7 @@ func WrapMessage(md *ordering.Metadata, resp protoreflect.ProtoMessage, err erro if !ok { errStatus = status.New(codes.Unknown, err.Error()) } - md.Status = errStatus.Proto() + md.SetStatus(errStatus.Proto()) return &Message{Metadata: md, Message: resp} } @@ -91,7 +91,7 @@ func (s *orderingServer) NodeStream(srv ordering.Gorums_NodeStreamServer) error if err != nil { return err } - if handler, ok := s.handlers[req.Metadata.Method]; ok { + if handler, ok := s.handlers[req.Metadata.GetMethod()]; ok { // We start the handler in a new goroutine in order to allow multiple handlers to run concurrently. // However, to preserve request ordering, the handler must unlock the shared mutex when it has either // finished, or when it is safe to start processing the next request. diff --git a/tests/config/config.pb.go b/tests/config/config.pb.go index 932cb2189..0f0f23cc6 100644 --- a/tests/config/config.pb.go +++ b/tests/config/config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: config/config.proto package config @@ -22,20 +22,17 @@ const ( ) type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields - - Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_config_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_config_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -46,7 +43,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_config_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69,21 +66,18 @@ func (x *Request) GetNum() uint64 { } type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Num uint64 `protobuf:"varint,2,opt,name=Num,proto3" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Num uint64 `protobuf:"varint,2,opt,name=Num,proto3" json:"Num,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_config_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_config_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -94,7 +88,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_config_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,7 +150,7 @@ func file_config_config_proto_rawDescGZIP() []byte { } var file_config_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_config_config_proto_goTypes = []interface{}{ +var file_config_config_proto_goTypes = []any{ (*Request)(nil), // 0: config.Request (*Response)(nil), // 1: config.Response } @@ -175,32 +169,6 @@ func file_config_config_proto_init() { if File_config_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_config_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_config_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/config/config_gorums.pb.go b/tests/config/config_gorums.pb.go index f8748cfca..a13717901 100644 --- a/tests/config/config_gorums.pb.go +++ b/tests/config/config_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: config/config.proto package config diff --git a/tests/correctable/correctable.pb.go b/tests/correctable/correctable.pb.go index 6445309e8..aab663c85 100644 --- a/tests/correctable/correctable.pb.go +++ b/tests/correctable/correctable.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: correctable/correctable.proto package correctable @@ -22,18 +22,16 @@ const ( ) type CorrectableRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CorrectableRequest) Reset() { *x = CorrectableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_correctable_correctable_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_correctable_correctable_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorrectableRequest) String() string { @@ -44,7 +42,7 @@ func (*CorrectableRequest) ProtoMessage() {} func (x *CorrectableRequest) ProtoReflect() protoreflect.Message { mi := &file_correctable_correctable_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60,20 +58,17 @@ func (*CorrectableRequest) Descriptor() ([]byte, []int) { } type CorrectableResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Level int32 `protobuf:"varint,1,opt,name=Level,proto3" json:"Level,omitempty"` unknownFields protoimpl.UnknownFields - - Level int32 `protobuf:"varint,1,opt,name=Level,proto3" json:"Level,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CorrectableResponse) Reset() { *x = CorrectableResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_correctable_correctable_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_correctable_correctable_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorrectableResponse) String() string { @@ -84,7 +79,7 @@ func (*CorrectableResponse) ProtoMessage() {} func (x *CorrectableResponse) ProtoReflect() protoreflect.Message { mi := &file_correctable_correctable_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,7 +143,7 @@ func file_correctable_correctable_proto_rawDescGZIP() []byte { } var file_correctable_correctable_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_correctable_correctable_proto_goTypes = []interface{}{ +var file_correctable_correctable_proto_goTypes = []any{ (*CorrectableRequest)(nil), // 0: correctable.CorrectableRequest (*CorrectableResponse)(nil), // 1: correctable.CorrectableResponse } @@ -169,32 +164,6 @@ func file_correctable_correctable_proto_init() { if File_correctable_correctable_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_correctable_correctable_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CorrectableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_correctable_correctable_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CorrectableResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/correctable/correctable_gorums.pb.go b/tests/correctable/correctable_gorums.pb.go index 47e6d00d8..4c7c6fdc8 100644 --- a/tests/correctable/correctable_gorums.pb.go +++ b/tests/correctable/correctable_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: correctable/correctable.proto package correctable diff --git a/tests/dummy/dummy.pb.go b/tests/dummy/dummy.pb.go index 0f9b1ca07..bc60a59e8 100644 --- a/tests/dummy/dummy.pb.go +++ b/tests/dummy/dummy.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: dummy/dummy.proto package dummy @@ -21,18 +21,16 @@ const ( ) type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Empty) Reset() { *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_dummy_dummy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dummy_dummy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Empty) String() string { @@ -43,7 +41,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_dummy_dummy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85,7 +83,7 @@ func file_dummy_dummy_proto_rawDescGZIP() []byte { } var file_dummy_dummy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_dummy_dummy_proto_goTypes = []interface{}{ +var file_dummy_dummy_proto_goTypes = []any{ (*Empty)(nil), // 0: dummy.Empty } var file_dummy_dummy_proto_depIdxs = []int32{ @@ -103,20 +101,6 @@ func file_dummy_dummy_proto_init() { if File_dummy_dummy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dummy_dummy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/dummy/dummy_gorums.pb.go b/tests/dummy/dummy_gorums.pb.go index d72db19a5..7d1d03a81 100644 --- a/tests/dummy/dummy_gorums.pb.go +++ b/tests/dummy/dummy_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: dummy/dummy.proto package dummy diff --git a/tests/metadata/metadata.pb.go b/tests/metadata/metadata.pb.go index b6e7f4405..aaf45911a 100644 --- a/tests/metadata/metadata.pb.go +++ b/tests/metadata/metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: metadata/metadata.proto package metadata @@ -22,20 +22,17 @@ const ( ) type NodeID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` unknownFields protoimpl.UnknownFields - - ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + sizeCache protoimpl.SizeCache } func (x *NodeID) Reset() { *x = NodeID{} - if protoimpl.UnsafeEnabled { - mi := &file_metadata_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_metadata_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeID) String() string { @@ -46,7 +43,7 @@ func (*NodeID) ProtoMessage() {} func (x *NodeID) ProtoReflect() protoreflect.Message { mi := &file_metadata_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69,20 +66,17 @@ func (x *NodeID) GetID() uint32 { } type IPAddr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Addr string `protobuf:"bytes,1,opt,name=Addr,proto3" json:"Addr,omitempty"` unknownFields protoimpl.UnknownFields - - Addr string `protobuf:"bytes,1,opt,name=Addr,proto3" json:"Addr,omitempty"` + sizeCache protoimpl.SizeCache } func (x *IPAddr) Reset() { *x = IPAddr{} - if protoimpl.UnsafeEnabled { - mi := &file_metadata_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_metadata_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IPAddr) String() string { @@ -93,7 +87,7 @@ func (*IPAddr) ProtoMessage() {} func (x *IPAddr) ProtoReflect() protoreflect.Message { mi := &file_metadata_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,7 +146,7 @@ func file_metadata_metadata_proto_rawDescGZIP() []byte { } var file_metadata_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_metadata_metadata_proto_goTypes = []interface{}{ +var file_metadata_metadata_proto_goTypes = []any{ (*NodeID)(nil), // 0: metadata.NodeID (*IPAddr)(nil), // 1: metadata.IPAddr (*emptypb.Empty)(nil), // 2: google.protobuf.Empty @@ -174,32 +168,6 @@ func file_metadata_metadata_proto_init() { if File_metadata_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_metadata_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_metadata_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPAddr); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/metadata/metadata_gorums.pb.go b/tests/metadata/metadata_gorums.pb.go index 0cb5504c3..3bd8277f9 100644 --- a/tests/metadata/metadata_gorums.pb.go +++ b/tests/metadata/metadata_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: metadata/metadata.proto package metadata diff --git a/tests/oneway/oneway.pb.go b/tests/oneway/oneway.pb.go index 3bc5bcf0e..3ef5efaa9 100644 --- a/tests/oneway/oneway.pb.go +++ b/tests/oneway/oneway.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: oneway/oneway.proto package oneway @@ -22,20 +22,17 @@ const ( ) type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields - - Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_oneway_oneway_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_oneway_oneway_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -46,7 +43,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_oneway_oneway_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69,18 +66,16 @@ func (x *Request) GetNum() uint64 { } type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Empty) Reset() { *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_oneway_oneway_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_oneway_oneway_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Empty) String() string { @@ -91,7 +86,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_oneway_oneway_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,7 +139,7 @@ func file_oneway_oneway_proto_rawDescGZIP() []byte { } var file_oneway_oneway_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_oneway_oneway_proto_goTypes = []interface{}{ +var file_oneway_oneway_proto_goTypes = []any{ (*Request)(nil), // 0: oneway.Request (*Empty)(nil), // 1: oneway.Empty } @@ -167,32 +162,6 @@ func file_oneway_oneway_proto_init() { if File_oneway_oneway_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_oneway_oneway_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_oneway_oneway_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/oneway/oneway_gorums.pb.go b/tests/oneway/oneway_gorums.pb.go index 8d60009f2..84d876b4b 100644 --- a/tests/oneway/oneway_gorums.pb.go +++ b/tests/oneway/oneway_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: oneway/oneway.proto package oneway diff --git a/tests/ordering/order.pb.go b/tests/ordering/order.pb.go index 3df5a76d3..9c27d203b 100644 --- a/tests/ordering/order.pb.go +++ b/tests/ordering/order.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: ordering/order.proto package ordering @@ -22,20 +22,17 @@ const ( ) type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields - - Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_ordering_order_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ordering_order_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -46,7 +43,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_ordering_order_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69,20 +66,17 @@ func (x *Request) GetNum() uint64 { } type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + InOrder bool `protobuf:"varint,1,opt,name=InOrder,proto3" json:"InOrder,omitempty"` unknownFields protoimpl.UnknownFields - - InOrder bool `protobuf:"varint,1,opt,name=InOrder,proto3" json:"InOrder,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_ordering_order_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ordering_order_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -93,7 +87,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_ordering_order_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,7 +149,7 @@ func file_ordering_order_proto_rawDescGZIP() []byte { } var file_ordering_order_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ordering_order_proto_goTypes = []interface{}{ +var file_ordering_order_proto_goTypes = []any{ (*Request)(nil), // 0: ordering.Request (*Response)(nil), // 1: ordering.Response } @@ -178,32 +172,6 @@ func file_ordering_order_proto_init() { if File_ordering_order_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ordering_order_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ordering_order_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/ordering/order_gorums.pb.go b/tests/ordering/order_gorums.pb.go index 9f21f7a5a..d9d3251dc 100644 --- a/tests/ordering/order_gorums.pb.go +++ b/tests/ordering/order_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: ordering/order.proto package ordering diff --git a/tests/qf/qf.pb.go b/tests/qf/qf.pb.go index 7a8a720f2..77be2df6f 100644 --- a/tests/qf/qf.pb.go +++ b/tests/qf/qf.pb.go @@ -2,8 +2,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: qf/qf.proto package qf @@ -24,20 +24,17 @@ const ( ) type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value int64 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` unknownFields protoimpl.UnknownFields - - Value int64 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_qf_qf_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_qf_qf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -48,7 +45,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_qf_qf_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71,20 +68,17 @@ func (x *Request) GetValue() int64 { } type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"` unknownFields protoimpl.UnknownFields - - Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_qf_qf_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_qf_qf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -95,7 +89,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_qf_qf_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,7 +145,7 @@ func file_qf_qf_proto_rawDescGZIP() []byte { } var file_qf_qf_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_qf_qf_proto_goTypes = []interface{}{ +var file_qf_qf_proto_goTypes = []any{ (*Request)(nil), // 0: qf.Request (*Response)(nil), // 1: qf.Response } @@ -172,32 +166,6 @@ func file_qf_qf_proto_init() { if File_qf_qf_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_qf_qf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_qf_qf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/qf/qf_gorums.pb.go b/tests/qf/qf_gorums.pb.go index 617d42bba..b39db8712 100644 --- a/tests/qf/qf_gorums.pb.go +++ b/tests/qf/qf_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: qf/qf.proto package qf diff --git a/tests/tls/tls.pb.go b/tests/tls/tls.pb.go index 2c07c343e..db67ab80c 100644 --- a/tests/tls/tls.pb.go +++ b/tests/tls/tls.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: tls/tls.proto package tls @@ -21,18 +21,16 @@ const ( ) type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_tls_tls_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tls_tls_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -43,7 +41,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_tls_tls_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59,20 +57,17 @@ func (*Request) Descriptor() ([]byte, []int) { } type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + OK bool `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"` unknownFields protoimpl.UnknownFields - - OK bool `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_tls_tls_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tls_tls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -83,7 +78,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_tls_tls_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,7 +128,7 @@ func file_tls_tls_proto_rawDescGZIP() []byte { } var file_tls_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_tls_tls_proto_goTypes = []interface{}{ +var file_tls_tls_proto_goTypes = []any{ (*Request)(nil), // 0: tls.Request (*Response)(nil), // 1: tls.Response } @@ -152,32 +147,6 @@ func file_tls_tls_proto_init() { if File_tls_tls_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_tls_tls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tls_tls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/tls/tls_gorums.pb.go b/tests/tls/tls_gorums.pb.go index 594e212dd..51b3ea126 100644 --- a/tests/tls/tls_gorums.pb.go +++ b/tests/tls/tls_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: tls/tls.proto package tls diff --git a/tests/unresponsive/unresponsive.pb.go b/tests/unresponsive/unresponsive.pb.go index a5a66b2f6..b26f727b6 100644 --- a/tests/unresponsive/unresponsive.pb.go +++ b/tests/unresponsive/unresponsive.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.3 +// protoc-gen-go v1.36.3 +// protoc v5.29.2 // source: unresponsive/unresponsive.proto package unresponsive @@ -21,18 +21,16 @@ const ( ) type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Empty) Reset() { *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_unresponsive_unresponsive_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_unresponsive_unresponsive_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Empty) String() string { @@ -43,7 +41,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_unresponsive_unresponsive_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88,7 +86,7 @@ func file_unresponsive_unresponsive_proto_rawDescGZIP() []byte { } var file_unresponsive_unresponsive_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_unresponsive_unresponsive_proto_goTypes = []interface{}{ +var file_unresponsive_unresponsive_proto_goTypes = []any{ (*Empty)(nil), // 0: unresponsive.Empty } var file_unresponsive_unresponsive_proto_depIdxs = []int32{ @@ -106,20 +104,6 @@ func file_unresponsive_unresponsive_proto_init() { if File_unresponsive_unresponsive_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_unresponsive_unresponsive_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tests/unresponsive/unresponsive_gorums.pb.go b/tests/unresponsive/unresponsive_gorums.pb.go index d36abd50b..968c002e6 100644 --- a/tests/unresponsive/unresponsive_gorums.pb.go +++ b/tests/unresponsive/unresponsive_gorums.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gorums. DO NOT EDIT. // versions: // protoc-gen-gorums v0.7.0-devel -// protoc v4.25.3 +// protoc v5.29.2 // source: unresponsive/unresponsive.proto package unresponsive diff --git a/unicast.go b/unicast.go index 211853439..53d6b1ef3 100644 --- a/unicast.go +++ b/unicast.go @@ -13,7 +13,7 @@ import ( func (n *RawNode) Unicast(ctx context.Context, d CallData, opts ...CallOption) { o := getCallOptions(E_Unicast, opts) - md := &ordering.Metadata{MessageID: n.mgr.getMsgID(), Method: d.Method} + md := ordering.Metadata_builder{MessageID: n.mgr.getMsgID(), Method: d.Method}.Build() req := request{ctx: ctx, msg: &Message{Metadata: md, Message: d.Message}, opts: o} if o.noSendWaiting { From 46196d3950d9ee6c8c268d62e3e35ba5daf1d90c Mon Sep 17 00:00:00 2001 From: asbjorn Date: Fri, 31 Jan 2025 10:00:39 +0100 Subject: [PATCH 03/10] fix makefile formatting --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f32dbc123..093496a36 100644 --- a/Makefile +++ b/Makefile @@ -32,15 +32,13 @@ $(static_file): $(static_files) %.pb.go : %.proto @protoc -I=$(proto_path) \ --go_opt=default_api_level=API_HYBRID \ - --go_out=paths=source_relative:. $^ + --go_out=paths=source_relative:. $^ %_grpc.pb.go : %.proto - @protoc -I=$(proto_path) \ - --go-grpc_out=paths=source_relative:. $^ + @protoc -I=$(proto_path) --go-grpc_out=paths=source_relative:. $^ %_gorums.pb.go : %.proto - @protoc -I=$(proto_path) \ - --gorums_out=paths=source_relative:. $^ + @protoc -I=$(proto_path) --gorums_out=paths=source_relative:. $^ tools: @go mod download From b2c367ecf8e9e72f25e6cda8f35ebef6e79123bb Mon Sep 17 00:00:00 2001 From: asbjorn Date: Fri, 31 Jan 2025 10:05:31 +0100 Subject: [PATCH 04/10] change in order of operations fixed --- benchmark/qspec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/qspec.go b/benchmark/qspec.go index bbf0c2a42..8957978d1 100644 --- a/benchmark/qspec.go +++ b/benchmark/qspec.go @@ -58,7 +58,7 @@ func (qspec *QSpec) StopServerBenchmarkQF(_ *StopRequest, replies map[uint32]*Re for _, reply := range replies { resp.SetLatencyVar(resp.GetLatencyVar() + float64(reply.GetTotalOps()-1)*reply.GetLatencyVar()) } - resp.SetLatencyVar(resp.GetLatencyVar()/float64(resp.GetTotalOps()) - float64(len(replies))) + resp.SetLatencyVar(resp.GetLatencyVar() / (float64(resp.GetTotalOps()) - float64(len(replies)))) resp.SetTotalOps(resp.GetTotalOps() / uint64(len(replies))) resp.SetTotalTime(resp.GetTotalTime() / int64(len(replies))) resp.SetThroughput(resp.GetThroughput() / float64(len(replies))) From 237602fddde47be6205df92f9ff66c409f54d15e Mon Sep 17 00:00:00 2001 From: asbjorn Date: Fri, 31 Jan 2025 10:14:15 +0100 Subject: [PATCH 05/10] go.sum fixed from merge --- examples/go.sum | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/go.sum b/examples/go.sum index 0de3f77e3..158ee5185 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -36,9 +36,15 @@ golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250127172529-29210b9bc287 h1:J1H9f+LEdWAfHcez/4cvaVBox7cOYT+IU6rgqj5x++8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250127172529-29210b9bc287/go.mod h1:8BS3B93F/U1juMFq9+EDk+qOT5CO1R9IzXxG3PTqiRk= google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM= +google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= From cace224d4fd0763f1a1c509ccbc8f6340c878bd8 Mon Sep 17 00:00:00 2001 From: asbjorn Date: Fri, 31 Jan 2025 10:38:56 +0100 Subject: [PATCH 06/10] removed os.Exit outside main --- examples/storage/client.go | 4 ++-- examples/storage/main.go | 5 ++++- examples/storage/repl.go | 10 +++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/storage/client.go b/examples/storage/client.go index 5a0647b8b..cde90ebfe 100644 --- a/examples/storage/client.go +++ b/examples/storage/client.go @@ -9,7 +9,7 @@ import ( "google.golang.org/grpc/credentials/insecure" ) -func runClient(addresses []string) { +func runClient(addresses []string) error { if len(addresses) < 1 { log.Fatalln("No addresses provided!") } @@ -26,7 +26,7 @@ func runClient(addresses []string) { log.Fatal(err) } - Repl(mgr, cfg) + return Repl(mgr, cfg) } type qspec struct { diff --git a/examples/storage/main.go b/examples/storage/main.go index f8eb73e45..5726b53ac 100644 --- a/examples/storage/main.go +++ b/examples/storage/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "log" + "os" "strings" "github.com/relab/gorums" @@ -36,5 +37,7 @@ func main() { }() } - runClient(addrs) + if runClient(addrs) != nil { + os.Exit(1) + } } diff --git a/examples/storage/repl.go b/examples/storage/repl.go index 59978e867..a939013c3 100644 --- a/examples/storage/repl.go +++ b/examples/storage/repl.go @@ -90,23 +90,23 @@ func (r repl) ReadLine() (string, error) { // Repl runs an interactive Read-eval-print loop, that allows users to run commands that perform // RPCs and quorum calls using the manager and configuration. -func Repl(mgr *pb.Manager, defaultCfg *pb.Configuration) { +func Repl(mgr *pb.Manager, defaultCfg *pb.Configuration) error { r := newRepl(mgr, defaultCfg) fmt.Println(help) for { l, err := r.ReadLine() if errors.Is(err, io.EOF) { - return + return nil } if err != nil { fmt.Fprintf(os.Stderr, "Failed to read line: %v\n", err) - os.Exit(1) + return err } args, err := shlex.Split(l) if err != nil { fmt.Fprintf(os.Stderr, "Failed to split command: %v\n", err) - os.Exit(1) + return err } if len(args) < 1 { continue @@ -116,7 +116,7 @@ func Repl(mgr *pb.Manager, defaultCfg *pb.Configuration) { case "exit": fallthrough case "quit": - return + return nil case "help": fmt.Println(help) case "rpc": From b279b795cd72d06b09e58682fc8977179b6c4069 Mon Sep 17 00:00:00 2001 From: asbjorn Date: Sun, 2 Feb 2025 22:40:55 +0100 Subject: [PATCH 07/10] move to opaque api --- Makefile | 4 +- benchmark/benchmark.pb.go | 162 ++-- benchmark/benchmark_protoopaque.pb.go | 736 ------------------ channel_test.go | 8 +- cmd/protoc-gen-gorums/dev/zorums.pb.go | 44 +- .../dev/zorums_protoopaque.pb.go | 456 ----------- gorums.pb.go | 2 - gorums_protoopaque.pb.go | 201 ----- internal/correctable/opts.pb.go | 2 - internal/correctable/opts_protoopaque.pb.go | 111 --- ordering/ordering.pb.go | 36 +- ordering/ordering_protoopaque.pb.go | 185 ----- 12 files changed, 126 insertions(+), 1821 deletions(-) delete mode 100644 benchmark/benchmark_protoopaque.pb.go delete mode 100644 cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go delete mode 100644 gorums_protoopaque.pb.go delete mode 100644 internal/correctable/opts_protoopaque.pb.go delete mode 100644 ordering/ordering_protoopaque.pb.go diff --git a/Makefile b/Makefile index 093496a36..fd6b24fa0 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: installgorums ordering/ordering.pb.go ordering/ordering_grpc.pb.go @protoc -I=$(proto_path) \ --go_out=:. \ --gorums_out=dev=true:. \ - --go_opt=default_api_level=API_HYBRID \ + --go_opt=default_api_level=API_OPAQUE \ $(zorums_proto) benchmark: installgorums $(benchmark_deps) @@ -31,7 +31,7 @@ $(static_file): $(static_files) %.pb.go : %.proto @protoc -I=$(proto_path) \ - --go_opt=default_api_level=API_HYBRID \ + --go_opt=default_api_level=API_OPAQUE \ --go_out=paths=source_relative:. $^ %_grpc.pb.go : %.proto diff --git a/benchmark/benchmark.pb.go b/benchmark/benchmark.pb.go index f124298e4..c37338541 100644 --- a/benchmark/benchmark.pb.go +++ b/benchmark/benchmark.pb.go @@ -4,8 +4,6 @@ // protoc v5.29.2 // source: benchmark/benchmark.proto -//go:build !protoopaque - package benchmark import ( @@ -24,10 +22,10 @@ const ( ) type Echo struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Echo) Reset() { @@ -57,7 +55,7 @@ func (x *Echo) ProtoReflect() protoreflect.Message { func (x *Echo) GetPayload() []byte { if x != nil { - return x.Payload + return x.xxx_hidden_Payload } return nil } @@ -66,7 +64,7 @@ func (x *Echo) SetPayload(v []byte) { if v == nil { v = []byte{} } - x.Payload = v + x.xxx_hidden_Payload = v } type Echo_builder struct { @@ -79,16 +77,16 @@ func (b0 Echo_builder) Build() *Echo { m0 := &Echo{} b, x := &b0, m0 _, _ = b, x - x.Payload = b.Payload + x.xxx_hidden_Payload = b.Payload return m0 } type TimedMsg struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3" json:"SendTime,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3"` + xxx_hidden_Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TimedMsg) Reset() { @@ -118,27 +116,27 @@ func (x *TimedMsg) ProtoReflect() protoreflect.Message { func (x *TimedMsg) GetSendTime() int64 { if x != nil { - return x.SendTime + return x.xxx_hidden_SendTime } return 0 } func (x *TimedMsg) GetPayload() []byte { if x != nil { - return x.Payload + return x.xxx_hidden_Payload } return nil } func (x *TimedMsg) SetSendTime(v int64) { - x.SendTime = v + x.xxx_hidden_SendTime = v } func (x *TimedMsg) SetPayload(v []byte) { if v == nil { v = []byte{} } - x.Payload = v + x.xxx_hidden_Payload = v } type TimedMsg_builder struct { @@ -152,13 +150,13 @@ func (b0 TimedMsg_builder) Build() *TimedMsg { m0 := &TimedMsg{} b, x := &b0, m0 _, _ = b, x - x.SendTime = b.SendTime - x.Payload = b.Payload + x.xxx_hidden_SendTime = b.SendTime + x.xxx_hidden_Payload = b.Payload return m0 } type StartRequest struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` + state protoimpl.MessageState `protogen:"opaque.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -201,7 +199,7 @@ func (b0 StartRequest_builder) Build() *StartRequest { } type StartResponse struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` + state protoimpl.MessageState `protogen:"opaque.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -244,7 +242,7 @@ func (b0 StartResponse_builder) Build() *StartResponse { } type StopRequest struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` + state protoimpl.MessageState `protogen:"opaque.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -287,18 +285,18 @@ func (b0 StopRequest_builder) Build() *StopRequest { } type Result struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3" json:"TotalOps,omitempty"` - TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3" json:"TotalTime,omitempty"` - Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3" json:"Throughput,omitempty"` - LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3" json:"LatencyAvg,omitempty"` - LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3" json:"LatencyVar,omitempty"` - AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3" json:"AllocsPerOp,omitempty"` - MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3" json:"MemPerOp,omitempty"` - ServerStats []*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3" json:"ServerStats,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=Name,proto3"` + xxx_hidden_TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3"` + xxx_hidden_TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3"` + xxx_hidden_Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3"` + xxx_hidden_LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3"` + xxx_hidden_LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3"` + xxx_hidden_AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3"` + xxx_hidden_MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3"` + xxx_hidden_ServerStats *[]*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Result) Reset() { @@ -328,101 +326,103 @@ func (x *Result) ProtoReflect() protoreflect.Message { func (x *Result) GetName() string { if x != nil { - return x.Name + return x.xxx_hidden_Name } return "" } func (x *Result) GetTotalOps() uint64 { if x != nil { - return x.TotalOps + return x.xxx_hidden_TotalOps } return 0 } func (x *Result) GetTotalTime() int64 { if x != nil { - return x.TotalTime + return x.xxx_hidden_TotalTime } return 0 } func (x *Result) GetThroughput() float64 { if x != nil { - return x.Throughput + return x.xxx_hidden_Throughput } return 0 } func (x *Result) GetLatencyAvg() float64 { if x != nil { - return x.LatencyAvg + return x.xxx_hidden_LatencyAvg } return 0 } func (x *Result) GetLatencyVar() float64 { if x != nil { - return x.LatencyVar + return x.xxx_hidden_LatencyVar } return 0 } func (x *Result) GetAllocsPerOp() uint64 { if x != nil { - return x.AllocsPerOp + return x.xxx_hidden_AllocsPerOp } return 0 } func (x *Result) GetMemPerOp() uint64 { if x != nil { - return x.MemPerOp + return x.xxx_hidden_MemPerOp } return 0 } func (x *Result) GetServerStats() []*MemoryStat { if x != nil { - return x.ServerStats + if x.xxx_hidden_ServerStats != nil { + return *x.xxx_hidden_ServerStats + } } return nil } func (x *Result) SetName(v string) { - x.Name = v + x.xxx_hidden_Name = v } func (x *Result) SetTotalOps(v uint64) { - x.TotalOps = v + x.xxx_hidden_TotalOps = v } func (x *Result) SetTotalTime(v int64) { - x.TotalTime = v + x.xxx_hidden_TotalTime = v } func (x *Result) SetThroughput(v float64) { - x.Throughput = v + x.xxx_hidden_Throughput = v } func (x *Result) SetLatencyAvg(v float64) { - x.LatencyAvg = v + x.xxx_hidden_LatencyAvg = v } func (x *Result) SetLatencyVar(v float64) { - x.LatencyVar = v + x.xxx_hidden_LatencyVar = v } func (x *Result) SetAllocsPerOp(v uint64) { - x.AllocsPerOp = v + x.xxx_hidden_AllocsPerOp = v } func (x *Result) SetMemPerOp(v uint64) { - x.MemPerOp = v + x.xxx_hidden_MemPerOp = v } func (x *Result) SetServerStats(v []*MemoryStat) { - x.ServerStats = v + x.xxx_hidden_ServerStats = &v } type Result_builder struct { @@ -443,24 +443,24 @@ func (b0 Result_builder) Build() *Result { m0 := &Result{} b, x := &b0, m0 _, _ = b, x - x.Name = b.Name - x.TotalOps = b.TotalOps - x.TotalTime = b.TotalTime - x.Throughput = b.Throughput - x.LatencyAvg = b.LatencyAvg - x.LatencyVar = b.LatencyVar - x.AllocsPerOp = b.AllocsPerOp - x.MemPerOp = b.MemPerOp - x.ServerStats = b.ServerStats + x.xxx_hidden_Name = b.Name + x.xxx_hidden_TotalOps = b.TotalOps + x.xxx_hidden_TotalTime = b.TotalTime + x.xxx_hidden_Throughput = b.Throughput + x.xxx_hidden_LatencyAvg = b.LatencyAvg + x.xxx_hidden_LatencyVar = b.LatencyVar + x.xxx_hidden_AllocsPerOp = b.AllocsPerOp + x.xxx_hidden_MemPerOp = b.MemPerOp + x.xxx_hidden_ServerStats = &b.ServerStats return m0 } type MemoryStat struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3" json:"Allocs,omitempty"` - Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3" json:"Memory,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3"` + xxx_hidden_Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MemoryStat) Reset() { @@ -490,24 +490,24 @@ func (x *MemoryStat) ProtoReflect() protoreflect.Message { func (x *MemoryStat) GetAllocs() uint64 { if x != nil { - return x.Allocs + return x.xxx_hidden_Allocs } return 0 } func (x *MemoryStat) GetMemory() uint64 { if x != nil { - return x.Memory + return x.xxx_hidden_Memory } return 0 } func (x *MemoryStat) SetAllocs(v uint64) { - x.Allocs = v + x.xxx_hidden_Allocs = v } func (x *MemoryStat) SetMemory(v uint64) { - x.Memory = v + x.xxx_hidden_Memory = v } type MemoryStat_builder struct { @@ -521,16 +521,16 @@ func (b0 MemoryStat_builder) Build() *MemoryStat { m0 := &MemoryStat{} b, x := &b0, m0 _, _ = b, x - x.Allocs = b.Allocs - x.Memory = b.Memory + x.xxx_hidden_Allocs = b.Allocs + x.xxx_hidden_Memory = b.Memory return m0 } type MemoryStatList struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - MemoryStats []*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3" json:"MemoryStats,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_MemoryStats *[]*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MemoryStatList) Reset() { @@ -560,13 +560,15 @@ func (x *MemoryStatList) ProtoReflect() protoreflect.Message { func (x *MemoryStatList) GetMemoryStats() []*MemoryStat { if x != nil { - return x.MemoryStats + if x.xxx_hidden_MemoryStats != nil { + return *x.xxx_hidden_MemoryStats + } } return nil } func (x *MemoryStatList) SetMemoryStats(v []*MemoryStat) { - x.MemoryStats = v + x.xxx_hidden_MemoryStats = &v } type MemoryStatList_builder struct { @@ -579,7 +581,7 @@ func (b0 MemoryStatList_builder) Build() *MemoryStatList { m0 := &MemoryStatList{} b, x := &b0, m0 _, _ = b, x - x.MemoryStats = b.MemoryStats + x.xxx_hidden_MemoryStats = &b.MemoryStats return m0 } diff --git a/benchmark/benchmark_protoopaque.pb.go b/benchmark/benchmark_protoopaque.pb.go deleted file mode 100644 index c4d5be775..000000000 --- a/benchmark/benchmark_protoopaque.pb.go +++ /dev/null @@ -1,736 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.3 -// protoc v5.29.2 -// source: benchmark/benchmark.proto - -//go:build protoopaque - -package benchmark - -import ( - _ "github.com/relab/gorums" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" -) - -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) -) - -type Echo struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Echo) Reset() { - *x = Echo{} - mi := &file_benchmark_benchmark_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Echo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Echo) ProtoMessage() {} - -func (x *Echo) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -func (x *Echo) GetPayload() []byte { - if x != nil { - return x.xxx_hidden_Payload - } - return nil -} - -func (x *Echo) SetPayload(v []byte) { - if v == nil { - v = []byte{} - } - x.xxx_hidden_Payload = v -} - -type Echo_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Payload []byte -} - -func (b0 Echo_builder) Build() *Echo { - m0 := &Echo{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Payload = b.Payload - return m0 -} - -type TimedMsg struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3"` - xxx_hidden_Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TimedMsg) Reset() { - *x = TimedMsg{} - mi := &file_benchmark_benchmark_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimedMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimedMsg) ProtoMessage() {} - -func (x *TimedMsg) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -func (x *TimedMsg) GetSendTime() int64 { - if x != nil { - return x.xxx_hidden_SendTime - } - return 0 -} - -func (x *TimedMsg) GetPayload() []byte { - if x != nil { - return x.xxx_hidden_Payload - } - return nil -} - -func (x *TimedMsg) SetSendTime(v int64) { - x.xxx_hidden_SendTime = v -} - -func (x *TimedMsg) SetPayload(v []byte) { - if v == nil { - v = []byte{} - } - x.xxx_hidden_Payload = v -} - -type TimedMsg_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - SendTime int64 - Payload []byte -} - -func (b0 TimedMsg_builder) Build() *TimedMsg { - m0 := &TimedMsg{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_SendTime = b.SendTime - x.xxx_hidden_Payload = b.Payload - return m0 -} - -type StartRequest struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartRequest) Reset() { - *x = StartRequest{} - mi := &file_benchmark_benchmark_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartRequest) ProtoMessage() {} - -func (x *StartRequest) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -type StartRequest_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - -} - -func (b0 StartRequest_builder) Build() *StartRequest { - m0 := &StartRequest{} - b, x := &b0, m0 - _, _ = b, x - return m0 -} - -type StartResponse struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartResponse) Reset() { - *x = StartResponse{} - mi := &file_benchmark_benchmark_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartResponse) ProtoMessage() {} - -func (x *StartResponse) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -type StartResponse_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - -} - -func (b0 StartResponse_builder) Build() *StartResponse { - m0 := &StartResponse{} - b, x := &b0, m0 - _, _ = b, x - return m0 -} - -type StopRequest struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StopRequest) Reset() { - *x = StopRequest{} - mi := &file_benchmark_benchmark_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StopRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StopRequest) ProtoMessage() {} - -func (x *StopRequest) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -type StopRequest_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - -} - -func (b0 StopRequest_builder) Build() *StopRequest { - m0 := &StopRequest{} - b, x := &b0, m0 - _, _ = b, x - return m0 -} - -type Result struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Name string `protobuf:"bytes,1,opt,name=Name,proto3"` - xxx_hidden_TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3"` - xxx_hidden_TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3"` - xxx_hidden_Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3"` - xxx_hidden_LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3"` - xxx_hidden_LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3"` - xxx_hidden_AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3"` - xxx_hidden_MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3"` - xxx_hidden_ServerStats *[]*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Result) Reset() { - *x = Result{} - mi := &file_benchmark_benchmark_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Result) ProtoMessage() {} - -func (x *Result) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -func (x *Result) GetName() string { - if x != nil { - return x.xxx_hidden_Name - } - return "" -} - -func (x *Result) GetTotalOps() uint64 { - if x != nil { - return x.xxx_hidden_TotalOps - } - return 0 -} - -func (x *Result) GetTotalTime() int64 { - if x != nil { - return x.xxx_hidden_TotalTime - } - return 0 -} - -func (x *Result) GetThroughput() float64 { - if x != nil { - return x.xxx_hidden_Throughput - } - return 0 -} - -func (x *Result) GetLatencyAvg() float64 { - if x != nil { - return x.xxx_hidden_LatencyAvg - } - return 0 -} - -func (x *Result) GetLatencyVar() float64 { - if x != nil { - return x.xxx_hidden_LatencyVar - } - return 0 -} - -func (x *Result) GetAllocsPerOp() uint64 { - if x != nil { - return x.xxx_hidden_AllocsPerOp - } - return 0 -} - -func (x *Result) GetMemPerOp() uint64 { - if x != nil { - return x.xxx_hidden_MemPerOp - } - return 0 -} - -func (x *Result) GetServerStats() []*MemoryStat { - if x != nil { - if x.xxx_hidden_ServerStats != nil { - return *x.xxx_hidden_ServerStats - } - } - return nil -} - -func (x *Result) SetName(v string) { - x.xxx_hidden_Name = v -} - -func (x *Result) SetTotalOps(v uint64) { - x.xxx_hidden_TotalOps = v -} - -func (x *Result) SetTotalTime(v int64) { - x.xxx_hidden_TotalTime = v -} - -func (x *Result) SetThroughput(v float64) { - x.xxx_hidden_Throughput = v -} - -func (x *Result) SetLatencyAvg(v float64) { - x.xxx_hidden_LatencyAvg = v -} - -func (x *Result) SetLatencyVar(v float64) { - x.xxx_hidden_LatencyVar = v -} - -func (x *Result) SetAllocsPerOp(v uint64) { - x.xxx_hidden_AllocsPerOp = v -} - -func (x *Result) SetMemPerOp(v uint64) { - x.xxx_hidden_MemPerOp = v -} - -func (x *Result) SetServerStats(v []*MemoryStat) { - x.xxx_hidden_ServerStats = &v -} - -type Result_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Name string - TotalOps uint64 - TotalTime int64 - Throughput float64 - LatencyAvg float64 - LatencyVar float64 - AllocsPerOp uint64 - MemPerOp uint64 - ServerStats []*MemoryStat -} - -func (b0 Result_builder) Build() *Result { - m0 := &Result{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Name = b.Name - x.xxx_hidden_TotalOps = b.TotalOps - x.xxx_hidden_TotalTime = b.TotalTime - x.xxx_hidden_Throughput = b.Throughput - x.xxx_hidden_LatencyAvg = b.LatencyAvg - x.xxx_hidden_LatencyVar = b.LatencyVar - x.xxx_hidden_AllocsPerOp = b.AllocsPerOp - x.xxx_hidden_MemPerOp = b.MemPerOp - x.xxx_hidden_ServerStats = &b.ServerStats - return m0 -} - -type MemoryStat struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3"` - xxx_hidden_Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MemoryStat) Reset() { - *x = MemoryStat{} - mi := &file_benchmark_benchmark_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MemoryStat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemoryStat) ProtoMessage() {} - -func (x *MemoryStat) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_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) -} - -func (x *MemoryStat) GetAllocs() uint64 { - if x != nil { - return x.xxx_hidden_Allocs - } - return 0 -} - -func (x *MemoryStat) GetMemory() uint64 { - if x != nil { - return x.xxx_hidden_Memory - } - return 0 -} - -func (x *MemoryStat) SetAllocs(v uint64) { - x.xxx_hidden_Allocs = v -} - -func (x *MemoryStat) SetMemory(v uint64) { - x.xxx_hidden_Memory = v -} - -type MemoryStat_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Allocs uint64 - Memory uint64 -} - -func (b0 MemoryStat_builder) Build() *MemoryStat { - m0 := &MemoryStat{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Allocs = b.Allocs - x.xxx_hidden_Memory = b.Memory - return m0 -} - -type MemoryStatList struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_MemoryStats *[]*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MemoryStatList) Reset() { - *x = MemoryStatList{} - mi := &file_benchmark_benchmark_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MemoryStatList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemoryStatList) ProtoMessage() {} - -func (x *MemoryStatList) ProtoReflect() protoreflect.Message { - mi := &file_benchmark_benchmark_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *MemoryStatList) GetMemoryStats() []*MemoryStat { - if x != nil { - if x.xxx_hidden_MemoryStats != nil { - return *x.xxx_hidden_MemoryStats - } - } - return nil -} - -func (x *MemoryStatList) SetMemoryStats(v []*MemoryStat) { - x.xxx_hidden_MemoryStats = &v -} - -type MemoryStatList_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - MemoryStats []*MemoryStat -} - -func (b0 MemoryStatList_builder) Build() *MemoryStatList { - m0 := &MemoryStatList{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_MemoryStats = &b.MemoryStats - return m0 -} - -var File_benchmark_benchmark_proto protoreflect.FileDescriptor - -var file_benchmark_benchmark_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2f, 0x62, 0x65, 0x6e, 0x63, - 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x62, 0x65, 0x6e, - 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x20, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x22, 0x40, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, - 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xad, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x70, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x70, 0x73, - 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, - 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0a, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x12, 0x1e, - 0x0a, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x41, 0x76, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x41, 0x76, 0x67, 0x12, 0x1e, - 0x0a, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x56, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0a, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x56, 0x61, 0x72, 0x12, 0x20, - 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x50, 0x65, 0x72, 0x4f, 0x70, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x50, 0x65, 0x72, 0x4f, 0x70, - 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x65, 0x6d, 0x50, 0x65, 0x72, 0x4f, 0x70, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x4d, 0x65, 0x6d, 0x50, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x37, 0x0a, 0x0b, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x4d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x22, 0x49, 0x0a, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x65, 0x6e, - 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x52, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x32, 0xb2, - 0x04, 0x0a, 0x09, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x4f, 0x0a, 0x14, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x65, 0x6e, 0x63, 0x68, - 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x46, 0x0a, - 0x13, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x65, 0x6e, 0x63, 0x68, - 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, - 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x49, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x65, - 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, - 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, - 0x12, 0x56, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, - 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, - 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x65, 0x6e, 0x63, - 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x22, 0x16, 0xa0, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x51, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, - 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, - 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3d, - 0x0a, 0x0f, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, - 0x6c, 0x12, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, - 0x68, 0x6f, 0x1a, 0x0f, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, - 0x63, 0x68, 0x6f, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0x12, 0x34, 0x0a, - 0x0a, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x62, 0x65, - 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x0f, 0x2e, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x22, 0x04, 0xa0, - 0xb5, 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x09, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, - 0x12, 0x13, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_benchmark_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_benchmark_benchmark_proto_goTypes = []any{ - (*Echo)(nil), // 0: benchmark.Echo - (*TimedMsg)(nil), // 1: benchmark.TimedMsg - (*StartRequest)(nil), // 2: benchmark.StartRequest - (*StartResponse)(nil), // 3: benchmark.StartResponse - (*StopRequest)(nil), // 4: benchmark.StopRequest - (*Result)(nil), // 5: benchmark.Result - (*MemoryStat)(nil), // 6: benchmark.MemoryStat - (*MemoryStatList)(nil), // 7: benchmark.MemoryStatList - (*emptypb.Empty)(nil), // 8: google.protobuf.Empty -} -var file_benchmark_benchmark_proto_depIdxs = []int32{ - 6, // 0: benchmark.Result.ServerStats:type_name -> benchmark.MemoryStat - 6, // 1: benchmark.MemoryStatList.MemoryStats:type_name -> benchmark.MemoryStat - 2, // 2: benchmark.Benchmark.StartServerBenchmark:input_type -> benchmark.StartRequest - 4, // 3: benchmark.Benchmark.StopServerBenchmark:input_type -> benchmark.StopRequest - 2, // 4: benchmark.Benchmark.StartBenchmark:input_type -> benchmark.StartRequest - 4, // 5: benchmark.Benchmark.StopBenchmark:input_type -> benchmark.StopRequest - 0, // 6: benchmark.Benchmark.QuorumCall:input_type -> benchmark.Echo - 0, // 7: benchmark.Benchmark.AsyncQuorumCall:input_type -> benchmark.Echo - 0, // 8: benchmark.Benchmark.SlowServer:input_type -> benchmark.Echo - 1, // 9: benchmark.Benchmark.Multicast:input_type -> benchmark.TimedMsg - 3, // 10: benchmark.Benchmark.StartServerBenchmark:output_type -> benchmark.StartResponse - 5, // 11: benchmark.Benchmark.StopServerBenchmark:output_type -> benchmark.Result - 3, // 12: benchmark.Benchmark.StartBenchmark:output_type -> benchmark.StartResponse - 6, // 13: benchmark.Benchmark.StopBenchmark:output_type -> benchmark.MemoryStat - 0, // 14: benchmark.Benchmark.QuorumCall:output_type -> benchmark.Echo - 0, // 15: benchmark.Benchmark.AsyncQuorumCall:output_type -> benchmark.Echo - 0, // 16: benchmark.Benchmark.SlowServer:output_type -> benchmark.Echo - 8, // 17: benchmark.Benchmark.Multicast:output_type -> google.protobuf.Empty - 10, // [10:18] is the sub-list for method output_type - 2, // [2:10] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_benchmark_benchmark_proto_init() } -func file_benchmark_benchmark_proto_init() { - if File_benchmark_benchmark_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_benchmark_benchmark_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_benchmark_benchmark_proto_goTypes, - DependencyIndexes: file_benchmark_benchmark_proto_depIdxs, - MessageInfos: file_benchmark_benchmark_proto_msgTypes, - }.Build() - File_benchmark_benchmark_proto = out.File - file_benchmark_benchmark_proto_rawDesc = nil - file_benchmark_benchmark_proto_goTypes = nil - file_benchmark_benchmark_proto_depIdxs = nil -} diff --git a/channel_test.go b/channel_test.go index c26ed9cf8..f05ce4e99 100644 --- a/channel_test.go +++ b/channel_test.go @@ -52,7 +52,7 @@ func TestChannelCreation(t *testing.T) { replyChan := make(chan response, 1) go func() { - md := &ordering.Metadata{MessageID: 1, Method: handlerName} + md := ordering.Metadata_builder{MessageID: 1, Method: handlerName}.Build() req := request{ctx: context.Background(), msg: &Message{Metadata: md, Message: &mock.Request{}}} node.channel.enqueue(req, replyChan, false) }() @@ -127,7 +127,7 @@ func TestChannelReconnection(t *testing.T) { // send first message when server is down replyChan1 := make(chan response, 1) go func() { - md := &ordering.Metadata{MessageID: 1, Method: handlerName} + md := ordering.Metadata_builder{MessageID: 1, Method: handlerName}.Build() req := request{ctx: context.Background(), msg: &Message{Metadata: md, Message: &mock.Request{}}} node.channel.enqueue(req, replyChan1, false) }() @@ -147,7 +147,7 @@ func TestChannelReconnection(t *testing.T) { // send second message when server is up replyChan2 := make(chan response, 1) go func() { - md := &ordering.Metadata{MessageID: 2, Method: handlerName} + md := ordering.Metadata_builder{MessageID: 2, Method: handlerName}.Build() req := request{ctx: context.Background(), msg: &Message{Metadata: md, Message: &mock.Request{}}, opts: getCallOptions(E_Multicast, nil)} node.channel.enqueue(req, replyChan2, false) }() @@ -167,7 +167,7 @@ func TestChannelReconnection(t *testing.T) { // send third message when server has been previously up but is now down replyChan3 := make(chan response, 1) go func() { - md := &ordering.Metadata{MessageID: 3, Method: handlerName} + md := ordering.Metadata_builder{MessageID: 3, Method: handlerName}.Build() req := request{ctx: context.Background(), msg: &Message{Metadata: md, Message: &mock.Request{}}} node.channel.enqueue(req, replyChan3, false) }() diff --git a/cmd/protoc-gen-gorums/dev/zorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums.pb.go index ef8ac5793..4f435adb4 100644 --- a/cmd/protoc-gen-gorums/dev/zorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums.pb.go @@ -4,8 +4,6 @@ // protoc v5.29.2 // source: zorums.proto -//go:build !protoopaque - package dev import ( @@ -24,10 +22,10 @@ const ( ) type Request struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { @@ -57,13 +55,13 @@ func (x *Request) ProtoReflect() protoreflect.Message { func (x *Request) GetValue() string { if x != nil { - return x.Value + return x.xxx_hidden_Value } return "" } func (x *Request) SetValue(v string) { - x.Value = v + x.xxx_hidden_Value = v } type Request_builder struct { @@ -76,15 +74,15 @@ func (b0 Request_builder) Build() *Request { m0 := &Request{} b, x := &b0, m0 _, _ = b, x - x.Value = b.Value + x.xxx_hidden_Value = b.Value return m0 } type Response struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Result int64 `protobuf:"varint,1,opt,name=Result,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { @@ -114,13 +112,13 @@ func (x *Response) ProtoReflect() protoreflect.Message { func (x *Response) GetResult() int64 { if x != nil { - return x.Result + return x.xxx_hidden_Result } return 0 } func (x *Response) SetResult(v int64) { - x.Result = v + x.xxx_hidden_Result = v } type Response_builder struct { @@ -133,15 +131,15 @@ func (b0 Response_builder) Build() *Response { m0 := &Response{} b, x := &b0, m0 _, _ = b, x - x.Result = b.Result + x.xxx_hidden_Result = b.Result return m0 } type MyResponse struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MyResponse) Reset() { @@ -171,13 +169,13 @@ func (x *MyResponse) ProtoReflect() protoreflect.Message { func (x *MyResponse) GetValue() string { if x != nil { - return x.Value + return x.xxx_hidden_Value } return "" } func (x *MyResponse) SetValue(v string) { - x.Value = v + x.xxx_hidden_Value = v } type MyResponse_builder struct { @@ -190,7 +188,7 @@ func (b0 MyResponse_builder) Build() *MyResponse { m0 := &MyResponse{} b, x := &b0, m0 _, _ = b, x - x.Value = b.Value + x.xxx_hidden_Value = b.Value return m0 } diff --git a/cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go b/cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go deleted file mode 100644 index ec27d3931..000000000 --- a/cmd/protoc-gen-gorums/dev/zorums_protoopaque.pb.go +++ /dev/null @@ -1,456 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.3 -// protoc v5.29.2 -// source: zorums.proto - -//go:build protoopaque - -package dev - -import ( - _ "github.com/relab/gorums" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" -) - -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) -) - -type Request struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request) Reset() { - *x = Request{} - mi := &file_zorums_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request) ProtoMessage() {} - -func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_zorums_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) -} - -func (x *Request) GetValue() string { - if x != nil { - return x.xxx_hidden_Value - } - return "" -} - -func (x *Request) SetValue(v string) { - x.xxx_hidden_Value = v -} - -type Request_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Value string -} - -func (b0 Request_builder) Build() *Request { - m0 := &Request{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Value = b.Value - return m0 -} - -type Response struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Result int64 `protobuf:"varint,1,opt,name=Result,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Response) Reset() { - *x = Response{} - mi := &file_zorums_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_zorums_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) -} - -func (x *Response) GetResult() int64 { - if x != nil { - return x.xxx_hidden_Result - } - return 0 -} - -func (x *Response) SetResult(v int64) { - x.xxx_hidden_Result = v -} - -type Response_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Result int64 -} - -func (b0 Response_builder) Build() *Response { - m0 := &Response{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Result = b.Result - return m0 -} - -type MyResponse struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MyResponse) Reset() { - *x = MyResponse{} - mi := &file_zorums_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MyResponse) ProtoMessage() {} - -func (x *MyResponse) ProtoReflect() protoreflect.Message { - mi := &file_zorums_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) -} - -func (x *MyResponse) GetValue() string { - if x != nil { - return x.xxx_hidden_Value - } - return "" -} - -func (x *MyResponse) SetValue(v string) { - x.xxx_hidden_Value = v -} - -type MyResponse_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Value string -} - -func (b0 MyResponse_builder) Build() *MyResponse { - m0 := &MyResponse{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Value = b.Value - return m0 -} - -var File_zorums_proto protoreflect.FileDescriptor - -var file_zorums_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x7a, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x64, 0x65, 0x76, 0x1a, 0x0c, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, - 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x22, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x22, 0x0a, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x86, 0x11, 0x0a, 0x0d, 0x5a, 0x6f, 0x72, 0x75, - 0x6d, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x47, 0x52, 0x50, - 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x0a, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, - 0x6c, 0x6c, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3d, 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, - 0x61, 0x6c, 0x6c, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, 0x0c, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, - 0xa0, 0xb6, 0x18, 0x01, 0x12, 0x4d, 0x0a, 0x1a, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, - 0x6c, 0x6c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x12, 0xa0, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, - 0x6c, 0x43, 0x6f, 0x6d, 0x62, 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x16, 0xa0, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, - 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0f, 0x51, - 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x10, 0x51, - 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x12, - 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x2e, 0x0a, 0x09, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x3c, 0x0a, 0x13, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, - 0x72, 0x67, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x08, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0x12, 0x2f, 0x0a, 0x0a, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x0a, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x33, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, - 0x98, 0xb5, 0x18, 0x01, 0x12, 0x42, 0x0a, 0x0a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, - 0x74, 0x34, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x0f, 0x51, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x0c, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, - 0x18, 0x01, 0x12, 0x46, 0x0a, 0x19, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, - 0x41, 0x73, 0x79, 0x6e, 0x63, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, - 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0xa0, 0xb5, - 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0x12, 0x56, 0x0a, 0x1f, 0x51, 0x75, - 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0xa0, 0xb5, 0x18, 0x01, - 0xd0, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, - 0x41, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x62, 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, - 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x10, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, - 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0x12, 0x46, - 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, - 0x63, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x08, 0xa0, 0xb5, - 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, 0x12, 0x48, 0x0a, 0x15, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, - 0x43, 0x61, 0x6c, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa0, 0xb5, 0x18, 0x01, 0xd0, 0xb5, 0x18, 0x01, - 0x12, 0x30, 0x0a, 0x0b, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa8, 0xb5, - 0x18, 0x01, 0x12, 0x3e, 0x0a, 0x15, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, 0x0c, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, - 0x18, 0x01, 0x12, 0x4e, 0x0a, 0x1b, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, - 0xa8, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x16, 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, - 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x10, 0x43, - 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x40, 0x0a, 0x11, 0x43, - 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, - 0x11, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x1b, 0x43, 0x6f, 0x72, 0x72, 0x65, - 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x4e, - 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x08, 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0x30, 0x01, 0x12, - 0x56, 0x0a, 0x21, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x12, 0xa8, 0xb5, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x16, 0x43, 0x6f, 0x72, 0x72, 0x65, - 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6d, 0x62, - 0x6f, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, - 0xa8, 0xb5, 0x18, 0x01, 0xa0, 0xb6, 0x18, 0x01, 0xf2, 0xb6, 0x18, 0x0a, 0x4d, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x16, 0x43, 0x6f, 0x72, 0x72, - 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, - 0x12, 0x48, 0x0a, 0x17, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, 0x12, 0x2c, 0x0a, 0x07, 0x55, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x36, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x90, 0xb5, 0x18, 0x01, - 0x42, 0x1b, 0x5a, 0x19, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, - 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_zorums_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_zorums_proto_goTypes = []any{ - (*Request)(nil), // 0: dev.Request - (*Response)(nil), // 1: dev.Response - (*MyResponse)(nil), // 2: dev.MyResponse - (*emptypb.Empty)(nil), // 3: google.protobuf.Empty -} -var file_zorums_proto_depIdxs = []int32{ - 0, // 0: dev.ZorumsService.GRPCCall:input_type -> dev.Request - 0, // 1: dev.ZorumsService.QuorumCall:input_type -> dev.Request - 0, // 2: dev.ZorumsService.QuorumCallPerNodeArg:input_type -> dev.Request - 0, // 3: dev.ZorumsService.QuorumCallCustomReturnType:input_type -> dev.Request - 0, // 4: dev.ZorumsService.QuorumCallCombo:input_type -> dev.Request - 3, // 5: dev.ZorumsService.QuorumCallEmpty:input_type -> google.protobuf.Empty - 0, // 6: dev.ZorumsService.QuorumCallEmpty2:input_type -> dev.Request - 0, // 7: dev.ZorumsService.Multicast:input_type -> dev.Request - 0, // 8: dev.ZorumsService.MulticastPerNodeArg:input_type -> dev.Request - 0, // 9: dev.ZorumsService.Multicast2:input_type -> dev.Request - 0, // 10: dev.ZorumsService.Multicast3:input_type -> dev.Request - 3, // 11: dev.ZorumsService.Multicast4:input_type -> google.protobuf.Empty - 0, // 12: dev.ZorumsService.QuorumCallAsync:input_type -> dev.Request - 0, // 13: dev.ZorumsService.QuorumCallAsyncPerNodeArg:input_type -> dev.Request - 0, // 14: dev.ZorumsService.QuorumCallAsyncCustomReturnType:input_type -> dev.Request - 0, // 15: dev.ZorumsService.QuorumCallAsyncCombo:input_type -> dev.Request - 0, // 16: dev.ZorumsService.QuorumCallAsync2:input_type -> dev.Request - 0, // 17: dev.ZorumsService.QuorumCallAsyncEmpty:input_type -> dev.Request - 3, // 18: dev.ZorumsService.QuorumCallAsyncEmpty2:input_type -> google.protobuf.Empty - 0, // 19: dev.ZorumsService.Correctable:input_type -> dev.Request - 0, // 20: dev.ZorumsService.CorrectablePerNodeArg:input_type -> dev.Request - 0, // 21: dev.ZorumsService.CorrectableCustomReturnType:input_type -> dev.Request - 0, // 22: dev.ZorumsService.CorrectableCombo:input_type -> dev.Request - 0, // 23: dev.ZorumsService.CorrectableEmpty:input_type -> dev.Request - 3, // 24: dev.ZorumsService.CorrectableEmpty2:input_type -> google.protobuf.Empty - 0, // 25: dev.ZorumsService.CorrectableStream:input_type -> dev.Request - 0, // 26: dev.ZorumsService.CorrectableStreamPerNodeArg:input_type -> dev.Request - 0, // 27: dev.ZorumsService.CorrectableStreamCustomReturnType:input_type -> dev.Request - 0, // 28: dev.ZorumsService.CorrectableStreamCombo:input_type -> dev.Request - 0, // 29: dev.ZorumsService.CorrectableStreamEmpty:input_type -> dev.Request - 3, // 30: dev.ZorumsService.CorrectableStreamEmpty2:input_type -> google.protobuf.Empty - 0, // 31: dev.ZorumsService.Unicast:input_type -> dev.Request - 0, // 32: dev.ZorumsService.Unicast2:input_type -> dev.Request - 1, // 33: dev.ZorumsService.GRPCCall:output_type -> dev.Response - 1, // 34: dev.ZorumsService.QuorumCall:output_type -> dev.Response - 1, // 35: dev.ZorumsService.QuorumCallPerNodeArg:output_type -> dev.Response - 1, // 36: dev.ZorumsService.QuorumCallCustomReturnType:output_type -> dev.Response - 1, // 37: dev.ZorumsService.QuorumCallCombo:output_type -> dev.Response - 1, // 38: dev.ZorumsService.QuorumCallEmpty:output_type -> dev.Response - 3, // 39: dev.ZorumsService.QuorumCallEmpty2:output_type -> google.protobuf.Empty - 1, // 40: dev.ZorumsService.Multicast:output_type -> dev.Response - 1, // 41: dev.ZorumsService.MulticastPerNodeArg:output_type -> dev.Response - 1, // 42: dev.ZorumsService.Multicast2:output_type -> dev.Response - 3, // 43: dev.ZorumsService.Multicast3:output_type -> google.protobuf.Empty - 3, // 44: dev.ZorumsService.Multicast4:output_type -> google.protobuf.Empty - 1, // 45: dev.ZorumsService.QuorumCallAsync:output_type -> dev.Response - 1, // 46: dev.ZorumsService.QuorumCallAsyncPerNodeArg:output_type -> dev.Response - 1, // 47: dev.ZorumsService.QuorumCallAsyncCustomReturnType:output_type -> dev.Response - 1, // 48: dev.ZorumsService.QuorumCallAsyncCombo:output_type -> dev.Response - 1, // 49: dev.ZorumsService.QuorumCallAsync2:output_type -> dev.Response - 3, // 50: dev.ZorumsService.QuorumCallAsyncEmpty:output_type -> google.protobuf.Empty - 1, // 51: dev.ZorumsService.QuorumCallAsyncEmpty2:output_type -> dev.Response - 1, // 52: dev.ZorumsService.Correctable:output_type -> dev.Response - 1, // 53: dev.ZorumsService.CorrectablePerNodeArg:output_type -> dev.Response - 1, // 54: dev.ZorumsService.CorrectableCustomReturnType:output_type -> dev.Response - 1, // 55: dev.ZorumsService.CorrectableCombo:output_type -> dev.Response - 3, // 56: dev.ZorumsService.CorrectableEmpty:output_type -> google.protobuf.Empty - 1, // 57: dev.ZorumsService.CorrectableEmpty2:output_type -> dev.Response - 1, // 58: dev.ZorumsService.CorrectableStream:output_type -> dev.Response - 1, // 59: dev.ZorumsService.CorrectableStreamPerNodeArg:output_type -> dev.Response - 1, // 60: dev.ZorumsService.CorrectableStreamCustomReturnType:output_type -> dev.Response - 1, // 61: dev.ZorumsService.CorrectableStreamCombo:output_type -> dev.Response - 3, // 62: dev.ZorumsService.CorrectableStreamEmpty:output_type -> google.protobuf.Empty - 1, // 63: dev.ZorumsService.CorrectableStreamEmpty2:output_type -> dev.Response - 1, // 64: dev.ZorumsService.Unicast:output_type -> dev.Response - 3, // 65: dev.ZorumsService.Unicast2:output_type -> google.protobuf.Empty - 33, // [33:66] is the sub-list for method output_type - 0, // [0:33] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_zorums_proto_init() } -func file_zorums_proto_init() { - if File_zorums_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_zorums_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_zorums_proto_goTypes, - DependencyIndexes: file_zorums_proto_depIdxs, - MessageInfos: file_zorums_proto_msgTypes, - }.Build() - File_zorums_proto = out.File - file_zorums_proto_rawDesc = nil - file_zorums_proto_goTypes = nil - file_zorums_proto_depIdxs = nil -} diff --git a/gorums.pb.go b/gorums.pb.go index 0e384e134..71b7a406c 100644 --- a/gorums.pb.go +++ b/gorums.pb.go @@ -4,8 +4,6 @@ // protoc v5.29.2 // source: gorums.proto -//go:build !protoopaque - package gorums import ( diff --git a/gorums_protoopaque.pb.go b/gorums_protoopaque.pb.go deleted file mode 100644 index d98d70b15..000000000 --- a/gorums_protoopaque.pb.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.3 -// protoc v5.29.2 -// source: gorums.proto - -//go:build protoopaque - -package gorums - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -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) -) - -var file_gorums_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50001, - Name: "gorums.rpc", - Tag: "varint,50001,opt,name=rpc", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50002, - Name: "gorums.unicast", - Tag: "varint,50002,opt,name=unicast", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50003, - Name: "gorums.multicast", - Tag: "varint,50003,opt,name=multicast", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50004, - Name: "gorums.quorumcall", - Tag: "varint,50004,opt,name=quorumcall", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50005, - Name: "gorums.correctable", - Tag: "varint,50005,opt,name=correctable", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50010, - Name: "gorums.async", - Tag: "varint,50010,opt,name=async", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50020, - Name: "gorums.per_node_arg", - Tag: "varint,50020,opt,name=per_node_arg", - Filename: "gorums.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*string)(nil), - Field: 50030, - Name: "gorums.custom_return_type", - Tag: "bytes,50030,opt,name=custom_return_type", - Filename: "gorums.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // call types - // - // optional bool rpc = 50001; - E_Rpc = &file_gorums_proto_extTypes[0] - // optional bool unicast = 50002; - E_Unicast = &file_gorums_proto_extTypes[1] - // optional bool multicast = 50003; - E_Multicast = &file_gorums_proto_extTypes[2] - // optional bool quorumcall = 50004; - E_Quorumcall = &file_gorums_proto_extTypes[3] - // optional bool correctable = 50005; - E_Correctable = &file_gorums_proto_extTypes[4] - // options for call types - // - // optional bool async = 50010; - E_Async = &file_gorums_proto_extTypes[5] - // optional bool per_node_arg = 50020; - E_PerNodeArg = &file_gorums_proto_extTypes[6] - // optional string custom_return_type = 50030; - E_CustomReturnType = &file_gorums_proto_extTypes[7] -) - -var File_gorums_proto protoreflect.FileDescriptor - -var file_gorums_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x32, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x12, - 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xd1, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x0a, 0x07, - 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x3a, 0x3e, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd3, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x3a, 0x40, 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd4, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x63, 0x61, 0x6c, 0x6c, 0x3a, 0x42, 0x0a, 0x0b, 0x63, 0x6f, - 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd5, 0x86, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x36, - 0x0a, 0x05, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xda, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x42, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x61, 0x72, 0x67, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe4, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x70, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x3a, 0x4e, 0x0a, 0x12, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xee, 0x86, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, - 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_gorums_proto_goTypes = []any{ - (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions -} -var file_gorums_proto_depIdxs = []int32{ - 0, // 0: gorums.rpc:extendee -> google.protobuf.MethodOptions - 0, // 1: gorums.unicast:extendee -> google.protobuf.MethodOptions - 0, // 2: gorums.multicast:extendee -> google.protobuf.MethodOptions - 0, // 3: gorums.quorumcall:extendee -> google.protobuf.MethodOptions - 0, // 4: gorums.correctable:extendee -> google.protobuf.MethodOptions - 0, // 5: gorums.async:extendee -> google.protobuf.MethodOptions - 0, // 6: gorums.per_node_arg:extendee -> google.protobuf.MethodOptions - 0, // 7: gorums.custom_return_type:extendee -> google.protobuf.MethodOptions - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 0, // [0:8] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_gorums_proto_init() } -func file_gorums_proto_init() { - if File_gorums_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gorums_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 8, - NumServices: 0, - }, - GoTypes: file_gorums_proto_goTypes, - DependencyIndexes: file_gorums_proto_depIdxs, - ExtensionInfos: file_gorums_proto_extTypes, - }.Build() - File_gorums_proto = out.File - file_gorums_proto_rawDesc = nil - file_gorums_proto_goTypes = nil - file_gorums_proto_depIdxs = nil -} diff --git a/internal/correctable/opts.pb.go b/internal/correctable/opts.pb.go index 34844ac3b..7fa4718a9 100644 --- a/internal/correctable/opts.pb.go +++ b/internal/correctable/opts.pb.go @@ -4,8 +4,6 @@ // protoc v5.29.2 // source: internal/correctable/opts.proto -//go:build !protoopaque - package correctable import ( diff --git a/internal/correctable/opts_protoopaque.pb.go b/internal/correctable/opts_protoopaque.pb.go deleted file mode 100644 index aeec1172f..000000000 --- a/internal/correctable/opts_protoopaque.pb.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.3 -// protoc v5.29.2 -// source: internal/correctable/opts.proto - -//go:build protoopaque - -package correctable - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -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) -) - -var file_internal_correctable_opts_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 6200, - Name: "correctable.correctable", - Tag: "varint,6200,opt,name=correctable", - Filename: "internal/correctable/opts.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 6201, - Name: "correctable.correctable_stream", - Tag: "varint,6201,opt,name=correctable_stream", - Filename: "internal/correctable/opts.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // optional bool correctable = 6200; - E_Correctable = &file_internal_correctable_opts_proto_extTypes[0] - // optional bool correctable_stream = 6201; - E_CorrectableStream = &file_internal_correctable_opts_proto_extTypes[1] -) - -var File_internal_correctable_opts_proto protoreflect.FileDescriptor - -var file_internal_correctable_opts_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x72, 0x65, - 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x20, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x3a, 0x41, 0x0a, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xb8, 0x30, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x3a, 0x4e, 0x0a, 0x12, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb9, 0x30, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x11, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_internal_correctable_opts_proto_goTypes = []any{ - (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions -} -var file_internal_correctable_opts_proto_depIdxs = []int32{ - 0, // 0: correctable.correctable:extendee -> google.protobuf.MethodOptions - 0, // 1: correctable.correctable_stream:extendee -> google.protobuf.MethodOptions - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 0, // [0:2] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_internal_correctable_opts_proto_init() } -func file_internal_correctable_opts_proto_init() { - if File_internal_correctable_opts_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_correctable_opts_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 2, - NumServices: 0, - }, - GoTypes: file_internal_correctable_opts_proto_goTypes, - DependencyIndexes: file_internal_correctable_opts_proto_depIdxs, - ExtensionInfos: file_internal_correctable_opts_proto_extTypes, - }.Build() - File_internal_correctable_opts_proto = out.File - file_internal_correctable_opts_proto_rawDesc = nil - file_internal_correctable_opts_proto_goTypes = nil - file_internal_correctable_opts_proto_depIdxs = nil -} diff --git a/ordering/ordering.pb.go b/ordering/ordering.pb.go index acf740522..0d8f93c79 100644 --- a/ordering/ordering.pb.go +++ b/ordering/ordering.pb.go @@ -4,8 +4,6 @@ // protoc v5.29.2 // source: ordering/ordering.proto -//go:build !protoopaque - package ordering import ( @@ -25,12 +23,12 @@ const ( // Metadata is sent together with application-specific message types, // and contains information necessary for Gorums to handle the messages. type Metadata struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` - Method string `protobuf:"bytes,2,opt,name=Method,proto3" json:"Method,omitempty"` - Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3"` + xxx_hidden_Method string `protobuf:"bytes,2,opt,name=Method,proto3"` + xxx_hidden_Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { @@ -60,46 +58,46 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { func (x *Metadata) GetMessageID() uint64 { if x != nil { - return x.MessageID + return x.xxx_hidden_MessageID } return 0 } func (x *Metadata) GetMethod() string { if x != nil { - return x.Method + return x.xxx_hidden_Method } return "" } func (x *Metadata) GetStatus() *status.Status { if x != nil { - return x.Status + return x.xxx_hidden_Status } return nil } func (x *Metadata) SetMessageID(v uint64) { - x.MessageID = v + x.xxx_hidden_MessageID = v } func (x *Metadata) SetMethod(v string) { - x.Method = v + x.xxx_hidden_Method = v } func (x *Metadata) SetStatus(v *status.Status) { - x.Status = v + x.xxx_hidden_Status = v } func (x *Metadata) HasStatus() bool { if x == nil { return false } - return x.Status != nil + return x.xxx_hidden_Status != nil } func (x *Metadata) ClearStatus() { - x.Status = nil + x.xxx_hidden_Status = nil } type Metadata_builder struct { @@ -114,9 +112,9 @@ func (b0 Metadata_builder) Build() *Metadata { m0 := &Metadata{} b, x := &b0, m0 _, _ = b, x - x.MessageID = b.MessageID - x.Method = b.Method - x.Status = b.Status + x.xxx_hidden_MessageID = b.MessageID + x.xxx_hidden_Method = b.Method + x.xxx_hidden_Status = b.Status return m0 } diff --git a/ordering/ordering_protoopaque.pb.go b/ordering/ordering_protoopaque.pb.go deleted file mode 100644 index 58abede15..000000000 --- a/ordering/ordering_protoopaque.pb.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.3 -// protoc v5.29.2 -// source: ordering/ordering.proto - -//go:build protoopaque - -package ordering - -import ( - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -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) -) - -// Metadata is sent together with application-specific message types, -// and contains information necessary for Gorums to handle the messages. -type Metadata struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3"` - xxx_hidden_Method string `protobuf:"bytes,2,opt,name=Method,proto3"` - xxx_hidden_Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Metadata) Reset() { - *x = Metadata{} - mi := &file_ordering_ordering_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_ordering_ordering_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) -} - -func (x *Metadata) GetMessageID() uint64 { - if x != nil { - return x.xxx_hidden_MessageID - } - return 0 -} - -func (x *Metadata) GetMethod() string { - if x != nil { - return x.xxx_hidden_Method - } - return "" -} - -func (x *Metadata) GetStatus() *status.Status { - if x != nil { - return x.xxx_hidden_Status - } - return nil -} - -func (x *Metadata) SetMessageID(v uint64) { - x.xxx_hidden_MessageID = v -} - -func (x *Metadata) SetMethod(v string) { - x.xxx_hidden_Method = v -} - -func (x *Metadata) SetStatus(v *status.Status) { - x.xxx_hidden_Status = v -} - -func (x *Metadata) HasStatus() bool { - if x == nil { - return false - } - return x.xxx_hidden_Status != nil -} - -func (x *Metadata) ClearStatus() { - x.xxx_hidden_Status = nil -} - -type Metadata_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - MessageID uint64 - Method string - Status *status.Status -} - -func (b0 Metadata_builder) Build() *Metadata { - m0 := &Metadata{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_MessageID = b.MessageID - x.xxx_hidden_Method = b.Method - x.xxx_hidden_Status = b.Status - return m0 -} - -var File_ordering_ordering_proto protoreflect.FileDescriptor - -var file_ordering_ordering_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x69, 0x6e, 0x67, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x08, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x42, 0x0a, 0x06, 0x47, 0x6f, - 0x72, 0x75, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x12, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x42, 0x22, - 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, - 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, - 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_ordering_ordering_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_ordering_ordering_proto_goTypes = []any{ - (*Metadata)(nil), // 0: ordering.Metadata - (*status.Status)(nil), // 1: google.rpc.Status -} -var file_ordering_ordering_proto_depIdxs = []int32{ - 1, // 0: ordering.Metadata.Status:type_name -> google.rpc.Status - 0, // 1: ordering.Gorums.NodeStream:input_type -> ordering.Metadata - 0, // 2: ordering.Gorums.NodeStream:output_type -> ordering.Metadata - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_ordering_ordering_proto_init() } -func file_ordering_ordering_proto_init() { - if File_ordering_ordering_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ordering_ordering_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_ordering_ordering_proto_goTypes, - DependencyIndexes: file_ordering_ordering_proto_depIdxs, - MessageInfos: file_ordering_ordering_proto_msgTypes, - }.Build() - File_ordering_ordering_proto = out.File - file_ordering_ordering_proto_rawDesc = nil - file_ordering_ordering_proto_goTypes = nil - file_ordering_ordering_proto_depIdxs = nil -} From b551784f391f3f69aeed22724d7eab931ce2edf8 Mon Sep 17 00:00:00 2001 From: asbjorn Date: Sun, 2 Feb 2025 22:57:43 +0100 Subject: [PATCH 08/10] updating proto files to edition 2023 with implicit field presence --- benchmark/benchmark.pb.go | 35 ++++++++++--------- benchmark/benchmark.proto | 4 ++- cmd/protoc-gen-gorums/dev/zorums.pb.go | 12 +++---- cmd/protoc-gen-gorums/dev/zorums.proto | 4 ++- gorums.pb.go | 5 +-- gorums.proto | 5 ++- internal/correctable/opts.pb.go | 5 +-- internal/correctable/opts.proto | 4 ++- .../testprotos/calltypes/async/async.proto | 5 ++- .../calltypes/importmsgs/importmsgs.proto | 5 ++- .../calltypes/multicast/multicast.proto | 5 ++- .../calltypes/quorumcall/quorumcall.proto | 5 ++- .../testprotos/calltypes/zorums/zorums.proto | 5 ++- .../failing/reservednames/reserved.proto | 5 ++- internal/testprotos/msgs/msgs.proto | 4 ++- ordering/ordering.pb.go | 11 +++--- ordering/ordering.proto | 4 ++- tests/config/config.pb.go | 11 +++--- tests/config/config.proto | 5 ++- tests/correctable/correctable.pb.go | 7 ++-- tests/correctable/correctable.proto | 5 ++- tests/dummy/dummy.pb.go | 6 ++-- tests/dummy/dummy.proto | 5 ++- tests/metadata/metadata.pb.go | 9 ++--- tests/metadata/metadata.proto | 5 ++- tests/mock/mock.proto | 5 ++- tests/oneway/oneway.pb.go | 8 ++--- tests/oneway/oneway.proto | 5 ++- tests/ordering/order.pb.go | 10 +++--- tests/ordering/order.proto | 5 ++- tests/qf/qf.pb.go | 9 ++--- tests/qf/qf.proto | 5 ++- tests/tls/tls.pb.go | 7 ++-- tests/tls/tls.proto | 5 ++- tests/unresponsive/unresponsive.pb.go | 5 +-- tests/unresponsive/unresponsive.proto | 5 ++- third_party/google/rpc/status.proto | 4 ++- 37 files changed, 161 insertions(+), 88 deletions(-) diff --git a/benchmark/benchmark.pb.go b/benchmark/benchmark.pb.go index c37338541..dd1e7f9a1 100644 --- a/benchmark/benchmark.pb.go +++ b/benchmark/benchmark.pb.go @@ -23,7 +23,7 @@ const ( type Echo struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3"` + xxx_hidden_Payload []byte `protobuf:"bytes,1,opt,name=payload"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -83,8 +83,8 @@ func (b0 Echo_builder) Build() *Echo { type TimedMsg struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_SendTime int64 `protobuf:"varint,1,opt,name=SendTime,proto3"` - xxx_hidden_Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3"` + xxx_hidden_SendTime int64 `protobuf:"varint,1,opt,name=SendTime"` + xxx_hidden_Payload []byte `protobuf:"bytes,2,opt,name=payload"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -286,15 +286,15 @@ func (b0 StopRequest_builder) Build() *StopRequest { type Result struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Name string `protobuf:"bytes,1,opt,name=Name,proto3"` - xxx_hidden_TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps,proto3"` - xxx_hidden_TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime,proto3"` - xxx_hidden_Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput,proto3"` - xxx_hidden_LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg,proto3"` - xxx_hidden_LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar,proto3"` - xxx_hidden_AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp,proto3"` - xxx_hidden_MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp,proto3"` - xxx_hidden_ServerStats *[]*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats,proto3"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=Name"` + xxx_hidden_TotalOps uint64 `protobuf:"varint,2,opt,name=TotalOps"` + xxx_hidden_TotalTime int64 `protobuf:"varint,3,opt,name=TotalTime"` + xxx_hidden_Throughput float64 `protobuf:"fixed64,4,opt,name=Throughput"` + xxx_hidden_LatencyAvg float64 `protobuf:"fixed64,5,opt,name=LatencyAvg"` + xxx_hidden_LatencyVar float64 `protobuf:"fixed64,6,opt,name=LatencyVar"` + xxx_hidden_AllocsPerOp uint64 `protobuf:"varint,7,opt,name=AllocsPerOp"` + xxx_hidden_MemPerOp uint64 `protobuf:"varint,8,opt,name=MemPerOp"` + xxx_hidden_ServerStats *[]*MemoryStat `protobuf:"bytes,9,rep,name=ServerStats"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -457,8 +457,8 @@ func (b0 Result_builder) Build() *Result { type MemoryStat struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Allocs uint64 `protobuf:"varint,1,opt,name=Allocs,proto3"` - xxx_hidden_Memory uint64 `protobuf:"varint,2,opt,name=Memory,proto3"` + xxx_hidden_Allocs uint64 `protobuf:"varint,1,opt,name=Allocs"` + xxx_hidden_Memory uint64 `protobuf:"varint,2,opt,name=Memory"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -528,7 +528,7 @@ func (b0 MemoryStat_builder) Build() *MemoryStat { type MemoryStatList struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_MemoryStats *[]*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats,proto3"` + xxx_hidden_MemoryStats *[]*MemoryStat `protobuf:"bytes,1,rep,name=MemoryStats"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -665,9 +665,10 @@ var file_benchmark_benchmark_proto_rawDesc = []byte{ 0x12, 0x13, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0xb5, 0x18, 0x01, 0x42, 0x28, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var file_benchmark_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 8) diff --git a/benchmark/benchmark.proto b/benchmark/benchmark.proto index f3ca19069..2f11e244c 100644 --- a/benchmark/benchmark.proto +++ b/benchmark/benchmark.proto @@ -1,9 +1,11 @@ -syntax = "proto3"; +edition = "2023"; package benchmark; option go_package = "github.com/relab/gorums/benchmark"; +option features.field_presence = IMPLICIT; + import "google/protobuf/empty.proto"; import "gorums.proto"; diff --git a/cmd/protoc-gen-gorums/dev/zorums.pb.go b/cmd/protoc-gen-gorums/dev/zorums.pb.go index 4f435adb4..5b9f16f72 100644 --- a/cmd/protoc-gen-gorums/dev/zorums.pb.go +++ b/cmd/protoc-gen-gorums/dev/zorums.pb.go @@ -23,7 +23,7 @@ const ( type Request struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` + xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -80,7 +80,7 @@ func (b0 Request_builder) Build() *Request { type Response struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Result int64 `protobuf:"varint,1,opt,name=Result,proto3"` + xxx_hidden_Result int64 `protobuf:"varint,1,opt,name=Result"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -137,7 +137,7 @@ func (b0 Response_builder) Build() *Response { type MyResponse struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value,proto3"` + xxx_hidden_Value string `protobuf:"bytes,1,opt,name=Value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -342,9 +342,9 @@ var file_zorums_proto_rawDesc = []byte{ 0x61, 0x73, 0x74, 0x32, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x04, 0x90, 0xb5, 0x18, 0x01, - 0x42, 0x1b, 0x5a, 0x19, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, - 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x20, 0x5a, 0x19, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, + 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x92, 0x03, 0x02, + 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var file_zorums_proto_msgTypes = make([]protoimpl.MessageInfo, 3) diff --git a/cmd/protoc-gen-gorums/dev/zorums.proto b/cmd/protoc-gen-gorums/dev/zorums.proto index b4f4e2039..6edbab621 100644 --- a/cmd/protoc-gen-gorums/dev/zorums.proto +++ b/cmd/protoc-gen-gorums/dev/zorums.proto @@ -1,9 +1,11 @@ -syntax = "proto3"; +edition = "2023"; package dev; option go_package = "cmd/protoc-gen-gorums/dev"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; import "google/protobuf/empty.proto"; diff --git a/gorums.pb.go b/gorums.pb.go index 71b7a406c..b13fe39ea 100644 --- a/gorums.pb.go +++ b/gorums.pb.go @@ -149,9 +149,10 @@ var file_gorums_proto_rawDesc = []byte{ 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xee, 0x86, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x1e, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, - 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var file_gorums_proto_goTypes = []any{ diff --git a/gorums.proto b/gorums.proto index f55b5c143..9f6c1147a 100644 --- a/gorums.proto +++ b/gorums.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package gorums; option go_package = "github.com/relab/gorums"; +option features.field_presence = IMPLICIT; + import "google/protobuf/descriptor.proto"; extend google.protobuf.MethodOptions { diff --git a/internal/correctable/opts.pb.go b/internal/correctable/opts.pb.go index 7fa4718a9..0a87c360c 100644 --- a/internal/correctable/opts.pb.go +++ b/internal/correctable/opts.pb.go @@ -64,10 +64,11 @@ var file_internal_correctable_opts_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb9, 0x30, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x65, 0x61, 0x6d, 0x42, 0x33, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x6c, 0x65, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x70, 0xe8, 0x07, } var file_internal_correctable_opts_proto_goTypes = []any{ diff --git a/internal/correctable/opts.proto b/internal/correctable/opts.proto index 14eaff0da..c8717c160 100644 --- a/internal/correctable/opts.proto +++ b/internal/correctable/opts.proto @@ -1,8 +1,10 @@ -syntax = "proto3"; +edition = "2023"; package correctable; option go_package = "github.com/relab/gorums/internal/correctable"; +option features.field_presence = IMPLICIT; + import "google/protobuf/descriptor.proto"; // These fields are used by the gorums plugin to describe diff --git a/internal/testprotos/calltypes/async/async.proto b/internal/testprotos/calltypes/async/async.proto index c18cdec42..a42f20574 100644 --- a/internal/testprotos/calltypes/async/async.proto +++ b/internal/testprotos/calltypes/async/async.proto @@ -1,9 +1,12 @@ // Test that Gorums can generate a single asynchronous quorum call method. -syntax = "proto3"; +edition = "2023"; + package gorums.testprotos.calltypes.async; option go_package = "github.com/relab/gorums/internal/testprotos/calltypes/async"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service AsyncQuorumCall { diff --git a/internal/testprotos/calltypes/importmsgs/importmsgs.proto b/internal/testprotos/calltypes/importmsgs/importmsgs.proto index 100568aa2..756fef29d 100644 --- a/internal/testprotos/calltypes/importmsgs/importmsgs.proto +++ b/internal/testprotos/calltypes/importmsgs/importmsgs.proto @@ -1,9 +1,12 @@ // Test that Gorums can generate a single quorum call method. -syntax = "proto3"; +edition = "2023"; + package gorums.testprotos.calltypes.quorumcall; option go_package = "github.com/relab/gorums/internal/testprotos/calltypes/quorumcall"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; import "internal/testprotos/msgs/msgs.proto"; diff --git a/internal/testprotos/calltypes/multicast/multicast.proto b/internal/testprotos/calltypes/multicast/multicast.proto index 852d7311b..96660246a 100644 --- a/internal/testprotos/calltypes/multicast/multicast.proto +++ b/internal/testprotos/calltypes/multicast/multicast.proto @@ -1,9 +1,12 @@ // Test that Gorums can generate a single multicast method. -syntax = "proto3"; +edition = "2023"; + package gorums.testprotos.calltypes.multicast; option go_package = "github.com/relab/gorums/internal/testprotos/calltypes/multicast"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; import "google/protobuf/empty.proto"; diff --git a/internal/testprotos/calltypes/quorumcall/quorumcall.proto b/internal/testprotos/calltypes/quorumcall/quorumcall.proto index b5006509f..f5088ac30 100644 --- a/internal/testprotos/calltypes/quorumcall/quorumcall.proto +++ b/internal/testprotos/calltypes/quorumcall/quorumcall.proto @@ -1,9 +1,12 @@ // Test that Gorums can generate a single quorum call method. -syntax = "proto3"; +edition = "2023"; + package gorums.testprotos.calltypes.quorumcall; option go_package = "github.com/relab/gorums/internal/testprotos/calltypes/quorumcall"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service QuorumCall { diff --git a/internal/testprotos/calltypes/zorums/zorums.proto b/internal/testprotos/calltypes/zorums/zorums.proto index 976ae4aa1..e8894447c 100644 --- a/internal/testprotos/calltypes/zorums/zorums.proto +++ b/internal/testprotos/calltypes/zorums/zorums.proto @@ -1,9 +1,12 @@ // Copy of dev/zorums.proto -syntax = "proto3"; +edition = "2023"; + package gorums.testprotos.calltypes.zorums; option go_package = "github.com/relab/gorums/internal/testprotos/calltypes/zorums"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; import "google/protobuf/empty.proto"; diff --git a/internal/testprotos/failing/reservednames/reserved.proto b/internal/testprotos/failing/reservednames/reserved.proto index a12156b0e..3854cfa90 100644 --- a/internal/testprotos/failing/reservednames/reserved.proto +++ b/internal/testprotos/failing/reservednames/reserved.proto @@ -1,10 +1,13 @@ // Test that Gorums will stop code generation if one of the // reserved Gorums types are used as a message type. -syntax = "proto3"; +edition = "2023"; + package gorums.testprotos.failing.reservednames; option go_package = "github.com/relab/gorums/internal/testprotos/failing/reservednames"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service Reserved { diff --git a/internal/testprotos/msgs/msgs.proto b/internal/testprotos/msgs/msgs.proto index 3904a3846..3917490a5 100644 --- a/internal/testprotos/msgs/msgs.proto +++ b/internal/testprotos/msgs/msgs.proto @@ -1,8 +1,10 @@ -syntax = "proto3"; +edition = "2023"; package gorums.testprotos.msgs; option go_package = "github.com/relab/gorums/internal/testprotos/msgs"; +option features.field_presence = IMPLICIT; + message Request { string Value = 1; } message Response { int64 Result = 1; } message MyResponse { string Value = 1; } diff --git a/ordering/ordering.pb.go b/ordering/ordering.pb.go index 0d8f93c79..f22a2bafb 100644 --- a/ordering/ordering.pb.go +++ b/ordering/ordering.pb.go @@ -24,9 +24,9 @@ const ( // and contains information necessary for Gorums to handle the messages. type Metadata struct { state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_MessageID uint64 `protobuf:"varint,1,opt,name=MessageID,proto3"` - xxx_hidden_Method string `protobuf:"bytes,2,opt,name=Method,proto3"` - xxx_hidden_Status *status.Status `protobuf:"bytes,3,opt,name=Status,proto3"` + xxx_hidden_MessageID uint64 `protobuf:"varint,1,opt,name=MessageID"` + xxx_hidden_Method string `protobuf:"bytes,2,opt,name=Method"` + xxx_hidden_Status *status.Status `protobuf:"bytes,3,opt,name=Status"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -135,10 +135,11 @@ var file_ordering_ordering_proto_rawDesc = []byte{ 0x72, 0x75, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x42, 0x22, + 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x42, 0x27, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, - 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x67, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x70, 0xe8, 0x07, } var file_ordering_ordering_proto_msgTypes = make([]protoimpl.MessageInfo, 1) diff --git a/ordering/ordering.proto b/ordering/ordering.proto index 380596d0a..ebaf96aa2 100644 --- a/ordering/ordering.proto +++ b/ordering/ordering.proto @@ -1,8 +1,10 @@ -syntax = "proto3"; +edition = "2023"; package ordering; option go_package = "github.com/relab/gorums/ordering"; +option features.field_presence = IMPLICIT; + import "google/rpc/status.proto"; service Gorums { diff --git a/tests/config/config.pb.go b/tests/config/config.pb.go index 0f0f23cc6..15ac7ef91 100644 --- a/tests/config/config.pb.go +++ b/tests/config/config.pb.go @@ -23,7 +23,7 @@ const ( type Request struct { state protoimpl.MessageState `protogen:"open.v1"` - Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + Num uint64 `protobuf:"varint,1,opt,name=Num" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,8 +67,8 @@ func (x *Request) GetNum() uint64 { type Response struct { state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Num uint64 `protobuf:"varint,2,opt,name=Num,proto3" json:"Num,omitempty"` + Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` + Num uint64 `protobuf:"varint,2,opt,name=Num" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -131,10 +131,11 @@ var file_config_config_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x54, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x67, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x42, 0x2b, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x69, 0x67, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/config/config.proto b/tests/config/config.proto index fe556e0ee..dbed06874 100644 --- a/tests/config/config.proto +++ b/tests/config/config.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package config; option go_package = "github.com/relab/gorums/tests/config"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service ConfigTest { diff --git a/tests/correctable/correctable.pb.go b/tests/correctable/correctable.pb.go index aab663c85..d153562ff 100644 --- a/tests/correctable/correctable.pb.go +++ b/tests/correctable/correctable.pb.go @@ -59,7 +59,7 @@ func (*CorrectableRequest) Descriptor() ([]byte, []int) { type CorrectableResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Level int32 `protobuf:"varint,1,opt,name=Level,proto3" json:"Level,omitempty"` + Level int32 `protobuf:"varint,1,opt,name=Level" json:"Level,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -124,10 +124,11 @@ var file_correctable_correctable_proto_rawDesc = []byte{ 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, + 0x65, 0x22, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x30, 0x01, 0x42, 0x30, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x72, 0x65, - 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/correctable/correctable.proto b/tests/correctable/correctable.proto index 0476b34e1..999503283 100644 --- a/tests/correctable/correctable.proto +++ b/tests/correctable/correctable.proto @@ -1,8 +1,11 @@ -syntax = "proto3"; +edition = "2023"; + package correctable; option go_package = "github.com/relab/gorums/tests/correctable"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service CorrectableTest{ diff --git a/tests/dummy/dummy.pb.go b/tests/dummy/dummy.pb.go index bc60a59e8..7ef7db976 100644 --- a/tests/dummy/dummy.pb.go +++ b/tests/dummy/dummy.pb.go @@ -64,10 +64,10 @@ var file_dummy_dummy_proto_rawDesc = []byte{ 0x70, 0x74, 0x79, 0x32, 0x2d, 0x0a, 0x05, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x22, 0x00, 0x42, 0x2a, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, - 0x73, 0x74, 0x73, 0x2f, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x73, 0x74, 0x73, 0x2f, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/dummy/dummy.proto b/tests/dummy/dummy.proto index cec1ac44a..cecf0ce88 100644 --- a/tests/dummy/dummy.proto +++ b/tests/dummy/dummy.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package dummy; option go_package = "github.com/relab/gorums/tests/dummy"; +option features.field_presence = IMPLICIT; + service Dummy { rpc Test(Empty) returns (Empty) {} } diff --git a/tests/metadata/metadata.pb.go b/tests/metadata/metadata.pb.go index aaf45911a..05e67ad1c 100644 --- a/tests/metadata/metadata.pb.go +++ b/tests/metadata/metadata.pb.go @@ -23,7 +23,7 @@ const ( type NodeID struct { state protoimpl.MessageState `protogen:"open.v1"` - ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + ID uint32 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,7 +67,7 @@ func (x *NodeID) GetID() uint32 { type IPAddr struct { state protoimpl.MessageState `protogen:"open.v1"` - Addr string `protobuf:"bytes,1,opt,name=Addr,proto3" json:"Addr,omitempty"` + Addr string `protobuf:"bytes,1,opt,name=Addr" json:"Addr,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -127,10 +127,11 @@ var file_metadata_metadata_proto_rawDesc = []byte{ 0x12, 0x34, 0x0a, 0x06, 0x57, 0x68, 0x61, 0x74, 0x49, 0x50, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x50, - 0x41, 0x64, 0x64, 0x72, 0x22, 0x00, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x41, 0x64, 0x64, 0x72, 0x22, 0x00, 0x42, 0x2d, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, + 0xe8, 0x07, } var ( diff --git a/tests/metadata/metadata.proto b/tests/metadata/metadata.proto index 55b651c48..3f8e72b38 100644 --- a/tests/metadata/metadata.proto +++ b/tests/metadata/metadata.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package metadata; option go_package = "github.com/relab/gorums/tests/metadata"; +option features.field_presence = IMPLICIT; + import "google/protobuf/empty.proto"; service MetadataTest { diff --git a/tests/mock/mock.proto b/tests/mock/mock.proto index b5a47c9e3..d13747beb 100644 --- a/tests/mock/mock.proto +++ b/tests/mock/mock.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package mock; option go_package = "github.com/relab/gorums/tests/mock"; +option features.field_presence = IMPLICIT; + message Request { string val = 1; } diff --git a/tests/oneway/oneway.pb.go b/tests/oneway/oneway.pb.go index 3ef5efaa9..18c78284e 100644 --- a/tests/oneway/oneway.pb.go +++ b/tests/oneway/oneway.pb.go @@ -23,7 +23,7 @@ const ( type Request struct { state protoimpl.MessageState `protogen:"open.v1"` - Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + Num uint64 `protobuf:"varint,1,opt,name=Num" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -120,10 +120,10 @@ var file_oneway_oneway_proto_rawDesc = []byte{ 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x2e, 0x6f, 0x6e, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x6f, 0x6e, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x08, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb6, - 0x18, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x18, 0x01, 0x42, 0x2b, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, - 0x73, 0x74, 0x73, 0x2f, 0x6f, 0x6e, 0x65, 0x77, 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x74, 0x73, 0x2f, 0x6f, 0x6e, 0x65, 0x77, 0x61, 0x79, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, + 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/oneway/oneway.proto b/tests/oneway/oneway.proto index 83e3488d5..f93eede4d 100644 --- a/tests/oneway/oneway.proto +++ b/tests/oneway/oneway.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package oneway; option go_package = "github.com/relab/gorums/tests/oneway"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service OnewayTest { diff --git a/tests/ordering/order.pb.go b/tests/ordering/order.pb.go index 9c27d203b..72d18e8a2 100644 --- a/tests/ordering/order.pb.go +++ b/tests/ordering/order.pb.go @@ -23,7 +23,7 @@ const ( type Request struct { state protoimpl.MessageState `protogen:"open.v1"` - Num uint64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + Num uint64 `protobuf:"varint,1,opt,name=Num" json:"Num,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,7 +67,7 @@ func (x *Request) GetNum() uint64 { type Response struct { state protoimpl.MessageState `protogen:"open.v1"` - InOrder bool `protobuf:"varint,1,opt,name=InOrder,proto3" json:"InOrder,omitempty"` + InOrder bool `protobuf:"varint,1,opt,name=InOrder" json:"InOrder,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -130,10 +130,10 @@ var file_ordering_order_proto_rawDesc = []byte{ 0x33, 0x0a, 0x08, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x50, 0x43, 0x12, 0x11, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x73, 0x65, 0x22, 0x00, 0x42, 0x2d, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, - 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x92, 0x03, + 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/ordering/order.proto b/tests/ordering/order.proto index 49fefe989..27ba8a4b2 100644 --- a/tests/ordering/order.proto +++ b/tests/ordering/order.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package ordering; option go_package = "github.com/relab/gorums/tests/ordering"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service GorumsTest { diff --git a/tests/qf/qf.pb.go b/tests/qf/qf.pb.go index 77be2df6f..6da398254 100644 --- a/tests/qf/qf.pb.go +++ b/tests/qf/qf.pb.go @@ -25,7 +25,7 @@ const ( type Request struct { state protoimpl.MessageState `protogen:"open.v1"` - Value int64 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -69,7 +69,7 @@ func (x *Request) GetValue() int64 { type Response struct { state protoimpl.MessageState `protogen:"open.v1"` - Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"` + Result int64 `protobuf:"varint,1,opt,name=Result" json:"Result,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -127,9 +127,10 @@ var file_qf_qf_proto_rawDesc = []byte{ 0x01, 0x12, 0x2c, 0x0a, 0x09, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0b, 0x2e, 0x71, 0x66, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x71, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x42, - 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, + 0x27, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, - 0x2f, 0x71, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x71, 0x66, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/qf/qf.proto b/tests/qf/qf.proto index 5d5e2f565..ff6eaa45d 100644 --- a/tests/qf/qf.proto +++ b/tests/qf/qf.proto @@ -1,8 +1,11 @@ // Test to benchmark quorum functions with and without the request parameter. -syntax = "proto3"; +edition = "2023"; + package qf; option go_package = "github.com/relab/gorums/tests/qf"; +option features.field_presence = IMPLICIT; + import "gorums.proto"; service QuorumFunction { diff --git a/tests/tls/tls.pb.go b/tests/tls/tls.pb.go index db67ab80c..e7b3fec78 100644 --- a/tests/tls/tls.pb.go +++ b/tests/tls/tls.pb.go @@ -58,7 +58,7 @@ func (*Request) Descriptor() ([]byte, []int) { type Response struct { state protoimpl.MessageState `protogen:"open.v1"` - OK bool `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"` + OK bool `protobuf:"varint,1,opt,name=OK" json:"OK,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -109,10 +109,11 @@ var file_tls_tls_proto_rawDesc = []byte{ 0x4b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x4f, 0x4b, 0x32, 0x2f, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x12, 0x28, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x54, 0x4c, 0x53, 0x12, 0x0c, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x74, 0x6c, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, 0x21, + 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x28, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x74, 0x6c, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x70, 0xe8, 0x07, } var ( diff --git a/tests/tls/tls.proto b/tests/tls/tls.proto index 8de4cfb3d..6e1a8e889 100644 --- a/tests/tls/tls.proto +++ b/tests/tls/tls.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package tls; option go_package = "github.com/relab/gorums/tests/tls"; +option features.field_presence = IMPLICIT; + service TLS { rpc TestTLS(Request) returns (Response) {} } diff --git a/tests/unresponsive/unresponsive.pb.go b/tests/unresponsive/unresponsive.pb.go index b26f727b6..0b180d4db 100644 --- a/tests/unresponsive/unresponsive.pb.go +++ b/tests/unresponsive/unresponsive.pb.go @@ -67,10 +67,11 @@ var file_unresponsive_unresponsive_proto_rawDesc = []byte{ 0x55, 0x6e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x12, 0x13, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x76, 0x65, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x31, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x62, 0x2f, 0x67, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, } var ( diff --git a/tests/unresponsive/unresponsive.proto b/tests/unresponsive/unresponsive.proto index 765d20e9f..7aa61ebdd 100644 --- a/tests/unresponsive/unresponsive.proto +++ b/tests/unresponsive/unresponsive.proto @@ -1,7 +1,10 @@ -syntax = "proto3"; +edition = "2023"; + package unresponsive; option go_package = "github.com/relab/gorums/tests/unresponsive"; +option features.field_presence = IMPLICIT; + service Unresponsive { rpc TestUnresponsive(Empty) returns (Empty) {} } diff --git a/third_party/google/rpc/status.proto b/third_party/google/rpc/status.proto index 3b1f7a932..4f177a029 100644 --- a/third_party/google/rpc/status.proto +++ b/third_party/google/rpc/status.proto @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -syntax = "proto3"; +edition = "2023"; package google.rpc; +option features.field_presence = IMPLICIT; + import "google/protobuf/any.proto"; option cc_enable_arenas = true; From 6b95a78379bacbeac809e703d1b9aca3d4415f42 Mon Sep 17 00:00:00 2001 From: asbjorn Date: Mon, 3 Feb 2025 21:29:20 +0100 Subject: [PATCH 09/10] uding opaque api in testprotos --- internal/protoc/protoc_runner.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/protoc/protoc_runner.go b/internal/protoc/protoc_runner.go index 8846e616a..18f2605dd 100644 --- a/internal/protoc/protoc_runner.go +++ b/internal/protoc/protoc_runner.go @@ -10,6 +10,7 @@ import ( func Run(compileType string, args ...string) (string, error) { cmd := exec.Command("protoc", "-I.:"+repoRoot()) cmd.Args = append(cmd.Args, protoArgs[compileType]...) + cmd.Args = append(cmd.Args, "--go_opt=default_api_level=API_OPAQUE") cmd.Args = append(cmd.Args, args...) out, err := cmd.CombinedOutput() return string(out), err From 00d8846056bc6efe4c84517546878f1c03c7e97a Mon Sep 17 00:00:00 2001 From: asbjorn Date: Mon, 3 Feb 2025 23:14:46 +0100 Subject: [PATCH 10/10] use newer protoc for tests --- .github/workflows/go-test.yml | 2 ++ .github/workflows/golangci-lint.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index ba059ed7b..f5adf1a03 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -36,6 +36,8 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v3.0.0 with: + version: "29.2" + include-pre-releases: true repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install tools diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 3a1adfae9..b9ba5a6c9 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -35,6 +35,8 @@ jobs: - name: Setup Protoc uses: arduino/setup-protoc@v3.0.0 with: + version: "29.2" + include-pre-releases: true repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Run Make