diff --git a/buf.gen.yaml b/buf.gen.yaml index 4460e5a..7bd7c33 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,9 +1,13 @@ -version: v1 +version: v2 managed: enabled: true - go_package_prefix: - default: github.com/restatedev/sdk-go/generated + override: + - file_option: go_package_prefix + value: github.com/restatedev/sdk-go/generated plugins: - - plugin: go + - remote: buf.build/protocolbuffers/go:v1.34.2 out: generated opt: paths=source_relative +inputs: + - module: buf.build/restatedev/service-protocol + - directory: proto diff --git a/buf.lock b/buf.lock index 84e0028..4f98143 100644 --- a/buf.lock +++ b/buf.lock @@ -1,8 +1,2 @@ # Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: restatedev - repository: proto - commit: 6ea2d15aed8f408590a1465844df5a8e - digest: shake256:e6599809ff13490a631f87d1a4b13ef1886d1bd1c0aa001ccb92806c0acc373d047a6ead761f8a21dfbd57a4fd9acd5915a52e47bd5b4e4a02dd1766f78511b3 +version: v2 diff --git a/buf.yaml b/buf.yaml index 1a51945..a13d509 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,4 +1,7 @@ -version: v1 +version: v2 +modules: + - path: proto + name: buf.build/restatedev/sdk-go breaking: use: - FILE diff --git a/context.go b/context.go index ae07e7d..fb05ea7 100644 --- a/context.go +++ b/context.go @@ -84,11 +84,6 @@ type CallClient interface { RequestFuture(input any) (ResponseFuture, error) // Request makes a call and blocks on getting the response which is stored in output Request(input any, output any) error - SendClient -} - -// SendClient allows for one-way invocations to a particular service/key/method tuple. -type SendClient interface { // Send makes a one-way call which is executed in the background Send(input any, delay time.Duration) error } diff --git a/encoding/encoding.go b/encoding/encoding.go index 2f72978..30e4d65 100644 --- a/encoding/encoding.go +++ b/encoding/encoding.go @@ -5,6 +5,7 @@ import ( "fmt" "reflect" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -20,6 +21,10 @@ var ( // ProtoCodec marshals proto.Message and unmarshals into proto.Message or pointers to types that implement proto.Message // In handlers, it uses a content-type of application/proto ProtoCodec PayloadCodec = protoCodec{} + // ProtoJSONCodec marshals proto.Message and unmarshals into proto.Message or pointers to types that implement proto.Message + // It uses the protojson package to marshal and unmarshal + // In handlers, it uses a content-type of application/json + ProtoJSONCodec PayloadCodec = protoJSONCodec{} // JSONCodec marshals any json.Marshallable type and unmarshals into any json.Unmarshallable type // In handlers, it uses a content-type of application/json JSONCodec PayloadCodec = jsonCodec{} @@ -188,23 +193,11 @@ func (p protoCodec) Unmarshal(data []byte, input any) (err error) { // called with a *Message return proto.Unmarshal(data, input) default: - // we must support being called with a **Message where *Message is nil because this is the result of new(I) where I is a proto.Message - // and calling with new(I) is really the only generic approach. - value := reflect.ValueOf(input) - if value.Kind() != reflect.Pointer || value.IsNil() || value.Elem().Kind() != reflect.Pointer { - return fmt.Errorf("ProtoCodec.Unmarshal called with neither a proto.Message nor a non-nil pointer to a type that implements proto.Message.") - } - elem := value.Elem() // hopefully a *Message - if elem.IsNil() { - // allocate a &Message and swap this in - elem.Set(reflect.New(elem.Type().Elem())) - } - switch elemI := elem.Interface().(type) { - case proto.Message: - return proto.Unmarshal(data, elemI) - default: - return fmt.Errorf("ProtoCodec.Unmarshal called with neither a proto.Message nor a non-nil pointer to a type that implements proto.Message.") + msg, err := allocateProtoMessage("ProtoCodec", input) + if err != nil { + return err } + return proto.Unmarshal(data, msg) } } @@ -216,3 +209,57 @@ func (p protoCodec) Marshal(output any) (data []byte, err error) { return nil, fmt.Errorf("ProtoCodec.Marshal called with a type that is not a proto.Message") } } + +type protoJSONCodec struct{} + +func (j protoJSONCodec) InputPayload(_ any) *InputPayload { + return &InputPayload{Required: true, ContentType: proto.String("application/json")} +} + +func (j protoJSONCodec) OutputPayload(_ any) *OutputPayload { + return &OutputPayload{ContentType: proto.String("application/json")} +} + +func (j protoJSONCodec) Unmarshal(data []byte, input any) (err error) { + switch input := input.(type) { + case proto.Message: + // called with a *Message + return protojson.Unmarshal(data, input) + default: + msg, err := allocateProtoMessage("ProtoJSONCodec", input) + if err != nil { + return err + } + return protojson.Unmarshal(data, msg) + } +} + +func (j protoJSONCodec) Marshal(output any) ([]byte, error) { + switch output := output.(type) { + case proto.Message: + return protojson.Marshal(output) + default: + return nil, fmt.Errorf("ProtoJSONCodec.Marshal called with a type that is not a proto.Message") + } +} + +// we must support being called with a **Message where *Message is nil because this is the result of new(I) where I is a proto.Message +// new(I) is really the only generic approach for allocating. Hitting this code path is meaningfully slower +// for protobuf decoding, but the effect is minimal for protojson +func allocateProtoMessage(codecName string, input any) (proto.Message, error) { + value := reflect.ValueOf(input) + if value.Kind() != reflect.Pointer || value.IsNil() || value.Elem().Kind() != reflect.Pointer { + return nil, fmt.Errorf("%s.Unmarshal called with neither a proto.Message nor a non-nil pointer to a type that implements proto.Message.", codecName) + } + elem := value.Elem() // hopefully a *Message + if elem.IsNil() { + // allocate a &Message and swap this in + elem.Set(reflect.New(elem.Type().Elem())) + } + switch elemI := elem.Interface().(type) { + case proto.Message: + return elemI, nil + default: + return nil, fmt.Errorf("%s.Unmarshal called with neither a proto.Message nor a non-nil pointer to a type that implements proto.Message.", codecName) + } +} diff --git a/encoding/encoding_test.go b/encoding/encoding_test.go index 6a9dd75..67482d9 100644 --- a/encoding/encoding_test.go +++ b/encoding/encoding_test.go @@ -1,9 +1,10 @@ package encoding import ( + "encoding/base64" "testing" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" ) func willPanic(t *testing.T, do func()) { @@ -73,9 +74,10 @@ func TestProto(t *testing.T) { func TestVoid(t *testing.T) { codecs := map[string]Codec{ - "json": JSONCodec, - "proto": ProtoCodec, - "binary": BinaryCodec, + "json": JSONCodec, + "proto": ProtoCodec, + "protojson": ProtoJSONCodec, + "binary": BinaryCodec, } for name, codec := range codecs { t.Run(name, func(t *testing.T) { @@ -98,3 +100,52 @@ func TestVoid(t *testing.T) { }) } } + +func BenchmarkProto(b *testing.B) { + // protoscope -s <(echo '1: {4 5 6 7}') | base64 + data, err := base64.StdEncoding.DecodeString("CgQEBQYH") + if err != nil { + b.Fatal(err) + } + benchmarkProto(b, ProtoCodec, data) +} + +func BenchmarkProtoJSON(b *testing.B) { + benchmarkProto(b, ProtoJSONCodec, []byte(`{"entryIndexes": [1,2,3]}`)) +} + +func benchmarkProto(b *testing.B, codec Codec, data []byte) { + b.Run("non-nil proto.Message", func(b *testing.B) { + for n := 0; n < b.N; n++ { + a := new(protocol.SuspensionMessage) + if err := codec.Unmarshal(data, a); err != nil { + b.Fatal(err) + } + } + }) + + b.Run("non-nil pointer to non-nil proto.Message", func(b *testing.B) { + for n := 0; n < b.N; n++ { + a := new(protocol.SuspensionMessage) + if err := codec.Unmarshal(data, &a); err != nil { + b.Fatal(err) + } + } + }) + + b.Run("non-nil pointer to nil proto.Message", func(b *testing.B) { + for n := 0; n < b.N; n++ { + var a *protocol.SuspensionMessage + if err := codec.Unmarshal(data, &a); err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkAllocateProtoMessage(b *testing.B) { + for n := 0; n < b.N; n++ { + var a *protocol.SuspensionMessage + allocateProtoMessage("", &a) + } +} diff --git a/example/utils.go b/example/utils.go deleted file mode 100644 index cd8baba..0000000 --- a/example/utils.go +++ /dev/null @@ -1,46 +0,0 @@ -package main - -import ( - "errors" - "fmt" - "math/big" - - restate "github.com/restatedev/sdk-go" -) - -var health = restate. - NewService("health"). - Handler("ping", restate.NewServiceHandler( - func(restate.Context, restate.Void) (restate.Void, error) { - return restate.Void{}, nil - })) - -var bigCounter = restate. - NewObject("bigCounter"). - Handler("add", restate.NewObjectHandler( - func(ctx restate.ObjectContext, deltaText string) (string, error) { - delta, ok := big.NewInt(0).SetString(deltaText, 10) - if !ok { - return "", restate.TerminalError(fmt.Errorf("input must be a valid integer string: %s", deltaText)) - } - - bytes, err := restate.GetAs[[]byte](ctx, "counter", restate.WithBinary) - if err != nil && !errors.Is(err, restate.ErrKeyNotFound) { - return "", err - } - newCount := big.NewInt(0).Add(big.NewInt(0).SetBytes(bytes), delta) - if err := ctx.Set("counter", newCount.Bytes(), restate.WithBinary); err != nil { - return "", err - } - - return newCount.String(), nil - })). - Handler("get", restate.NewObjectSharedHandler( - func(ctx restate.ObjectSharedContext, _ restate.Void) (string, error) { - bytes, err := restate.GetAs[[]byte](ctx, "counter", restate.WithBinary) - if err != nil { - return "", err - } - - return big.NewInt(0).SetBytes(bytes).String(), err - })) diff --git a/examples/codegen/buf.gen.yaml b/examples/codegen/buf.gen.yaml new file mode 100644 index 0000000..95c317a --- /dev/null +++ b/examples/codegen/buf.gen.yaml @@ -0,0 +1,17 @@ +version: v2 +managed: + enabled: true +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: . + opt: paths=source_relative + - local: + - docker + - run + - --pull=always + - -i + - ghcr.io/restatedev/protoc-gen-go-restate:latest + out: . + opt: paths=source_relative +inputs: + - directory: . diff --git a/examples/codegen/buf.lock b/examples/codegen/buf.lock new file mode 100644 index 0000000..ce7c150 --- /dev/null +++ b/examples/codegen/buf.lock @@ -0,0 +1,6 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/restatedev/sdk-go + commit: ed58dada9ec3427fb6ecb906d7d4c710 + digest: b5:ed6ef374e958c3edb369e82ff79671257e5d480d8acee61a8ff3297e65bd26a77bbfbc4ce7312f639bc2e7f5ae6e0089ffdb95d32a476093fe86629e7eb6daa8 diff --git a/examples/codegen/buf.yaml b/examples/codegen/buf.yaml new file mode 100644 index 0000000..f565665 --- /dev/null +++ b/examples/codegen/buf.yaml @@ -0,0 +1,9 @@ +version: v2 +lint: + use: + - DEFAULT +breaking: + use: + - FILE +deps: + - buf.build/restatedev/sdk-go diff --git a/examples/codegen/main.go b/examples/codegen/main.go new file mode 100644 index 0000000..b3d7132 --- /dev/null +++ b/examples/codegen/main.go @@ -0,0 +1,67 @@ +package main + +import ( + "context" + "errors" + "fmt" + "log/slog" + "os" + + restate "github.com/restatedev/sdk-go" + helloworld "github.com/restatedev/sdk-go/examples/codegen/proto" + "github.com/restatedev/sdk-go/server" +) + +type greeter struct { + helloworld.UnimplementedGreeterServer +} + +func (greeter) SayHello(ctx restate.Context, req *helloworld.HelloRequest) (*helloworld.HelloResponse, error) { + counter := helloworld.NewCounterClient(ctx, req.Name) + count, err := counter.Add(). + Request(&helloworld.AddRequest{Delta: 1}) + if err != nil { + return nil, err + } + return &helloworld.HelloResponse{ + Message: fmt.Sprintf("Hello, %s! Call number: %d", req.Name, count.Value), + }, nil +} + +type counter struct { + helloworld.UnimplementedCounterServer +} + +func (c counter) Add(ctx restate.ObjectContext, req *helloworld.AddRequest) (*helloworld.GetResponse, error) { + count, err := restate.GetAs[int64](ctx, "counter") + if err != nil && !errors.Is(err, restate.ErrKeyNotFound) { + return nil, err + } + + count += 1 + if err := ctx.Set("counter", count); err != nil { + return nil, err + } + + return &helloworld.GetResponse{Value: count}, nil +} + +func (c counter) Get(ctx restate.ObjectSharedContext, _ *helloworld.GetRequest) (*helloworld.GetResponse, error) { + count, err := restate.GetAs[int64](ctx, "counter") + if err != nil && !errors.Is(err, restate.ErrKeyNotFound) { + return nil, err + } + + return &helloworld.GetResponse{Value: count}, nil +} + +func main() { + server := server.NewRestate(). + Bind(helloworld.NewGreeterServer(greeter{})). + Bind(helloworld.NewCounterServer(counter{})) + + if err := server.Start(context.Background(), ":9080"); err != nil { + slog.Error("application exited unexpectedly", "err", err.Error()) + os.Exit(1) + } +} diff --git a/examples/codegen/proto/helloworld.pb.go b/examples/codegen/proto/helloworld.pb.go new file mode 100644 index 0000000..cb47f26 --- /dev/null +++ b/examples/codegen/proto/helloworld.pb.go @@ -0,0 +1,413 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: proto/helloworld.proto + +package helloworld + +import ( + _ "github.com/restatedev/sdk-go/generated/dev/restate/sdk" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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 HelloRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *HelloRequest) Reset() { + *x = HelloRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_helloworld_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelloRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelloRequest) ProtoMessage() {} + +func (x *HelloRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_helloworld_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead. +func (*HelloRequest) Descriptor() ([]byte, []int) { + return file_proto_helloworld_proto_rawDescGZIP(), []int{0} +} + +func (x *HelloRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type HelloResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *HelloResponse) Reset() { + *x = HelloResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_helloworld_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelloResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelloResponse) ProtoMessage() {} + +func (x *HelloResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_helloworld_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead. +func (*HelloResponse) Descriptor() ([]byte, []int) { + return file_proto_helloworld_proto_rawDescGZIP(), []int{1} +} + +func (x *HelloResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type AddRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Delta int64 `protobuf:"varint,1,opt,name=delta,proto3" json:"delta,omitempty"` +} + +func (x *AddRequest) Reset() { + *x = AddRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_helloworld_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddRequest) ProtoMessage() {} + +func (x *AddRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_helloworld_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead. +func (*AddRequest) Descriptor() ([]byte, []int) { + return file_proto_helloworld_proto_rawDescGZIP(), []int{2} +} + +func (x *AddRequest) GetDelta() int64 { + if x != nil { + return x.Delta + } + return 0 +} + +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_helloworld_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_helloworld_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_proto_helloworld_proto_rawDescGZIP(), []int{3} +} + +type GetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_helloworld_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResponse) ProtoMessage() {} + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_helloworld_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_proto_helloworld_proto_rawDescGZIP(), []int{4} +} + +func (x *GetResponse) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +var File_proto_helloworld_proto protoreflect.FileDescriptor + +var file_proto_helloworld_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, + 0x6f, 0x72, 0x6c, 0x64, 0x1a, 0x18, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, + 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x22, 0x0a, + 0x0a, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, + 0x61, 0x22, 0x0c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x23, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x32, 0x4c, 0x0a, 0x07, 0x47, 0x72, 0x65, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x41, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x18, 0x2e, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x32, 0x87, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, + 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x16, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, + 0x16, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, + 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x04, 0x98, 0x80, 0x01, 0x02, 0x1a, 0x04, 0x98, 0x80, 0x01, 0x02, 0x42, 0xa3, 0x01, 0x0a, + 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x42, + 0x0f, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, + 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, + 0x6e, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0xa2, 0x02, 0x03, 0x48, + 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0xca, + 0x02, 0x0a, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0xe2, 0x02, 0x16, 0x48, + 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_helloworld_proto_rawDescOnce sync.Once + file_proto_helloworld_proto_rawDescData = file_proto_helloworld_proto_rawDesc +) + +func file_proto_helloworld_proto_rawDescGZIP() []byte { + file_proto_helloworld_proto_rawDescOnce.Do(func() { + file_proto_helloworld_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_helloworld_proto_rawDescData) + }) + return file_proto_helloworld_proto_rawDescData +} + +var file_proto_helloworld_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_proto_helloworld_proto_goTypes = []any{ + (*HelloRequest)(nil), // 0: helloworld.HelloRequest + (*HelloResponse)(nil), // 1: helloworld.HelloResponse + (*AddRequest)(nil), // 2: helloworld.AddRequest + (*GetRequest)(nil), // 3: helloworld.GetRequest + (*GetResponse)(nil), // 4: helloworld.GetResponse +} +var file_proto_helloworld_proto_depIdxs = []int32{ + 0, // 0: helloworld.Greeter.SayHello:input_type -> helloworld.HelloRequest + 2, // 1: helloworld.Counter.Add:input_type -> helloworld.AddRequest + 3, // 2: helloworld.Counter.Get:input_type -> helloworld.GetRequest + 1, // 3: helloworld.Greeter.SayHello:output_type -> helloworld.HelloResponse + 4, // 4: helloworld.Counter.Add:output_type -> helloworld.GetResponse + 4, // 5: helloworld.Counter.Get:output_type -> helloworld.GetResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] 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_proto_helloworld_proto_init() } +func file_proto_helloworld_proto_init() { + if File_proto_helloworld_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_helloworld_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*HelloRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_helloworld_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*HelloResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_helloworld_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*AddRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_helloworld_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_helloworld_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetResponse); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_helloworld_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_proto_helloworld_proto_goTypes, + DependencyIndexes: file_proto_helloworld_proto_depIdxs, + MessageInfos: file_proto_helloworld_proto_msgTypes, + }.Build() + File_proto_helloworld_proto = out.File + file_proto_helloworld_proto_rawDesc = nil + file_proto_helloworld_proto_goTypes = nil + file_proto_helloworld_proto_depIdxs = nil +} diff --git a/examples/codegen/proto/helloworld.proto b/examples/codegen/proto/helloworld.proto new file mode 100644 index 0000000..b4bc247 --- /dev/null +++ b/examples/codegen/proto/helloworld.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +option go_package = "github.com/restatedev/sdk-go/examples/codegen/helloworld"; + +import "dev/restate/sdk/go.proto"; + +package helloworld; + +service Greeter { + rpc SayHello (HelloRequest) returns (HelloResponse) {} +} + +service Counter { + option (dev.restate.sdk.go.service_type) = SERVICE_TYPE_VIRTUAL_OBJECT; + rpc Add (AddRequest) returns (GetResponse) {} + rpc Get (GetRequest) returns (GetResponse) { + option (dev.restate.sdk.go.handler_type) = HANDLER_TYPE_SHARED; + } +} + +message HelloRequest { + string name = 1; +} + +message HelloResponse { + string message = 1; +} + +message AddRequest { + int64 delta = 1; +} + +message GetRequest {} + +message GetResponse { + int64 value = 1; +} diff --git a/examples/codegen/proto/helloworld_restate.pb.go b/examples/codegen/proto/helloworld_restate.pb.go new file mode 100644 index 0000000..19869f9 --- /dev/null +++ b/examples/codegen/proto/helloworld_restate.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go-restate. DO NOT EDIT. +// versions: +// - protoc-gen-go-restate v0.1 +// - protoc (unknown) +// source: proto/helloworld.proto + +package helloworld + +import ( + fmt "fmt" + sdk_go "github.com/restatedev/sdk-go" +) + +// GreeterClient is the client API for Greeter service. +type GreeterClient interface { + SayHello(opts ...sdk_go.CallOption) sdk_go.TypedCallClient[*HelloRequest, *HelloResponse] +} + +type greeterClient struct { + ctx sdk_go.Context + options []sdk_go.CallOption +} + +func NewGreeterClient(ctx sdk_go.Context, opts ...sdk_go.CallOption) GreeterClient { + cOpts := append([]sdk_go.CallOption{sdk_go.WithProtoJSON}, opts...) + return &greeterClient{ + ctx, + cOpts, + } +} +func (c *greeterClient) SayHello(opts ...sdk_go.CallOption) sdk_go.TypedCallClient[*HelloRequest, *HelloResponse] { + cOpts := c.options + if len(opts) > 0 { + cOpts = append(append([]sdk_go.CallOption{}, cOpts...), opts...) + } + return sdk_go.NewTypedCallClient[*HelloRequest, *HelloResponse](c.ctx.Service("Greeter", "SayHello", cOpts...)) +} + +// GreeterServer is the server API for Greeter service. +// All implementations should embed UnimplementedGreeterServer +// for forward compatibility. +type GreeterServer interface { + SayHello(ctx sdk_go.Context, req *HelloRequest) (*HelloResponse, error) +} + +// UnimplementedGreeterServer should 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 UnimplementedGreeterServer struct{} + +func (UnimplementedGreeterServer) SayHello(ctx sdk_go.Context, req *HelloRequest) (*HelloResponse, error) { + return nil, sdk_go.TerminalError(fmt.Errorf("method SayHello not implemented"), 501) +} +func (UnimplementedGreeterServer) testEmbeddedByValue() {} + +// UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GreeterServer will +// result in compilation errors. +type UnsafeGreeterServer interface { + mustEmbedUnimplementedGreeterServer() +} + +func NewGreeterServer(srv GreeterServer, opts ...sdk_go.ServiceOption) sdk_go.ServiceDefinition { + // If the following call panics, it indicates UnimplementedGreeterServer 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() + } + sOpts := append([]sdk_go.ServiceOption{sdk_go.WithProtoJSON}, opts...) + router := sdk_go.NewService("Greeter", sOpts...) + router = router.Handler("SayHello", sdk_go.NewServiceHandler(srv.SayHello)) + return router +} + +// CounterClient is the client API for Counter service. +type CounterClient interface { + Add(opts ...sdk_go.CallOption) sdk_go.TypedCallClient[*AddRequest, *GetResponse] + Get(opts ...sdk_go.CallOption) sdk_go.TypedCallClient[*GetRequest, *GetResponse] +} + +type counterClient struct { + ctx sdk_go.Context + key string + options []sdk_go.CallOption +} + +func NewCounterClient(ctx sdk_go.Context, key string, opts ...sdk_go.CallOption) CounterClient { + cOpts := append([]sdk_go.CallOption{sdk_go.WithProtoJSON}, opts...) + return &counterClient{ + ctx, + key, + cOpts, + } +} +func (c *counterClient) Add(opts ...sdk_go.CallOption) sdk_go.TypedCallClient[*AddRequest, *GetResponse] { + cOpts := c.options + if len(opts) > 0 { + cOpts = append(append([]sdk_go.CallOption{}, cOpts...), opts...) + } + return sdk_go.NewTypedCallClient[*AddRequest, *GetResponse](c.ctx.Object("Counter", c.key, "Add", cOpts...)) +} + +func (c *counterClient) Get(opts ...sdk_go.CallOption) sdk_go.TypedCallClient[*GetRequest, *GetResponse] { + cOpts := c.options + if len(opts) > 0 { + cOpts = append(append([]sdk_go.CallOption{}, cOpts...), opts...) + } + return sdk_go.NewTypedCallClient[*GetRequest, *GetResponse](c.ctx.Object("Counter", c.key, "Get", cOpts...)) +} + +// CounterServer is the server API for Counter service. +// All implementations should embed UnimplementedCounterServer +// for forward compatibility. +type CounterServer interface { + Add(ctx sdk_go.ObjectContext, req *AddRequest) (*GetResponse, error) + Get(ctx sdk_go.ObjectSharedContext, req *GetRequest) (*GetResponse, error) +} + +// UnimplementedCounterServer should 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 UnimplementedCounterServer struct{} + +func (UnimplementedCounterServer) Add(ctx sdk_go.ObjectContext, req *AddRequest) (*GetResponse, error) { + return nil, sdk_go.TerminalError(fmt.Errorf("method Add not implemented"), 501) +} +func (UnimplementedCounterServer) Get(ctx sdk_go.ObjectSharedContext, req *GetRequest) (*GetResponse, error) { + return nil, sdk_go.TerminalError(fmt.Errorf("method Get not implemented"), 501) +} +func (UnimplementedCounterServer) testEmbeddedByValue() {} + +// UnsafeCounterServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CounterServer will +// result in compilation errors. +type UnsafeCounterServer interface { + mustEmbedUnimplementedCounterServer() +} + +func NewCounterServer(srv CounterServer, opts ...sdk_go.ObjectOption) sdk_go.ServiceDefinition { + // If the following call panics, it indicates UnimplementedCounterServer 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() + } + sOpts := append([]sdk_go.ObjectOption{sdk_go.WithProtoJSON}, opts...) + router := sdk_go.NewObject("Counter", sOpts...) + router = router.Handler("Add", sdk_go.NewObjectHandler(srv.Add)) + router = router.Handler("Get", sdk_go.NewObjectSharedHandler(srv.Get)) + return router +} diff --git a/example/.gitignore b/examples/ticketreservation/.gitignore similarity index 100% rename from example/.gitignore rename to examples/ticketreservation/.gitignore diff --git a/example/checkout.go b/examples/ticketreservation/checkout.go similarity index 100% rename from example/checkout.go rename to examples/ticketreservation/checkout.go diff --git a/example/main.go b/examples/ticketreservation/main.go similarity index 80% rename from example/main.go rename to examples/ticketreservation/main.go index e4d9b3e..ac6afce 100644 --- a/example/main.go +++ b/examples/ticketreservation/main.go @@ -14,10 +14,7 @@ func main() { // Handlers can be inferred from object methods Bind(restate.Object(&userSession{})). Bind(restate.Object(&ticketService{})). - Bind(restate.Service(&checkout{})). - // Or created and registered explicitly - Bind(health). - Bind(bigCounter) + Bind(restate.Service(&checkout{})) if err := server.Start(context.Background(), ":9080"); err != nil { slog.Error("application exited unexpectedly", "err", err.Error()) diff --git a/example/ticket_service.go b/examples/ticketreservation/ticket_service.go similarity index 100% rename from example/ticket_service.go rename to examples/ticketreservation/ticket_service.go diff --git a/example/user_session.go b/examples/ticketreservation/user_session.go similarity index 100% rename from example/user_session.go rename to examples/ticketreservation/user_session.go diff --git a/facilitators.go b/facilitators.go index b0a6766..c476fe4 100644 --- a/facilitators.go +++ b/facilitators.go @@ -1,6 +1,8 @@ package restate import ( + "time" + "github.com/restatedev/sdk-go/internal/options" ) @@ -46,21 +48,29 @@ func AwakeableAs[T any](ctx Context, options ...options.AwakeableOption) TypedAw return typedAwakeable[T]{ctx.Awakeable(options...)} } -// TypedCallClient is an extension of [CallClient] which returns typed responses instead of accepting a pointer -type TypedCallClient[O any] interface { +// TypedCallClient is an extension of [CallClient] which deals in typed values +type TypedCallClient[I any, O any] interface { // RequestFuture makes a call and returns a handle on a future response - RequestFuture(input any) (TypedResponseFuture[O], error) + RequestFuture(input I) (TypedResponseFuture[O], error) // Request makes a call and blocks on getting the response - Request(input any) (O, error) - SendClient + Request(input I) (O, error) + // Send makes a one-way call which is executed in the background + Send(input I, delay time.Duration) error +} + +type typedCallClient[I any, O any] struct { + inner CallClient } -type typedCallClient[O any] struct { - CallClient +// NewTypedCallClient is primarily intended to be called from generated code, to provide +// type safety of input types. In other contexts it's generally less cumbersome to use [CallAs], +// as the output type can be inferred. +func NewTypedCallClient[I any, O any](client CallClient) TypedCallClient[I, O] { + return typedCallClient[I, O]{client} } -func (t typedCallClient[O]) Request(input any) (output O, err error) { - fut, err := t.CallClient.RequestFuture(input) +func (t typedCallClient[I, O]) Request(input I) (output O, err error) { + fut, err := t.inner.RequestFuture(input) if err != nil { return output, err } @@ -68,14 +78,18 @@ func (t typedCallClient[O]) Request(input any) (output O, err error) { return } -func (t typedCallClient[O]) RequestFuture(input any) (TypedResponseFuture[O], error) { - fut, err := t.CallClient.RequestFuture(input) +func (t typedCallClient[I, O]) RequestFuture(input I) (TypedResponseFuture[O], error) { + fut, err := t.inner.RequestFuture(input) if err != nil { return nil, err } return typedResponseFuture[O]{fut}, nil } +func (t typedCallClient[I, O]) Send(input I, delay time.Duration) error { + return t.inner.Send(input, delay) +} + // TypedResponseFuture is an extension of [ResponseFuture] which returns typed responses instead of accepting a pointer type TypedResponseFuture[O any] interface { // Response blocks on the response to the call and returns it or the associated error @@ -95,6 +109,6 @@ func (t typedResponseFuture[O]) Response() (output O, err error) { } // CallAs helper function to get typed responses from a [CallClient] instead of passing in a pointer -func CallAs[O any](client CallClient) TypedCallClient[O] { - return typedCallClient[O]{client} +func CallAs[O any](client CallClient) TypedCallClient[any, O] { + return typedCallClient[any, O]{client} } diff --git a/generated/dev/restate/sdk/go.pb.go b/generated/dev/restate/sdk/go.pb.go new file mode 100644 index 0000000..22ea0e3 --- /dev/null +++ b/generated/dev/restate/sdk/go.pb.go @@ -0,0 +1,355 @@ +// +// Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH +// +// This file is part of the Restate SDK for Node.js/TypeScript, +// which is released under the MIT license. +// +// You can find a copy of the license in file LICENSE in the root +// directory of this repository or package, or at +// https://github.com/restatedev/sdk-typescript/blob/main/LICENSE + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: dev/restate/sdk/go.proto + +package sdk + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +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 ServiceType int32 + +const ( + ServiceType_SERVICE_TYPE_UNSET ServiceType = 0 + ServiceType_SERVICE_TYPE_SERVICE ServiceType = 1 + ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT ServiceType = 2 + ServiceType_SERVICE_TYPE_WORKFLOW ServiceType = 3 +) + +// Enum value maps for ServiceType. +var ( + ServiceType_name = map[int32]string{ + 0: "SERVICE_TYPE_UNSET", + 1: "SERVICE_TYPE_SERVICE", + 2: "SERVICE_TYPE_VIRTUAL_OBJECT", + 3: "SERVICE_TYPE_WORKFLOW", + } + ServiceType_value = map[string]int32{ + "SERVICE_TYPE_UNSET": 0, + "SERVICE_TYPE_SERVICE": 1, + "SERVICE_TYPE_VIRTUAL_OBJECT": 2, + "SERVICE_TYPE_WORKFLOW": 3, + } +) + +func (x ServiceType) Enum() *ServiceType { + p := new(ServiceType) + *p = x + return p +} + +func (x ServiceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ServiceType) Descriptor() protoreflect.EnumDescriptor { + return file_dev_restate_sdk_go_proto_enumTypes[0].Descriptor() +} + +func (ServiceType) Type() protoreflect.EnumType { + return &file_dev_restate_sdk_go_proto_enumTypes[0] +} + +func (x ServiceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ServiceType.Descriptor instead. +func (ServiceType) EnumDescriptor() ([]byte, []int) { + return file_dev_restate_sdk_go_proto_rawDescGZIP(), []int{0} +} + +type HandlerType int32 + +const ( + HandlerType_HANDLER_TYPE_UNSET HandlerType = 0 + HandlerType_HANDLER_TYPE_EXCLUSIVE HandlerType = 1 + HandlerType_HANDLER_TYPE_SHARED HandlerType = 2 + HandlerType_HANDLER_TYPE_WORKFLOW HandlerType = 3 +) + +// Enum value maps for HandlerType. +var ( + HandlerType_name = map[int32]string{ + 0: "HANDLER_TYPE_UNSET", + 1: "HANDLER_TYPE_EXCLUSIVE", + 2: "HANDLER_TYPE_SHARED", + 3: "HANDLER_TYPE_WORKFLOW", + } + HandlerType_value = map[string]int32{ + "HANDLER_TYPE_UNSET": 0, + "HANDLER_TYPE_EXCLUSIVE": 1, + "HANDLER_TYPE_SHARED": 2, + "HANDLER_TYPE_WORKFLOW": 3, + } +) + +func (x HandlerType) Enum() *HandlerType { + p := new(HandlerType) + *p = x + return p +} + +func (x HandlerType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HandlerType) Descriptor() protoreflect.EnumDescriptor { + return file_dev_restate_sdk_go_proto_enumTypes[1].Descriptor() +} + +func (HandlerType) Type() protoreflect.EnumType { + return &file_dev_restate_sdk_go_proto_enumTypes[1] +} + +func (x HandlerType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HandlerType.Descriptor instead. +func (HandlerType) EnumDescriptor() ([]byte, []int) { + return file_dev_restate_sdk_go_proto_rawDescGZIP(), []int{1} +} + +// Type: 0xFC00 + 3 +type SelectorEntryMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JournalEntries []uint32 `protobuf:"varint,1,rep,packed,name=journal_entries,json=journalEntries,proto3" json:"journal_entries,omitempty"` + WinningEntryIndex uint32 `protobuf:"varint,2,opt,name=winning_entry_index,json=winningEntryIndex,proto3" json:"winning_entry_index,omitempty"` +} + +func (x *SelectorEntryMessage) Reset() { + *x = SelectorEntryMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_dev_restate_sdk_go_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelectorEntryMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelectorEntryMessage) ProtoMessage() {} + +func (x *SelectorEntryMessage) ProtoReflect() protoreflect.Message { + mi := &file_dev_restate_sdk_go_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SelectorEntryMessage.ProtoReflect.Descriptor instead. +func (*SelectorEntryMessage) Descriptor() ([]byte, []int) { + return file_dev_restate_sdk_go_proto_rawDescGZIP(), []int{0} +} + +func (x *SelectorEntryMessage) GetJournalEntries() []uint32 { + if x != nil { + return x.JournalEntries + } + return nil +} + +func (x *SelectorEntryMessage) GetWinningEntryIndex() uint32 { + if x != nil { + return x.WinningEntryIndex + } + return 0 +} + +var file_dev_restate_sdk_go_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*HandlerType)(nil), + Field: 2051, + Name: "dev.restate.sdk.go.handler_type", + Tag: "varint,2051,opt,name=handler_type,enum=dev.restate.sdk.go.HandlerType", + Filename: "dev/restate/sdk/go.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*ServiceType)(nil), + Field: 2051, + Name: "dev.restate.sdk.go.service_type", + Tag: "varint,2051,opt,name=service_type,enum=dev.restate.sdk.go.ServiceType", + Filename: "dev/restate/sdk/go.proto", + }, +} + +// Extension fields to descriptorpb.MethodOptions. +var ( + // optional dev.restate.sdk.go.HandlerType handler_type = 2051; + E_HandlerType = &file_dev_restate_sdk_go_proto_extTypes[0] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // optional dev.restate.sdk.go.ServiceType service_type = 2051; + E_ServiceType = &file_dev_restate_sdk_go_proto_extTypes[1] +) + +var File_dev_restate_sdk_go_proto protoreflect.FileDescriptor + +var file_dev_restate_sdk_go_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x64, + 0x6b, 0x2f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x67, 0x6f, 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, + 0x22, 0x6f, 0x0a, 0x14, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6a, 0x6f, 0x75, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x0e, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x77, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, + 0x77, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x2a, 0x7b, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x52, 0x56, + 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, + 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x56, 0x49, 0x52, 0x54, 0x55, 0x41, 0x4c, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x2a, 0x75, + 0x0a, 0x0b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, + 0x12, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x56, 0x45, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x41, + 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x46, + 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x3a, 0x63, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, + 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, 0x83, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x67, + 0x6f, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x68, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x64, 0x0a, 0x0c, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x83, 0x10, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x67, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x42, 0xc5, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x67, 0x6f, 0x42, 0x07, 0x47, 0x6f, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x64, + 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x64, + 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x64, 0x6b, 0xa2, 0x02, + 0x04, 0x44, 0x52, 0x53, 0x47, 0xaa, 0x02, 0x12, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x2e, 0x53, 0x64, 0x6b, 0x2e, 0x47, 0x6f, 0xca, 0x02, 0x12, 0x44, 0x65, 0x76, + 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x64, 0x6b, 0x5c, 0x47, 0x6f, 0xe2, + 0x02, 0x1e, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x64, + 0x6b, 0x5c, 0x47, 0x6f, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x15, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3a, + 0x3a, 0x53, 0x64, 0x6b, 0x3a, 0x3a, 0x47, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_dev_restate_sdk_go_proto_rawDescOnce sync.Once + file_dev_restate_sdk_go_proto_rawDescData = file_dev_restate_sdk_go_proto_rawDesc +) + +func file_dev_restate_sdk_go_proto_rawDescGZIP() []byte { + file_dev_restate_sdk_go_proto_rawDescOnce.Do(func() { + file_dev_restate_sdk_go_proto_rawDescData = protoimpl.X.CompressGZIP(file_dev_restate_sdk_go_proto_rawDescData) + }) + return file_dev_restate_sdk_go_proto_rawDescData +} + +var file_dev_restate_sdk_go_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_dev_restate_sdk_go_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_dev_restate_sdk_go_proto_goTypes = []any{ + (ServiceType)(0), // 0: dev.restate.sdk.go.ServiceType + (HandlerType)(0), // 1: dev.restate.sdk.go.HandlerType + (*SelectorEntryMessage)(nil), // 2: dev.restate.sdk.go.SelectorEntryMessage + (*descriptorpb.MethodOptions)(nil), // 3: google.protobuf.MethodOptions + (*descriptorpb.ServiceOptions)(nil), // 4: google.protobuf.ServiceOptions +} +var file_dev_restate_sdk_go_proto_depIdxs = []int32{ + 3, // 0: dev.restate.sdk.go.handler_type:extendee -> google.protobuf.MethodOptions + 4, // 1: dev.restate.sdk.go.service_type:extendee -> google.protobuf.ServiceOptions + 1, // 2: dev.restate.sdk.go.handler_type:type_name -> dev.restate.sdk.go.HandlerType + 0, // 3: dev.restate.sdk.go.service_type:type_name -> dev.restate.sdk.go.ServiceType + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 2, // [2:4] 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_dev_restate_sdk_go_proto_init() } +func file_dev_restate_sdk_go_proto_init() { + if File_dev_restate_sdk_go_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_dev_restate_sdk_go_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*SelectorEntryMessage); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dev_restate_sdk_go_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 2, + NumServices: 0, + }, + GoTypes: file_dev_restate_sdk_go_proto_goTypes, + DependencyIndexes: file_dev_restate_sdk_go_proto_depIdxs, + EnumInfos: file_dev_restate_sdk_go_proto_enumTypes, + MessageInfos: file_dev_restate_sdk_go_proto_msgTypes, + ExtensionInfos: file_dev_restate_sdk_go_proto_extTypes, + }.Build() + File_dev_restate_sdk_go_proto = out.File + file_dev_restate_sdk_go_proto_rawDesc = nil + file_dev_restate_sdk_go_proto_goTypes = nil + file_dev_restate_sdk_go_proto_depIdxs = nil +} diff --git a/generated/dev/restate/service/discovery.pb.go b/generated/dev/restate/service/discovery.pb.go new file mode 100644 index 0000000..7fb41cb --- /dev/null +++ b/generated/dev/restate/service/discovery.pb.go @@ -0,0 +1,160 @@ +// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH +// +// This file is part of the Restate service protocol, which is +// released under the MIT license. +// +// You can find a copy of the license in file LICENSE in the root +// directory of this repository or package, or at +// https://github.com/restatedev/service-protocol/blob/main/LICENSE + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: dev/restate/service/discovery.proto + +package service + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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) +) + +// Service discovery protocol version. +type ServiceDiscoveryProtocolVersion int32 + +const ( + ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED ServiceDiscoveryProtocolVersion = 0 + // initial service discovery protocol version using endpoint_manifest_schema.json + ServiceDiscoveryProtocolVersion_V1 ServiceDiscoveryProtocolVersion = 1 +) + +// Enum value maps for ServiceDiscoveryProtocolVersion. +var ( + ServiceDiscoveryProtocolVersion_name = map[int32]string{ + 0: "SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED", + 1: "V1", + } + ServiceDiscoveryProtocolVersion_value = map[string]int32{ + "SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED": 0, + "V1": 1, + } +) + +func (x ServiceDiscoveryProtocolVersion) Enum() *ServiceDiscoveryProtocolVersion { + p := new(ServiceDiscoveryProtocolVersion) + *p = x + return p +} + +func (x ServiceDiscoveryProtocolVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ServiceDiscoveryProtocolVersion) Descriptor() protoreflect.EnumDescriptor { + return file_dev_restate_service_discovery_proto_enumTypes[0].Descriptor() +} + +func (ServiceDiscoveryProtocolVersion) Type() protoreflect.EnumType { + return &file_dev_restate_service_discovery_proto_enumTypes[0] +} + +func (x ServiceDiscoveryProtocolVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ServiceDiscoveryProtocolVersion.Descriptor instead. +func (ServiceDiscoveryProtocolVersion) EnumDescriptor() ([]byte, []int) { + return file_dev_restate_service_discovery_proto_rawDescGZIP(), []int{0} +} + +var File_dev_restate_service_discovery_proto protoreflect.FileDescriptor + +var file_dev_restate_service_discovery_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x2a, 0x5d, 0x0a, 0x1f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x2e, 0x53, 0x45, 0x52, 0x56, 0x49, + 0x43, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x52, 0x4f, + 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, + 0x31, 0x10, 0x01, 0x42, 0x87, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, + 0x65, 0x76, 0x2f, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x04, 0x44, 0x52, 0x53, 0x44, 0xaa, 0x02, + 0x1d, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0xca, 0x02, + 0x1d, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0xe2, 0x02, + 0x29, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x44, 0x65, 0x76, + 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_dev_restate_service_discovery_proto_rawDescOnce sync.Once + file_dev_restate_service_discovery_proto_rawDescData = file_dev_restate_service_discovery_proto_rawDesc +) + +func file_dev_restate_service_discovery_proto_rawDescGZIP() []byte { + file_dev_restate_service_discovery_proto_rawDescOnce.Do(func() { + file_dev_restate_service_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_dev_restate_service_discovery_proto_rawDescData) + }) + return file_dev_restate_service_discovery_proto_rawDescData +} + +var file_dev_restate_service_discovery_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_dev_restate_service_discovery_proto_goTypes = []any{ + (ServiceDiscoveryProtocolVersion)(0), // 0: dev.restate.service.discovery.ServiceDiscoveryProtocolVersion +} +var file_dev_restate_service_discovery_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] 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_dev_restate_service_discovery_proto_init() } +func file_dev_restate_service_discovery_proto_init() { + if File_dev_restate_service_discovery_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dev_restate_service_discovery_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_dev_restate_service_discovery_proto_goTypes, + DependencyIndexes: file_dev_restate_service_discovery_proto_depIdxs, + EnumInfos: file_dev_restate_service_discovery_proto_enumTypes, + }.Build() + File_dev_restate_service_discovery_proto = out.File + file_dev_restate_service_discovery_proto_rawDesc = nil + file_dev_restate_service_discovery_proto_goTypes = nil + file_dev_restate_service_discovery_proto_depIdxs = nil +} diff --git a/generated/proto/protocol/protocol.pb.go b/generated/dev/restate/service/protocol.pb.go similarity index 71% rename from generated/proto/protocol/protocol.pb.go rename to generated/dev/restate/service/protocol.pb.go index ea25628..3e2a452 100644 --- a/generated/proto/protocol/protocol.pb.go +++ b/generated/dev/restate/service/protocol.pb.go @@ -9,11 +9,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.2 // protoc (unknown) -// source: proto/protocol/protocol.proto +// source: dev/restate/service/protocol.proto -package protocol +package service import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -61,11 +61,11 @@ func (x ServiceProtocolVersion) String() string { } func (ServiceProtocolVersion) Descriptor() protoreflect.EnumDescriptor { - return file_proto_protocol_protocol_proto_enumTypes[0].Descriptor() + return file_dev_restate_service_protocol_proto_enumTypes[0].Descriptor() } func (ServiceProtocolVersion) Type() protoreflect.EnumType { - return &file_proto_protocol_protocol_proto_enumTypes[0] + return &file_dev_restate_service_protocol_proto_enumTypes[0] } func (x ServiceProtocolVersion) Number() protoreflect.EnumNumber { @@ -74,7 +74,7 @@ func (x ServiceProtocolVersion) Number() protoreflect.EnumNumber { // Deprecated: Use ServiceProtocolVersion.Descriptor instead. func (ServiceProtocolVersion) EnumDescriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{0} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{0} } // Type: 0x0000 + 0 @@ -99,7 +99,7 @@ type StartMessage struct { func (x *StartMessage) Reset() { *x = StartMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[0] + mi := &file_dev_restate_service_protocol_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -112,7 +112,7 @@ func (x *StartMessage) String() string { func (*StartMessage) ProtoMessage() {} func (x *StartMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[0] + mi := &file_dev_restate_service_protocol_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -125,7 +125,7 @@ func (x *StartMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StartMessage.ProtoReflect.Descriptor instead. func (*StartMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{0} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{0} } func (x *StartMessage) GetId() []byte { @@ -188,7 +188,7 @@ type CompletionMessage struct { func (x *CompletionMessage) Reset() { *x = CompletionMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[1] + mi := &file_dev_restate_service_protocol_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -201,7 +201,7 @@ func (x *CompletionMessage) String() string { func (*CompletionMessage) ProtoMessage() {} func (x *CompletionMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[1] + mi := &file_dev_restate_service_protocol_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -214,7 +214,7 @@ func (x *CompletionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use CompletionMessage.ProtoReflect.Descriptor instead. func (*CompletionMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{1} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{1} } func (x *CompletionMessage) GetEntryIndex() uint32 { @@ -292,7 +292,7 @@ type SuspensionMessage struct { func (x *SuspensionMessage) Reset() { *x = SuspensionMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[2] + mi := &file_dev_restate_service_protocol_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -305,7 +305,7 @@ func (x *SuspensionMessage) String() string { func (*SuspensionMessage) ProtoMessage() {} func (x *SuspensionMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[2] + mi := &file_dev_restate_service_protocol_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -318,7 +318,7 @@ func (x *SuspensionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SuspensionMessage.ProtoReflect.Descriptor instead. func (*SuspensionMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{2} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{2} } func (x *SuspensionMessage) GetEntryIndexes() []uint32 { @@ -355,7 +355,7 @@ type ErrorMessage struct { func (x *ErrorMessage) Reset() { *x = ErrorMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[3] + mi := &file_dev_restate_service_protocol_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -368,7 +368,7 @@ func (x *ErrorMessage) String() string { func (*ErrorMessage) ProtoMessage() {} func (x *ErrorMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[3] + mi := &file_dev_restate_service_protocol_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -381,7 +381,7 @@ func (x *ErrorMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ErrorMessage.ProtoReflect.Descriptor instead. func (*ErrorMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{3} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{3} } func (x *ErrorMessage) GetCode() uint32 { @@ -438,7 +438,7 @@ type EntryAckMessage struct { func (x *EntryAckMessage) Reset() { *x = EntryAckMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[4] + mi := &file_dev_restate_service_protocol_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -451,7 +451,7 @@ func (x *EntryAckMessage) String() string { func (*EntryAckMessage) ProtoMessage() {} func (x *EntryAckMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[4] + mi := &file_dev_restate_service_protocol_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -464,7 +464,7 @@ func (x *EntryAckMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EntryAckMessage.ProtoReflect.Descriptor instead. func (*EntryAckMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{4} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{4} } func (x *EntryAckMessage) GetEntryIndex() uint32 { @@ -485,7 +485,7 @@ type EndMessage struct { func (x *EndMessage) Reset() { *x = EndMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[5] + mi := &file_dev_restate_service_protocol_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -498,7 +498,7 @@ func (x *EndMessage) String() string { func (*EndMessage) ProtoMessage() {} func (x *EndMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[5] + mi := &file_dev_restate_service_protocol_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -511,7 +511,7 @@ func (x *EndMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EndMessage.ProtoReflect.Descriptor instead. func (*EndMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{5} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{5} } // Completable: No @@ -531,7 +531,7 @@ type InputEntryMessage struct { func (x *InputEntryMessage) Reset() { *x = InputEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[6] + mi := &file_dev_restate_service_protocol_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -544,7 +544,7 @@ func (x *InputEntryMessage) String() string { func (*InputEntryMessage) ProtoMessage() {} func (x *InputEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[6] + mi := &file_dev_restate_service_protocol_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -557,7 +557,7 @@ func (x *InputEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use InputEntryMessage.ProtoReflect.Descriptor instead. func (*InputEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{6} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{6} } func (x *InputEntryMessage) GetHeaders() []*Header { @@ -601,7 +601,7 @@ type OutputEntryMessage struct { func (x *OutputEntryMessage) Reset() { *x = OutputEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[7] + mi := &file_dev_restate_service_protocol_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -614,7 +614,7 @@ func (x *OutputEntryMessage) String() string { func (*OutputEntryMessage) ProtoMessage() {} func (x *OutputEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[7] + mi := &file_dev_restate_service_protocol_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -627,7 +627,7 @@ func (x *OutputEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use OutputEntryMessage.ProtoReflect.Descriptor instead. func (*OutputEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{7} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{7} } func (m *OutputEntryMessage) GetResult() isOutputEntryMessage_Result { @@ -696,7 +696,7 @@ type GetStateEntryMessage struct { func (x *GetStateEntryMessage) Reset() { *x = GetStateEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[8] + mi := &file_dev_restate_service_protocol_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -709,7 +709,7 @@ func (x *GetStateEntryMessage) String() string { func (*GetStateEntryMessage) ProtoMessage() {} func (x *GetStateEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[8] + mi := &file_dev_restate_service_protocol_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -722,7 +722,7 @@ func (x *GetStateEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateEntryMessage.ProtoReflect.Descriptor instead. func (*GetStateEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{8} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{8} } func (x *GetStateEntryMessage) GetKey() []byte { @@ -806,7 +806,7 @@ type SetStateEntryMessage struct { func (x *SetStateEntryMessage) Reset() { *x = SetStateEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[9] + mi := &file_dev_restate_service_protocol_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -819,7 +819,7 @@ func (x *SetStateEntryMessage) String() string { func (*SetStateEntryMessage) ProtoMessage() {} func (x *SetStateEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[9] + mi := &file_dev_restate_service_protocol_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -832,7 +832,7 @@ func (x *SetStateEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SetStateEntryMessage.ProtoReflect.Descriptor instead. func (*SetStateEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{9} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{9} } func (x *SetStateEntryMessage) GetKey() []byte { @@ -872,7 +872,7 @@ type ClearStateEntryMessage struct { func (x *ClearStateEntryMessage) Reset() { *x = ClearStateEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[10] + mi := &file_dev_restate_service_protocol_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -885,7 +885,7 @@ func (x *ClearStateEntryMessage) String() string { func (*ClearStateEntryMessage) ProtoMessage() {} func (x *ClearStateEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[10] + mi := &file_dev_restate_service_protocol_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -898,7 +898,7 @@ func (x *ClearStateEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearStateEntryMessage.ProtoReflect.Descriptor instead. func (*ClearStateEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{10} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{10} } func (x *ClearStateEntryMessage) GetKey() []byte { @@ -930,7 +930,7 @@ type ClearAllStateEntryMessage struct { func (x *ClearAllStateEntryMessage) Reset() { *x = ClearAllStateEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[11] + mi := &file_dev_restate_service_protocol_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -943,7 +943,7 @@ func (x *ClearAllStateEntryMessage) String() string { func (*ClearAllStateEntryMessage) ProtoMessage() {} func (x *ClearAllStateEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[11] + mi := &file_dev_restate_service_protocol_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -956,7 +956,7 @@ func (x *ClearAllStateEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearAllStateEntryMessage.ProtoReflect.Descriptor instead. func (*ClearAllStateEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{11} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{11} } func (x *ClearAllStateEntryMessage) GetName() string { @@ -986,7 +986,7 @@ type GetStateKeysEntryMessage struct { func (x *GetStateKeysEntryMessage) Reset() { *x = GetStateKeysEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[12] + mi := &file_dev_restate_service_protocol_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -999,7 +999,7 @@ func (x *GetStateKeysEntryMessage) String() string { func (*GetStateKeysEntryMessage) ProtoMessage() {} func (x *GetStateKeysEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[12] + mi := &file_dev_restate_service_protocol_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1012,7 +1012,7 @@ func (x *GetStateKeysEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateKeysEntryMessage.ProtoReflect.Descriptor instead. func (*GetStateKeysEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{12} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{12} } func (m *GetStateKeysEntryMessage) GetResult() isGetStateKeysEntryMessage_Result { @@ -1080,7 +1080,7 @@ type GetPromiseEntryMessage struct { func (x *GetPromiseEntryMessage) Reset() { *x = GetPromiseEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[13] + mi := &file_dev_restate_service_protocol_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1093,7 +1093,7 @@ func (x *GetPromiseEntryMessage) String() string { func (*GetPromiseEntryMessage) ProtoMessage() {} func (x *GetPromiseEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[13] + mi := &file_dev_restate_service_protocol_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1106,7 +1106,7 @@ func (x *GetPromiseEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPromiseEntryMessage.ProtoReflect.Descriptor instead. func (*GetPromiseEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{13} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{13} } func (x *GetPromiseEntryMessage) GetKey() string { @@ -1182,7 +1182,7 @@ type PeekPromiseEntryMessage struct { func (x *PeekPromiseEntryMessage) Reset() { *x = PeekPromiseEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[14] + mi := &file_dev_restate_service_protocol_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1195,7 +1195,7 @@ func (x *PeekPromiseEntryMessage) String() string { func (*PeekPromiseEntryMessage) ProtoMessage() {} func (x *PeekPromiseEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[14] + mi := &file_dev_restate_service_protocol_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1208,7 +1208,7 @@ func (x *PeekPromiseEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PeekPromiseEntryMessage.ProtoReflect.Descriptor instead. func (*PeekPromiseEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{14} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{14} } func (x *PeekPromiseEntryMessage) GetKey() string { @@ -1303,7 +1303,7 @@ type CompletePromiseEntryMessage struct { func (x *CompletePromiseEntryMessage) Reset() { *x = CompletePromiseEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[15] + mi := &file_dev_restate_service_protocol_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1316,7 +1316,7 @@ func (x *CompletePromiseEntryMessage) String() string { func (*CompletePromiseEntryMessage) ProtoMessage() {} func (x *CompletePromiseEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[15] + mi := &file_dev_restate_service_protocol_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1329,7 +1329,7 @@ func (x *CompletePromiseEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use CompletePromiseEntryMessage.ProtoReflect.Descriptor instead. func (*CompletePromiseEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{15} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{15} } func (x *CompletePromiseEntryMessage) GetKey() string { @@ -1445,7 +1445,7 @@ type SleepEntryMessage struct { func (x *SleepEntryMessage) Reset() { *x = SleepEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[16] + mi := &file_dev_restate_service_protocol_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1458,7 +1458,7 @@ func (x *SleepEntryMessage) String() string { func (*SleepEntryMessage) ProtoMessage() {} func (x *SleepEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[16] + mi := &file_dev_restate_service_protocol_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1471,7 +1471,7 @@ func (x *SleepEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SleepEntryMessage.ProtoReflect.Descriptor instead. func (*SleepEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{16} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{16} } func (x *SleepEntryMessage) GetWakeUpTime() uint64 { @@ -1551,7 +1551,7 @@ type CallEntryMessage struct { func (x *CallEntryMessage) Reset() { *x = CallEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[17] + mi := &file_dev_restate_service_protocol_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1564,7 +1564,7 @@ func (x *CallEntryMessage) String() string { func (*CallEntryMessage) ProtoMessage() {} func (x *CallEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[17] + mi := &file_dev_restate_service_protocol_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1577,7 +1577,7 @@ func (x *CallEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use CallEntryMessage.ProtoReflect.Descriptor instead. func (*CallEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{17} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{17} } func (x *CallEntryMessage) GetServiceName() string { @@ -1685,7 +1685,7 @@ type OneWayCallEntryMessage struct { func (x *OneWayCallEntryMessage) Reset() { *x = OneWayCallEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[18] + mi := &file_dev_restate_service_protocol_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1698,7 +1698,7 @@ func (x *OneWayCallEntryMessage) String() string { func (*OneWayCallEntryMessage) ProtoMessage() {} func (x *OneWayCallEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[18] + mi := &file_dev_restate_service_protocol_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1711,7 +1711,7 @@ func (x *OneWayCallEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use OneWayCallEntryMessage.ProtoReflect.Descriptor instead. func (*OneWayCallEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{18} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{18} } func (x *OneWayCallEntryMessage) GetServiceName() string { @@ -1784,7 +1784,7 @@ type AwakeableEntryMessage struct { func (x *AwakeableEntryMessage) Reset() { *x = AwakeableEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[19] + mi := &file_dev_restate_service_protocol_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1797,7 +1797,7 @@ func (x *AwakeableEntryMessage) String() string { func (*AwakeableEntryMessage) ProtoMessage() {} func (x *AwakeableEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[19] + mi := &file_dev_restate_service_protocol_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1810,7 +1810,7 @@ func (x *AwakeableEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AwakeableEntryMessage.ProtoReflect.Descriptor instead. func (*AwakeableEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{19} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{19} } func (m *AwakeableEntryMessage) GetResult() isAwakeableEntryMessage_Result { @@ -1879,7 +1879,7 @@ type CompleteAwakeableEntryMessage struct { func (x *CompleteAwakeableEntryMessage) Reset() { *x = CompleteAwakeableEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[20] + mi := &file_dev_restate_service_protocol_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1892,7 +1892,7 @@ func (x *CompleteAwakeableEntryMessage) String() string { func (*CompleteAwakeableEntryMessage) ProtoMessage() {} func (x *CompleteAwakeableEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[20] + mi := &file_dev_restate_service_protocol_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1905,7 +1905,7 @@ func (x *CompleteAwakeableEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use CompleteAwakeableEntryMessage.ProtoReflect.Descriptor instead. func (*CompleteAwakeableEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{20} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{20} } func (x *CompleteAwakeableEntryMessage) GetId() string { @@ -1980,7 +1980,7 @@ type RunEntryMessage struct { func (x *RunEntryMessage) Reset() { *x = RunEntryMessage{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[21] + mi := &file_dev_restate_service_protocol_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1993,7 +1993,7 @@ func (x *RunEntryMessage) String() string { func (*RunEntryMessage) ProtoMessage() {} func (x *RunEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[21] + mi := &file_dev_restate_service_protocol_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2006,7 +2006,7 @@ func (x *RunEntryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use RunEntryMessage.ProtoReflect.Descriptor instead. func (*RunEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{21} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{21} } func (m *RunEntryMessage) GetResult() isRunEntryMessage_Result { @@ -2069,7 +2069,7 @@ type Failure struct { func (x *Failure) Reset() { *x = Failure{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[22] + mi := &file_dev_restate_service_protocol_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2082,7 +2082,7 @@ func (x *Failure) String() string { func (*Failure) ProtoMessage() {} func (x *Failure) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[22] + mi := &file_dev_restate_service_protocol_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2095,7 +2095,7 @@ func (x *Failure) ProtoReflect() protoreflect.Message { // Deprecated: Use Failure.ProtoReflect.Descriptor instead. func (*Failure) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{22} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{22} } func (x *Failure) GetCode() uint32 { @@ -2124,7 +2124,7 @@ type Header struct { func (x *Header) Reset() { *x = Header{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[23] + mi := &file_dev_restate_service_protocol_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2137,7 +2137,7 @@ func (x *Header) String() string { func (*Header) ProtoMessage() {} func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[23] + mi := &file_dev_restate_service_protocol_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2150,7 +2150,7 @@ func (x *Header) ProtoReflect() protoreflect.Message { // Deprecated: Use Header.ProtoReflect.Descriptor instead. func (*Header) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{23} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{23} } func (x *Header) GetKey() string { @@ -2176,7 +2176,7 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[24] + mi := &file_dev_restate_service_protocol_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2189,7 +2189,7 @@ func (x *Empty) String() string { func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[24] + mi := &file_dev_restate_service_protocol_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2202,7 +2202,7 @@ func (x *Empty) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{24} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{24} } type StartMessage_StateEntry struct { @@ -2219,7 +2219,7 @@ type StartMessage_StateEntry struct { func (x *StartMessage_StateEntry) Reset() { *x = StartMessage_StateEntry{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[25] + mi := &file_dev_restate_service_protocol_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2232,7 +2232,7 @@ func (x *StartMessage_StateEntry) String() string { func (*StartMessage_StateEntry) ProtoMessage() {} func (x *StartMessage_StateEntry) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[25] + mi := &file_dev_restate_service_protocol_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2245,7 +2245,7 @@ func (x *StartMessage_StateEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use StartMessage_StateEntry.ProtoReflect.Descriptor instead. func (*StartMessage_StateEntry) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{0, 0} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{0, 0} } func (x *StartMessage_StateEntry) GetKey() []byte { @@ -2273,7 +2273,7 @@ type GetStateKeysEntryMessage_StateKeys struct { func (x *GetStateKeysEntryMessage_StateKeys) Reset() { *x = GetStateKeysEntryMessage_StateKeys{} if protoimpl.UnsafeEnabled { - mi := &file_proto_protocol_protocol_proto_msgTypes[26] + mi := &file_dev_restate_service_protocol_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2286,7 +2286,7 @@ func (x *GetStateKeysEntryMessage_StateKeys) String() string { func (*GetStateKeysEntryMessage_StateKeys) ProtoMessage() {} func (x *GetStateKeysEntryMessage_StateKeys) ProtoReflect() protoreflect.Message { - mi := &file_proto_protocol_protocol_proto_msgTypes[26] + mi := &file_dev_restate_service_protocol_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2299,7 +2299,7 @@ func (x *GetStateKeysEntryMessage_StateKeys) ProtoReflect() protoreflect.Message // Deprecated: Use GetStateKeysEntryMessage_StateKeys.ProtoReflect.Descriptor instead. func (*GetStateKeysEntryMessage_StateKeys) Descriptor() ([]byte, []int) { - return file_proto_protocol_protocol_proto_rawDescGZIP(), []int{12, 0} + return file_dev_restate_service_protocol_proto_rawDescGZIP(), []int{12, 0} } func (x *GetStateKeysEntryMessage_StateKeys) GetKeys() [][]byte { @@ -2309,241 +2309,135 @@ func (x *GetStateKeysEntryMessage_StateKeys) GetKeys() [][]byte { return nil } -var File_proto_protocol_protocol_proto protoreflect.FileDescriptor - -var file_proto_protocol_protocol_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1c, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x9f, 0x02, - 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x52, - 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x4d, - 0x61, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, - 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x34, 0x0a, 0x0a, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0xd6, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x11, 0x53, 0x75, 0x73, 0x70, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x10, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x16, - 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x15, 0x0a, - 0x13, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x32, 0x0a, 0x0f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x63, 0x6b, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x0c, 0x0a, 0x0a, 0x45, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7d, 0x0a, 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, +var File_dev_restate_service_protocol_proto protoreflect.FileDescriptor + +var file_dev_restate_service_protocol_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x22, 0x9f, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x64, 0x12, 0x23, + 0x0a, 0x0d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x70, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, - 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x52, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x34, + 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3b, 0x0a, 0x05, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, + 0x11, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0c, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, + 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x31, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x10, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x15, 0x0a, 0x13, 0x5f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x32, 0x0a, 0x0f, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x0c, 0x0a, + 0x0a, 0x45, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7d, 0x0a, 0x11, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x16, 0x43, 0x6c, - 0x65, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x19, 0x43, 0x6c, - 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x1f, 0x0a, 0x09, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6d, - 0x69, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x17, 0x50, - 0x65, 0x65, 0x6b, 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, - 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe0, - 0x02, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x69, - 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2b, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x56, 0x0a, - 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0d, + 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x01, 0x52, 0x07, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0xd3, 0x01, 0x0a, 0x11, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x77, 0x61, 0x6b, 0x65, 0x5f, - 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x77, - 0x61, 0x6b, 0x65, 0x55, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, - 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xc1, 0x02, 0x0a, 0x10, 0x43, 0x61, 0x6c, 0x6c, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x83, 0x02, 0x0a, 0x16, - 0x4f, 0x6e, 0x65, 0x57, 0x61, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, - 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x52, 0x0a, 0x14, 0x53, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x3e, 0x0a, 0x16, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x2f, 0x0a, 0x19, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xf6, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x65, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, + 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x1f, + 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, + 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, @@ -2551,61 +2445,167 @@ var file_proto_protocol_protocol_proto_rawDesc = []byte{ 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x8a, 0x01, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, + 0xe1, 0x01, 0x0a, 0x17, 0x50, 0x65, 0x65, 0x6b, 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, + 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0xe0, 0x02, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, + 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x01, + 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, + 0x01, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, + 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd3, 0x01, 0x0a, 0x11, 0x53, 0x6c, 0x65, 0x65, 0x70, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0c, + 0x77, 0x61, 0x6b, 0x65, 0x5f, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x77, 0x61, 0x6b, 0x65, 0x55, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, + 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x37, 0x0a, 0x07, - 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x2a, 0x4a, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x45, - 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x56, - 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, 0x01, 0x42, 0xfc, 0x01, 0x0a, - 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xa2, 0x02, 0x04, 0x44, 0x52, 0x53, 0x50, - 0xaa, 0x02, 0x1c, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xca, - 0x02, 0x1c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xe2, 0x02, - 0x28, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x44, 0x65, 0x76, 0x3a, - 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xc1, 0x02, 0x0a, + 0x10, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x83, 0x02, 0x0a, 0x16, 0x4f, 0x6e, 0x65, 0x57, 0x61, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x41, 0x77, 0x61, 0x6b, 0x65, + 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, + 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x1d, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0x8a, 0x01, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x37, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x07, 0x0a, 0x05, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x2a, 0x4a, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x28, 0x0a, 0x24, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x43, 0x4f, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, + 0x01, 0x42, 0x81, 0x02, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x76, 0x2f, 0x73, + 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, + 0x64, 0x65, 0x76, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0xa2, 0x02, 0x04, 0x44, 0x52, 0x53, 0x50, 0xaa, 0x02, 0x1c, 0x44, 0x65, 0x76, + 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xca, 0x02, 0x1c, 0x44, 0x65, 0x76, 0x5c, + 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xe2, 0x02, 0x28, 0x44, 0x65, 0x76, 0x5c, 0x52, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_proto_protocol_protocol_proto_rawDescOnce sync.Once - file_proto_protocol_protocol_proto_rawDescData = file_proto_protocol_protocol_proto_rawDesc + file_dev_restate_service_protocol_proto_rawDescOnce sync.Once + file_dev_restate_service_protocol_proto_rawDescData = file_dev_restate_service_protocol_proto_rawDesc ) -func file_proto_protocol_protocol_proto_rawDescGZIP() []byte { - file_proto_protocol_protocol_proto_rawDescOnce.Do(func() { - file_proto_protocol_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_protocol_protocol_proto_rawDescData) +func file_dev_restate_service_protocol_proto_rawDescGZIP() []byte { + file_dev_restate_service_protocol_proto_rawDescOnce.Do(func() { + file_dev_restate_service_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_dev_restate_service_protocol_proto_rawDescData) }) - return file_proto_protocol_protocol_proto_rawDescData + return file_dev_restate_service_protocol_proto_rawDescData } -var file_proto_protocol_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_protocol_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 27) -var file_proto_protocol_protocol_proto_goTypes = []interface{}{ +var file_dev_restate_service_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_dev_restate_service_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_dev_restate_service_protocol_proto_goTypes = []any{ (ServiceProtocolVersion)(0), // 0: dev.restate.service.protocol.ServiceProtocolVersion (*StartMessage)(nil), // 1: dev.restate.service.protocol.StartMessage (*CompletionMessage)(nil), // 2: dev.restate.service.protocol.CompletionMessage @@ -2635,7 +2635,7 @@ var file_proto_protocol_protocol_proto_goTypes = []interface{}{ (*StartMessage_StateEntry)(nil), // 26: dev.restate.service.protocol.StartMessage.StateEntry (*GetStateKeysEntryMessage_StateKeys)(nil), // 27: dev.restate.service.protocol.GetStateKeysEntryMessage.StateKeys } -var file_proto_protocol_protocol_proto_depIdxs = []int32{ +var file_dev_restate_service_protocol_proto_depIdxs = []int32{ 26, // 0: dev.restate.service.protocol.StartMessage.state_map:type_name -> dev.restate.service.protocol.StartMessage.StateEntry 25, // 1: dev.restate.service.protocol.CompletionMessage.empty:type_name -> dev.restate.service.protocol.Empty 23, // 2: dev.restate.service.protocol.CompletionMessage.failure:type_name -> dev.restate.service.protocol.Failure @@ -2666,13 +2666,13 @@ var file_proto_protocol_protocol_proto_depIdxs = []int32{ 0, // [0:23] is the sub-list for field type_name } -func init() { file_proto_protocol_protocol_proto_init() } -func file_proto_protocol_protocol_proto_init() { - if File_proto_protocol_protocol_proto != nil { +func init() { file_dev_restate_service_protocol_proto_init() } +func file_dev_restate_service_protocol_proto_init() { + if File_dev_restate_service_protocol_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_proto_protocol_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*StartMessage); i { case 0: return &v.state @@ -2684,7 +2684,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CompletionMessage); i { case 0: return &v.state @@ -2696,7 +2696,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SuspensionMessage); i { case 0: return &v.state @@ -2708,7 +2708,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ErrorMessage); i { case 0: return &v.state @@ -2720,7 +2720,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*EntryAckMessage); i { case 0: return &v.state @@ -2732,7 +2732,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*EndMessage); i { case 0: return &v.state @@ -2744,7 +2744,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*InputEntryMessage); i { case 0: return &v.state @@ -2756,7 +2756,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*OutputEntryMessage); i { case 0: return &v.state @@ -2768,7 +2768,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*GetStateEntryMessage); i { case 0: return &v.state @@ -2780,7 +2780,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*SetStateEntryMessage); i { case 0: return &v.state @@ -2792,7 +2792,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*ClearStateEntryMessage); i { case 0: return &v.state @@ -2804,7 +2804,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ClearAllStateEntryMessage); i { case 0: return &v.state @@ -2816,7 +2816,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*GetStateKeysEntryMessage); i { case 0: return &v.state @@ -2828,7 +2828,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*GetPromiseEntryMessage); i { case 0: return &v.state @@ -2840,7 +2840,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*PeekPromiseEntryMessage); i { case 0: return &v.state @@ -2852,7 +2852,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*CompletePromiseEntryMessage); i { case 0: return &v.state @@ -2864,7 +2864,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*SleepEntryMessage); i { case 0: return &v.state @@ -2876,7 +2876,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*CallEntryMessage); i { case 0: return &v.state @@ -2888,7 +2888,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*OneWayCallEntryMessage); i { case 0: return &v.state @@ -2900,7 +2900,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*AwakeableEntryMessage); i { case 0: return &v.state @@ -2912,7 +2912,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*CompleteAwakeableEntryMessage); i { case 0: return &v.state @@ -2924,7 +2924,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*RunEntryMessage); i { case 0: return &v.state @@ -2936,7 +2936,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*Failure); i { case 0: return &v.state @@ -2948,7 +2948,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*Header); i { case 0: return &v.state @@ -2960,7 +2960,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*Empty); i { case 0: return &v.state @@ -2972,7 +2972,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*StartMessage_StateEntry); i { case 0: return &v.state @@ -2984,7 +2984,7 @@ func file_proto_protocol_protocol_proto_init() { return nil } } - file_proto_protocol_protocol_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_dev_restate_service_protocol_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*GetStateKeysEntryMessage_StateKeys); i { case 0: return &v.state @@ -2997,57 +2997,57 @@ func file_proto_protocol_protocol_proto_init() { } } } - file_proto_protocol_protocol_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[1].OneofWrappers = []any{ (*CompletionMessage_Empty)(nil), (*CompletionMessage_Value)(nil), (*CompletionMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_proto_protocol_protocol_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[3].OneofWrappers = []any{} + file_dev_restate_service_protocol_proto_msgTypes[7].OneofWrappers = []any{ (*OutputEntryMessage_Value)(nil), (*OutputEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[8].OneofWrappers = []any{ (*GetStateEntryMessage_Empty)(nil), (*GetStateEntryMessage_Value)(nil), (*GetStateEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[12].OneofWrappers = []any{ (*GetStateKeysEntryMessage_Value)(nil), (*GetStateKeysEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[13].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[13].OneofWrappers = []any{ (*GetPromiseEntryMessage_Value)(nil), (*GetPromiseEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[14].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[14].OneofWrappers = []any{ (*PeekPromiseEntryMessage_Empty)(nil), (*PeekPromiseEntryMessage_Value)(nil), (*PeekPromiseEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[15].OneofWrappers = []any{ (*CompletePromiseEntryMessage_CompletionValue)(nil), (*CompletePromiseEntryMessage_CompletionFailure)(nil), (*CompletePromiseEntryMessage_Empty)(nil), (*CompletePromiseEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[16].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[16].OneofWrappers = []any{ (*SleepEntryMessage_Empty)(nil), (*SleepEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[17].OneofWrappers = []any{ (*CallEntryMessage_Value)(nil), (*CallEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[19].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[19].OneofWrappers = []any{ (*AwakeableEntryMessage_Value)(nil), (*AwakeableEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[20].OneofWrappers = []any{ (*CompleteAwakeableEntryMessage_Value)(nil), (*CompleteAwakeableEntryMessage_Failure)(nil), } - file_proto_protocol_protocol_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_dev_restate_service_protocol_proto_msgTypes[21].OneofWrappers = []any{ (*RunEntryMessage_Value)(nil), (*RunEntryMessage_Failure)(nil), } @@ -3055,19 +3055,19 @@ func file_proto_protocol_protocol_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_protocol_protocol_proto_rawDesc, + RawDescriptor: file_dev_restate_service_protocol_proto_rawDesc, NumEnums: 1, NumMessages: 27, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_proto_protocol_protocol_proto_goTypes, - DependencyIndexes: file_proto_protocol_protocol_proto_depIdxs, - EnumInfos: file_proto_protocol_protocol_proto_enumTypes, - MessageInfos: file_proto_protocol_protocol_proto_msgTypes, + GoTypes: file_dev_restate_service_protocol_proto_goTypes, + DependencyIndexes: file_dev_restate_service_protocol_proto_depIdxs, + EnumInfos: file_dev_restate_service_protocol_proto_enumTypes, + MessageInfos: file_dev_restate_service_protocol_proto_msgTypes, }.Build() - File_proto_protocol_protocol_proto = out.File - file_proto_protocol_protocol_proto_rawDesc = nil - file_proto_protocol_protocol_proto_goTypes = nil - file_proto_protocol_protocol_proto_depIdxs = nil + File_dev_restate_service_protocol_proto = out.File + file_dev_restate_service_protocol_proto_rawDesc = nil + file_dev_restate_service_protocol_proto_goTypes = nil + file_dev_restate_service_protocol_proto_depIdxs = nil } diff --git a/generated/dev/restate/stub.go b/generated/dev/restate/stub.go deleted file mode 100644 index 9f5fb8b..0000000 --- a/generated/dev/restate/stub.go +++ /dev/null @@ -1,2 +0,0 @@ -// Stub package to fix imports of generate code -package _stub diff --git a/generated/proto/discovery/discovery.pb.go b/generated/proto/discovery/discovery.pb.go deleted file mode 100644 index ffcf939..0000000 --- a/generated/proto/discovery/discovery.pb.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH -// -// This file is part of the Restate service protocol, which is -// released under the MIT license. -// -// You can find a copy of the license in file LICENSE in the root -// directory of this repository or package, or at -// https://github.com/restatedev/service-protocol/blob/main/LICENSE - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: proto/discovery/discovery.proto - -package discovery - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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) -) - -// Service discovery protocol version. -type ServiceDiscoveryProtocolVersion int32 - -const ( - ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED ServiceDiscoveryProtocolVersion = 0 - // initial service discovery protocol version using endpoint_manifest_schema.json - ServiceDiscoveryProtocolVersion_V1 ServiceDiscoveryProtocolVersion = 1 -) - -// Enum value maps for ServiceDiscoveryProtocolVersion. -var ( - ServiceDiscoveryProtocolVersion_name = map[int32]string{ - 0: "SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED", - 1: "V1", - } - ServiceDiscoveryProtocolVersion_value = map[string]int32{ - "SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED": 0, - "V1": 1, - } -) - -func (x ServiceDiscoveryProtocolVersion) Enum() *ServiceDiscoveryProtocolVersion { - p := new(ServiceDiscoveryProtocolVersion) - *p = x - return p -} - -func (x ServiceDiscoveryProtocolVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ServiceDiscoveryProtocolVersion) Descriptor() protoreflect.EnumDescriptor { - return file_proto_discovery_discovery_proto_enumTypes[0].Descriptor() -} - -func (ServiceDiscoveryProtocolVersion) Type() protoreflect.EnumType { - return &file_proto_discovery_discovery_proto_enumTypes[0] -} - -func (x ServiceDiscoveryProtocolVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ServiceDiscoveryProtocolVersion.Descriptor instead. -func (ServiceDiscoveryProtocolVersion) EnumDescriptor() ([]byte, []int) { - return file_proto_discovery_discovery_proto_rawDescGZIP(), []int{0} -} - -var File_proto_discovery_discovery_proto protoreflect.FileDescriptor - -var file_proto_discovery_discovery_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1d, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2a, 0x5d, 0x0a, 0x1f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x2e, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x44, - 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, - 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, 0x01, 0x42, - 0x83, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x76, 0x2f, 0x73, - 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0xa2, - 0x02, 0x04, 0x44, 0x52, 0x53, 0x44, 0xaa, 0x02, 0x1d, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0xca, 0x02, 0x1d, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0xe2, 0x02, 0x29, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x20, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_discovery_discovery_proto_rawDescOnce sync.Once - file_proto_discovery_discovery_proto_rawDescData = file_proto_discovery_discovery_proto_rawDesc -) - -func file_proto_discovery_discovery_proto_rawDescGZIP() []byte { - file_proto_discovery_discovery_proto_rawDescOnce.Do(func() { - file_proto_discovery_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_discovery_discovery_proto_rawDescData) - }) - return file_proto_discovery_discovery_proto_rawDescData -} - -var file_proto_discovery_discovery_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_discovery_discovery_proto_goTypes = []interface{}{ - (ServiceDiscoveryProtocolVersion)(0), // 0: dev.restate.service.discovery.ServiceDiscoveryProtocolVersion -} -var file_proto_discovery_discovery_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] 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_proto_discovery_discovery_proto_init() } -func file_proto_discovery_discovery_proto_init() { - if File_proto_discovery_discovery_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_discovery_discovery_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_proto_discovery_discovery_proto_goTypes, - DependencyIndexes: file_proto_discovery_discovery_proto_depIdxs, - EnumInfos: file_proto_discovery_discovery_proto_enumTypes, - }.Build() - File_proto_discovery_discovery_proto = out.File - file_proto_discovery_discovery_proto_rawDesc = nil - file_proto_discovery_discovery_proto_goTypes = nil - file_proto_discovery_discovery_proto_depIdxs = nil -} diff --git a/generated/proto/go/go.pb.go b/generated/proto/go/go.pb.go deleted file mode 100644 index 1e21a8b..0000000 --- a/generated/proto/go/go.pb.go +++ /dev/null @@ -1,180 +0,0 @@ -// -// Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH -// -// This file is part of the Restate SDK for Node.js/TypeScript, -// which is released under the MIT license. -// -// You can find a copy of the license in file LICENSE in the root -// directory of this repository or package, or at -// https://github.com/restatedev/sdk-typescript/blob/main/LICENSE - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: proto/go/go.proto - -package _go - -import ( - _ "github.com/restatedev/sdk-go/generated/proto/protocol" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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: 0xFC00 + 3 -type SelectorEntryMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JournalEntries []uint32 `protobuf:"varint,1,rep,packed,name=journal_entries,json=journalEntries,proto3" json:"journal_entries,omitempty"` - WinningEntryIndex uint32 `protobuf:"varint,2,opt,name=winning_entry_index,json=winningEntryIndex,proto3" json:"winning_entry_index,omitempty"` -} - -func (x *SelectorEntryMessage) Reset() { - *x = SelectorEntryMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_go_go_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SelectorEntryMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SelectorEntryMessage) ProtoMessage() {} - -func (x *SelectorEntryMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_go_go_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SelectorEntryMessage.ProtoReflect.Descriptor instead. -func (*SelectorEntryMessage) Descriptor() ([]byte, []int) { - return file_proto_go_go_proto_rawDescGZIP(), []int{0} -} - -func (x *SelectorEntryMessage) GetJournalEntries() []uint32 { - if x != nil { - return x.JournalEntries - } - return nil -} - -func (x *SelectorEntryMessage) GetWinningEntryIndex() uint32 { - if x != nil { - return x.WinningEntryIndex - } - return 0 -} - -var File_proto_go_go_proto protoreflect.FileDescriptor - -var file_proto_go_go_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x67, 0x6f, 0x1a, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x14, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, - 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x77, 0x69, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x77, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0xbe, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x64, 0x6b, 0x2e, - 0x67, 0x6f, 0x42, 0x07, 0x47, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0xa2, 0x02, - 0x04, 0x44, 0x52, 0x53, 0x47, 0xaa, 0x02, 0x12, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x53, 0x64, 0x6b, 0x2e, 0x47, 0x6f, 0xca, 0x02, 0x12, 0x44, 0x65, 0x76, - 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x64, 0x6b, 0x5c, 0x47, 0x6f, 0xe2, - 0x02, 0x1e, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x53, 0x64, - 0x6b, 0x5c, 0x47, 0x6f, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x15, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3a, - 0x3a, 0x53, 0x64, 0x6b, 0x3a, 0x3a, 0x47, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_go_go_proto_rawDescOnce sync.Once - file_proto_go_go_proto_rawDescData = file_proto_go_go_proto_rawDesc -) - -func file_proto_go_go_proto_rawDescGZIP() []byte { - file_proto_go_go_proto_rawDescOnce.Do(func() { - file_proto_go_go_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_go_go_proto_rawDescData) - }) - return file_proto_go_go_proto_rawDescData -} - -var file_proto_go_go_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proto_go_go_proto_goTypes = []interface{}{ - (*SelectorEntryMessage)(nil), // 0: dev.restate.sdk.go.SelectorEntryMessage -} -var file_proto_go_go_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] 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_proto_go_go_proto_init() } -func file_proto_go_go_proto_init() { - if File_proto_go_go_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_go_go_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SelectorEntryMessage); 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{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_go_go_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_proto_go_go_proto_goTypes, - DependencyIndexes: file_proto_go_go_proto_depIdxs, - MessageInfos: file_proto_go_go_proto_msgTypes, - }.Build() - File_proto_go_go_proto = out.File - file_proto_go_go_proto_rawDesc = nil - file_proto_go_go_proto_goTypes = nil - file_proto_go_go_proto_depIdxs = nil -} diff --git a/internal/errors/error.go b/internal/errors/error.go index f0ef08f..5f62648 100644 --- a/internal/errors/error.go +++ b/internal/errors/error.go @@ -3,7 +3,7 @@ package errors import ( "fmt" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" ) type Code uint16 diff --git a/internal/futures/futures.go b/internal/futures/futures.go index e8d77dc..d40eb71 100644 --- a/internal/futures/futures.go +++ b/internal/futures/futures.go @@ -6,7 +6,7 @@ import ( "encoding/binary" "fmt" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "github.com/restatedev/sdk-go/internal/errors" "github.com/restatedev/sdk-go/internal/wire" ) diff --git a/internal/state/awakeable.go b/internal/state/awakeable.go index 7eb3a9f..dfc4e96 100644 --- a/internal/state/awakeable.go +++ b/internal/state/awakeable.go @@ -4,7 +4,7 @@ import ( "bytes" restate "github.com/restatedev/sdk-go" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "github.com/restatedev/sdk-go/internal/futures" "github.com/restatedev/sdk-go/internal/wire" ) diff --git a/internal/state/call.go b/internal/state/call.go index 7a2564e..077c90b 100644 --- a/internal/state/call.go +++ b/internal/state/call.go @@ -7,7 +7,7 @@ import ( restate "github.com/restatedev/sdk-go" "github.com/restatedev/sdk-go/encoding" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "github.com/restatedev/sdk-go/internal/errors" "github.com/restatedev/sdk-go/internal/futures" "github.com/restatedev/sdk-go/internal/options" diff --git a/internal/state/select.go b/internal/state/select.go index 945ac81..c22ee68 100644 --- a/internal/state/select.go +++ b/internal/state/select.go @@ -4,7 +4,7 @@ import ( "slices" restate "github.com/restatedev/sdk-go" - _go "github.com/restatedev/sdk-go/generated/proto/go" + "github.com/restatedev/sdk-go/generated/dev/restate/sdk" "github.com/restatedev/sdk-go/internal/futures" "github.com/restatedev/sdk-go/internal/wire" ) @@ -26,7 +26,7 @@ func (s *selector) Select() restate.Selectable { indexes := s.inner.Indexes() if !slices.Equal(entry.JournalEntries, indexes) { panic(s.machine.newEntryMismatch(&wire.SelectorEntryMessage{ - SelectorEntryMessage: _go.SelectorEntryMessage{ + SelectorEntryMessage: sdk.SelectorEntryMessage{ JournalEntries: indexes, }, }, entry)) @@ -61,7 +61,7 @@ func (s *selector) _select() *wire.SelectorEntryMessage { } entry := &wire.SelectorEntryMessage{ - SelectorEntryMessage: _go.SelectorEntryMessage{ + SelectorEntryMessage: sdk.SelectorEntryMessage{ JournalEntries: indexes, WinningEntryIndex: winningEntryIndex, }, diff --git a/internal/state/state.go b/internal/state/state.go index da84468..f6a58a2 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -14,7 +14,7 @@ import ( restate "github.com/restatedev/sdk-go" "github.com/restatedev/sdk-go/encoding" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "github.com/restatedev/sdk-go/internal/errors" "github.com/restatedev/sdk-go/internal/futures" "github.com/restatedev/sdk-go/internal/log" diff --git a/internal/state/sys.go b/internal/state/sys.go index e37cd21..f50c818 100644 --- a/internal/state/sys.go +++ b/internal/state/sys.go @@ -9,7 +9,7 @@ import ( "time" restate "github.com/restatedev/sdk-go" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "github.com/restatedev/sdk-go/internal/errors" "github.com/restatedev/sdk-go/internal/futures" "github.com/restatedev/sdk-go/internal/wire" diff --git a/internal/wire/wire.go b/internal/wire/wire.go index e1d4bae..ae2d48a 100644 --- a/internal/wire/wire.go +++ b/internal/wire/wire.go @@ -11,8 +11,8 @@ import ( "sync" "sync/atomic" - _go "github.com/restatedev/sdk-go/generated/proto/go" - protocol "github.com/restatedev/sdk-go/generated/proto/protocol" + "github.com/restatedev/sdk-go/generated/dev/restate/sdk" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "google.golang.org/protobuf/proto" ) @@ -567,7 +567,7 @@ var _ AckableMessage = (*RunEntryMessage)(nil) type SelectorEntryMessage struct { ackable - _go.SelectorEntryMessage + sdk.SelectorEntryMessage } var _ AckableMessage = (*SelectorEntryMessage)(nil) diff --git a/options.go b/options.go index 0ba9e17..6321f86 100644 --- a/options.go +++ b/options.go @@ -5,6 +5,11 @@ import ( "github.com/restatedev/sdk-go/internal/options" ) +// re-export for use in generated code +type CallOption = options.CallOption +type ServiceOption = options.ServiceOption +type ObjectOption = options.ObjectOption + type withCodec struct { codec encoding.Codec } @@ -68,6 +73,9 @@ func WithPayloadCodec(codec encoding.PayloadCodec) withPayloadCodec { // WithProto is an option to specify the use of [encoding.ProtoCodec] for (de)serialisation var WithProto = WithPayloadCodec(encoding.ProtoCodec) +// WithProtoJSON is an option to specify the use of [encoding.ProtoJSONCodec] for (de)serialisation +var WithProtoJSON = WithPayloadCodec(encoding.ProtoJSONCodec) + // WithBinary is an option to specify the use of [encoding.BinaryCodec] for (de)serialisation var WithBinary = WithPayloadCodec(encoding.BinaryCodec) diff --git a/proto/dev/restate/sdk/go.proto b/proto/dev/restate/sdk/go.proto new file mode 100644 index 0000000..b18b4d3 --- /dev/null +++ b/proto/dev/restate/sdk/go.proto @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH + * + * This file is part of the Restate SDK for Node.js/TypeScript, + * which is released under the MIT license. + * + * You can find a copy of the license in file LICENSE in the root + * directory of this repository or package, or at + * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE + */ + +syntax = "proto3"; + +package dev.restate.sdk.go; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/restatedev/sdk-go/generated/dev/restate/sdk"; + +// Type: 0xFC00 + 3 +message SelectorEntryMessage { + repeated uint32 journal_entries = 1; + uint32 winning_entry_index = 2; +} + +enum ServiceType { + SERVICE_TYPE_UNSET = 0; + SERVICE_TYPE_SERVICE = 1; + SERVICE_TYPE_VIRTUAL_OBJECT = 2; + SERVICE_TYPE_WORKFLOW = 3; +} + +enum HandlerType { + HANDLER_TYPE_UNSET = 0; + HANDLER_TYPE_EXCLUSIVE = 1; + HANDLER_TYPE_SHARED = 2; + HANDLER_TYPE_WORKFLOW = 3; +} + +extend google.protobuf.MethodOptions { + HandlerType handler_type = 2051; +} + +extend google.protobuf.ServiceOptions { + ServiceType service_type = 2051; +} diff --git a/proto/discovery/discovery.proto b/proto/discovery/discovery.proto deleted file mode 100644 index e385c92..0000000 --- a/proto/discovery/discovery.proto +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH -// -// This file is part of the Restate service protocol, which is -// released under the MIT license. -// -// You can find a copy of the license in file LICENSE in the root -// directory of this repository or package, or at -// https://github.com/restatedev/service-protocol/blob/main/LICENSE - -syntax = "proto3"; - -package dev.restate.service.discovery; - -option java_package = "dev.restate.generated.service.discovery"; -option go_package = "restate.dev/sdk-go/pb/service/discovery"; - -// Service discovery protocol version. -enum ServiceDiscoveryProtocolVersion { - SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED = 0; - // initial service discovery protocol version using endpoint_manifest_schema.json - V1 = 1; -} diff --git a/proto/go/go.proto b/proto/go/go.proto deleted file mode 100644 index be0c0ec..0000000 --- a/proto/go/go.proto +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH - * - * This file is part of the Restate SDK for Node.js/TypeScript, - * which is released under the MIT license. - * - * You can find a copy of the license in file LICENSE in the root - * directory of this repository or package, or at - * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE - */ - -syntax = "proto3"; - -package dev.restate.sdk.go; - -import "proto/protocol/protocol.proto"; - -// Type: 0xFC00 + 3 -message SelectorEntryMessage { - repeated uint32 journal_entries = 1; - uint32 winning_entry_index = 2; -} diff --git a/proto/protocol/protocol.proto b/proto/protocol/protocol.proto deleted file mode 100644 index 333a36e..0000000 --- a/proto/protocol/protocol.proto +++ /dev/null @@ -1,391 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH -// -// This file is part of the Restate service protocol, which is -// released under the MIT license. -// -// You can find a copy of the license in file LICENSE in the root -// directory of this repository or package, or at -// https://github.com/restatedev/service-protocol/blob/main/LICENSE - -syntax = "proto3"; - -package dev.restate.service.protocol; - -option java_package = "dev.restate.generated.service.protocol"; -option go_package = "restate.dev/sdk-go/pb/service/protocol"; - -// Service protocol version. -enum ServiceProtocolVersion { - SERVICE_PROTOCOL_VERSION_UNSPECIFIED = 0; - // initial service protocol version - V1 = 1; -} - -// --- Core frames --- - -// Type: 0x0000 + 0 -message StartMessage { - message StateEntry { - bytes key = 1; - // If value is an empty byte array, - // then it means the value is empty and not "missing" (e.g. empty string). - bytes value = 2; - } - - // Unique id of the invocation. This id is unique across invocations and won't change when replaying the journal. - bytes id = 1; - - // Invocation id that can be used for logging. - // The user can use this id to address this invocation in admin and status introspection apis. - string debug_id = 2; - - uint32 known_entries = 3; - - // protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED - repeated StateEntry state_map = 4; - bool partial_state = 5; - - // If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. - string key = 6; -} - -// Type: 0x0000 + 1 -message CompletionMessage { - uint32 entry_index = 1; - - oneof result { - Empty empty = 13; - bytes value = 14; - Failure failure = 15; - }; -} - -// Type: 0x0000 + 2 -// Implementations MUST send this message when suspending an invocation. -message SuspensionMessage { - // This list represents any of the entry_index the invocation is waiting on to progress. - // The runtime will resume the invocation as soon as one of the given entry_index is completed. - // This list MUST not be empty. - // False positive, entry_indexes is a valid plural of entry_indices. - // https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/i/index-indexes-indices - repeated uint32 entry_indexes = 1; // protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED -} - -// Type: 0x0000 + 3 -message ErrorMessage { - // The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml. - // In addition, we define the following error codes that MAY be used by the SDK for better error reporting: - // * JOURNAL_MISMATCH = 570, that is when the SDK cannot replay a journal due to the mismatch between the journal and the actual code. - // * PROTOCOL_VIOLATION = 571, that is when the SDK receives an unexpected message or an expected message variant, given its state. - uint32 code = 1; - // Contains a concise error message, e.g. Throwable#getMessage() in Java. - string message = 2; - // Contains a verbose error description, e.g. the exception stacktrace. - string description = 3; - - // Entry that caused the failure. This may be outside the current stored journal size. - // If no specific entry caused the failure, the current replayed/processed entry can be used. - optional uint32 related_entry_index = 4; - // Name of the entry that caused the failure. - optional string related_entry_name = 5; - // Entry type. - optional uint32 related_entry_type = 6; -} - -// Type: 0x0000 + 4 -message EntryAckMessage { - uint32 entry_index = 1; -} - -// Type: 0x0000 + 5 -// Implementations MUST send this message when the invocation lifecycle ends. -message EndMessage { -} - -// --- Journal Entries --- - -// Every Completable JournalEntry has a result field, filled only and only if the entry is in DONE state. -// -// For every journal entry, fields 12, 13, 14 and 15 are reserved. -// -// The field 12 is used for name. The name is used by introspection/observability tools. -// -// Depending on the semantics of the corresponding syscall, the entry can represent the completion result field with any of these three types: -// -// * google.protobuf.Empty empty = 13 for cases when we need to propagate to user code the distinction between default value or no value. -// * bytes value = 14 for carrying the result value -// * Failure failure = 15 for carrying a failure - -// ------ Input and output ------ - -// Completable: No -// Fallible: No -// Type: 0x0400 + 0 -message InputEntryMessage { - repeated Header headers = 1; - - bytes value = 14; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: No -// Type: 0x0400 + 1 -message OutputEntryMessage { - oneof result { - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// ------ State access ------ - -// Completable: Yes -// Fallible: No -// Type: 0x0800 + 0 -message GetStateEntryMessage { - bytes key = 1; - - oneof result { - Empty empty = 13; - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: No -// Type: 0x0800 + 1 -message SetStateEntryMessage { - bytes key = 1; - bytes value = 3; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: No -// Type: 0x0800 + 2 -message ClearStateEntryMessage { - bytes key = 1; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: No -// Type: 0x0800 + 3 -message ClearAllStateEntryMessage { - // Entry name - string name = 12; -} - -// Completable: Yes -// Fallible: No -// Type: 0x0800 + 4 -message GetStateKeysEntryMessage { - message StateKeys { - repeated bytes keys = 1; - } - - oneof result { - StateKeys value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: Yes -// Fallible: No -// Type: 0x0800 + 8 -message GetPromiseEntryMessage { - string key = 1; - - oneof result { - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: Yes -// Fallible: No -// Type: 0x0800 + 9 -message PeekPromiseEntryMessage { - string key = 1; - - oneof result { - Empty empty = 13; - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: Yes -// Fallible: No -// Type: 0x0800 + A -message CompletePromiseEntryMessage { - string key = 1; - - // The value to use to complete the promise - oneof completion { - bytes completion_value = 2; - Failure completion_failure = 3; - }; - - oneof result { - // Returns empty if value was set successfully - Empty empty = 13; - // Returns a failure if the promise was already completed - Failure failure = 15; - } - - // Entry name - string name = 12; -} - -// ------ Syscalls ------ - -// Completable: Yes -// Fallible: No -// Type: 0x0C00 + 0 -message SleepEntryMessage { - // Wake up time. - // The time is set as duration since UNIX Epoch. - uint64 wake_up_time = 1; - - oneof result { - Empty empty = 13; - Failure failure = 15; - } - - // Entry name - string name = 12; -} - -// Completable: Yes -// Fallible: Yes -// Type: 0x0C00 + 1 -message CallEntryMessage { - string service_name = 1; - string handler_name = 2; - - bytes parameter = 3; - - repeated Header headers = 4; - - // If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. - string key = 5; - - oneof result { - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: Yes -// Type: 0x0C00 + 2 -message OneWayCallEntryMessage { - string service_name = 1; - string handler_name = 2; - - bytes parameter = 3; - - // Time when this BackgroundInvoke should be executed. - // The time is set as duration since UNIX Epoch. - // If this value is not set, equal to 0, or past in time, - // the runtime will execute this BackgroundInvoke as soon as possible. - uint64 invoke_time = 4; - - repeated Header headers = 5; - - // If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. - string key = 6; - - // Entry name - string name = 12; -} - -// Completable: Yes -// Fallible: No -// Type: 0x0C00 + 3 -// Awakeables are addressed by an identifier exposed to the user. See the spec for more details. -message AwakeableEntryMessage { - oneof result { - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: Yes -// Type: 0x0C00 + 4 -message CompleteAwakeableEntryMessage { - // Identifier of the awakeable. See the spec for more details. - string id = 1; - - oneof result { - bytes value = 14; - Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// Completable: No -// Fallible: No -// Type: 0x0C00 + 5 -// Flag: RequiresRuntimeAck -message RunEntryMessage { - oneof result { - bytes value = 14; - dev.restate.service.protocol.Failure failure = 15; - }; - - // Entry name - string name = 12; -} - -// --- Nested messages - -// This failure object carries user visible errors, -// e.g. invocation failure return value or failure result of an InvokeEntryMessage. -message Failure { - // The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml. - uint32 code = 1; - // Contains a concise error message, e.g. Throwable#getMessage() in Java. - string message = 2; -} - -message Header { - string key = 1; - string value = 2; -} - -message Empty { -} diff --git a/protoc-gen-go-restate/README.md b/protoc-gen-go-restate/README.md new file mode 100644 index 0000000..0df4032 --- /dev/null +++ b/protoc-gen-go-restate/README.md @@ -0,0 +1,33 @@ +# protoc-gen-go-grpc + +This tool generates Go language bindings of `service`s in protobuf definition +files for Restate. + +## Usage +Via protoc: +```shell +protoc --go_out=. --go_opt=paths=source_relative \ +--go-restate_out=. --go-restate_opt=paths=source_relative service.proto +``` + +Via [buf](https://buf.build/): +```yaml +# buf.gen.yaml +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: . + opt: paths=source_relative + - local: + - docker + - run + - --pull=always + - -i + - ghcr.io/restatedev/protoc-gen-go-restate:latest + out: . + opt: paths=source_relative +``` + +# Building a docker image +``` +KO_DOCKER_REPO=ghcr.io/restatedev ko build --platform=all -B +``` diff --git a/protoc-gen-go-restate/main.go b/protoc-gen-go-restate/main.go new file mode 100644 index 0000000..ed54861 --- /dev/null +++ b/protoc-gen-go-restate/main.go @@ -0,0 +1,58 @@ +// protoc-gen-go-restate is a plugin for the Google protocol buffer compiler to +// generate Restate servers and clients. Install it by building this program and +// making it accessible within your PATH with the name: +// +// protoc-gen-go-restate +// +// The 'go-restate' suffix becomes part of the argument for the protocol compiler, +// such that it can be invoked as: +// +// protoc --go-restate_out=. path/to/file.proto +// +// This generates Restate service definitions for the protocol buffer defined by +// file.proto. With that input, the output will be written to: +// +// path/to/file_restate.pb.go +// +// Lots of code copied from protoc-gen-go-grpc: +// https://github.com/grpc/grpc-go/tree/master/cmd/protoc-gen-go-grpc +// ! License Apache-2.0 +package main + +import ( + "flag" + "fmt" + + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/types/pluginpb" +) + +var version = "0.1" + +var requireUnimplemented *bool +var useGenericStreams *bool + +func main() { + showVersion := flag.Bool("version", false, "print the version and exit") + flag.Parse() + if *showVersion { + fmt.Printf("protoc-gen-go-grpc %v\n", version) + return + } + + var flags flag.FlagSet + requireUnimplemented = flags.Bool("require_unimplemented_servers", false, "set to true to disallow servers that have unimplemented fields") + + protogen.Options{ + ParamFunc: flags.Set, + }.Run(func(gen *protogen.Plugin) error { + gen.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) + for _, f := range gen.Files { + if !f.Generate { + continue + } + generateFile(gen, f) + } + return nil + }) +} diff --git a/protoc-gen-go-restate/restate.go b/protoc-gen-go-restate/restate.go new file mode 100644 index 0000000..811552b --- /dev/null +++ b/protoc-gen-go-restate/restate.go @@ -0,0 +1,404 @@ +package main + +import ( + "fmt" + "strings" + + "github.com/restatedev/sdk-go/generated/dev/restate/sdk" + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/descriptorpb" +) + +const ( + fmtPackage = protogen.GoImportPath("fmt") + sdkPackage = protogen.GoImportPath("github.com/restatedev/sdk-go") +) + +type serviceGenerateHelper struct{} + +func generateClientStruct(g *protogen.GeneratedFile, service *protogen.Service, clientName string) { + g.P("type ", unexport(clientName), " struct {") + g.P("ctx ", sdkPackage.Ident("Context")) + serviceType := proto.GetExtension(service.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + if serviceType == sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT { + g.P("key string") + } + g.P("options []", sdkPackage.Ident("CallOption")) + g.P("}") +} + +func generateNewClientDefinitions(g *protogen.GeneratedFile, service *protogen.Service, clientName string) { + g.P("cOpts := append([]", sdkPackage.Ident("CallOption"), "{", sdkPackage.Ident("WithProtoJSON"), "}, opts...)") + g.P("return &", unexport(clientName), "{") + g.P("ctx,") + serviceType := proto.GetExtension(service.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + if serviceType == sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT { + g.P("key,") + } + g.P("cOpts,") + g.P("}") +} + +func generateUnimplementedServerType(gen *protogen.Plugin, g *protogen.GeneratedFile, service *protogen.Service) { + serverType := service.GoName + "Server" + mustOrShould := "must" + if !*requireUnimplemented { + mustOrShould = "should" + } + // Server Unimplemented struct for forward compatibility. + g.P("// Unimplemented", serverType, " ", mustOrShould, " be embedded to have") + g.P("// forward compatible implementations.") + g.P("//") + g.P("// NOTE: this should be embedded by value instead of pointer to avoid a nil") + g.P("// pointer dereference when methods are called.") + g.P("type Unimplemented", serverType, " struct {}") + g.P() + for _, method := range service.Methods { + g.P("func (Unimplemented", serverType, ") ", serverSignature(gen, g, method), "{") + g.P("return ", "nil,", sdkPackage.Ident("TerminalError"), "(", fmtPackage.Ident("Errorf"), `("method `, method.GoName, ` not implemented"), 501)`) + g.P("}") + } + if *requireUnimplemented { + g.P("func (Unimplemented", serverType, ") mustEmbedUnimplemented", serverType, "() {}") + } + g.P("func (Unimplemented", serverType, ") testEmbeddedByValue() {}") + g.P() +} + +// FileDescriptorProto.package field number +const fileDescriptorProtoPackageFieldNumber = 2 + +// FileDescriptorProto.syntax field number +const fileDescriptorProtoSyntaxFieldNumber = 12 + +// generateFile generates a _restate.pb.go file containing Restate service definitions. +func generateFile(gen *protogen.Plugin, file *protogen.File) *protogen.GeneratedFile { + if len(file.Services) == 0 { + return nil + } + filename := file.GeneratedFilenamePrefix + "_restate.pb.go" + g := gen.NewGeneratedFile(filename, file.GoImportPath) + // Attach all comments associated with the syntax field. + genLeadingComments(g, file.Desc.SourceLocations().ByPath(protoreflect.SourcePath{fileDescriptorProtoSyntaxFieldNumber})) + g.P("// Code generated by protoc-gen-go-restate. DO NOT EDIT.") + g.P("// versions:") + g.P("// - protoc-gen-go-restate v", version) + g.P("// - protoc ", protocVersion(gen)) + if file.Proto.GetOptions().GetDeprecated() { + g.P("// ", file.Desc.Path(), " is a deprecated file.") + } else { + g.P("// source: ", file.Desc.Path()) + } + g.P() + // Attach all comments associated with the package field. + genLeadingComments(g, file.Desc.SourceLocations().ByPath(protoreflect.SourcePath{fileDescriptorProtoPackageFieldNumber})) + g.P("package ", file.GoPackageName) + g.P() + generateFileContent(gen, file, g) + return g +} + +func protocVersion(gen *protogen.Plugin) string { + v := gen.Request.GetCompilerVersion() + if v == nil { + return "(unknown)" + } + var suffix string + if s := v.GetSuffix(); s != "" { + suffix = "-" + s + } + return fmt.Sprintf("v%d.%d.%d%s", v.GetMajor(), v.GetMinor(), v.GetPatch(), suffix) +} + +// generateFileContent generates the service definitions, excluding the package statement. +func generateFileContent(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile) { + if len(file.Services) == 0 { + return + } + + for _, service := range file.Services { + genService(gen, g, service) + } +} + +// genServiceComments copies the comments from the RPC proto definitions +// to the corresponding generated interface file. +func genServiceComments(g *protogen.GeneratedFile, service *protogen.Service) { + if service.Comments.Leading != "" { + // Add empty comment line to attach this service's comments to + // the godoc comments previously output for all services. + g.P("//") + g.P(strings.TrimSpace(service.Comments.Leading.String())) + } +} + +func genService(gen *protogen.Plugin, g *protogen.GeneratedFile, service *protogen.Service) { + // Client interface. + clientName := service.GoName + "Client" + + g.P("// ", clientName, " is the client API for ", service.GoName, " service.") + g.P("//") + + // Copy comments from proto file. + genServiceComments(g, service) + + if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { + g.P("//") + g.P(deprecationComment) + } + g.AnnotateSymbol(clientName, protogen.Annotation{Location: service.Location}) + g.P("type ", clientName, " interface {") + for _, method := range service.Methods { + g.AnnotateSymbol(clientName+"."+method.GoName, protogen.Annotation{Location: method.Location}) + if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { + g.P(deprecationComment) + } + g.P(method.Comments.Leading, + clientSignature(g, method)) + } + g.P("}") + g.P() + + // Client structure. + generateClientStruct(g, service, clientName) + + // NewClient factory. + if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { + g.P(deprecationComment) + } + newClientSignature := "New" + clientName + " (ctx " + g.QualifiedGoIdent(sdkPackage.Ident("Context")) + serviceType := proto.GetExtension(service.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + if serviceType == sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT { + newClientSignature += ", key string" + } + newClientSignature += ", opts..." + g.QualifiedGoIdent(sdkPackage.Ident("CallOption")) + ") " + clientName + + g.P("func ", newClientSignature, " {") + generateNewClientDefinitions(g, service, clientName) + g.P("}") + + var methodIndex int + // Client method implementations. + for _, method := range service.Methods { + if !method.Desc.IsStreamingServer() && !method.Desc.IsStreamingClient() { + genClientMethod(gen, g, method) + methodIndex++ + } else { + gen.Error(fmt.Errorf("streaming methods are not currently supported in Restate.")) + } + } + + mustOrShould := "must" + if !*requireUnimplemented { + mustOrShould = "should" + } + + // Server interface. + serverType := service.GoName + "Server" + g.P("// ", serverType, " is the server API for ", service.GoName, " service.") + g.P("// All implementations ", mustOrShould, " embed Unimplemented", serverType) + g.P("// for forward compatibility.") + + // Copy comments from proto file. + genServiceComments(g, service) + + if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { + g.P("//") + g.P(deprecationComment) + } + + g.AnnotateSymbol(serverType, protogen.Annotation{Location: service.Location}) + g.P("type ", serverType, " interface {") + for _, method := range service.Methods { + g.AnnotateSymbol(serverType+"."+method.GoName, protogen.Annotation{Location: method.Location}) + if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { + g.P(deprecationComment) + } + g.P(method.Comments.Leading, + serverSignature(gen, g, method)) + } + if *requireUnimplemented { + g.P("mustEmbedUnimplemented", serverType, "()") + } + g.P("}") + g.P() + + // Server Unimplemented struct for forward compatibility. + generateUnimplementedServerType(gen, g, service) + + // Unsafe Server interface to opt-out of forward compatibility. + g.P("// Unsafe", serverType, " may be embedded to opt out of forward compatibility for this service.") + g.P("// Use of this interface is not recommended, as added methods to ", serverType, " will") + g.P("// result in compilation errors.") + g.P("type Unsafe", serverType, " interface {") + g.P("mustEmbedUnimplemented", serverType, "()") + g.P("}") + + // Server registration. + if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { + g.P(deprecationComment) + } + + g.P("func New", service.GoName, "Server(srv ", serverType, ", opts ...", routerOptionType(gen, g, service), ") ", sdkPackage.Ident("ServiceDefinition"), " {") + g.P("// If the following call panics, it indicates Unimplemented", serverType, " was") + g.P("// embedded by pointer and is nil. This will cause panics if an") + g.P("// unimplemented method is ever invoked, so we test this at initialization") + g.P("// time to prevent it from happening at runtime later due to I/O.") + g.P("if t, ok := srv.(interface { testEmbeddedByValue() }); ok {") + g.P("t.testEmbeddedByValue()") + g.P("}") + g.P("sOpts := append([]", routerOptionType(gen, g, service), "{", sdkPackage.Ident("WithProtoJSON"), "}, opts...)") + g.P("router := ", newRouterType(gen, g, service), `("`, service.GoName, `", sOpts...)`) + for _, method := range service.Methods { + g.P(`router = router.Handler("`, method.GoName, `",`, newHandlerType(gen, g, method), "(srv.", method.GoName, "))") + } + g.P("return router") + g.P("}") + g.P() +} + +func clientSignature(g *protogen.GeneratedFile, method *protogen.Method) string { + s := method.GoName + "(" + s += "opts ..." + g.QualifiedGoIdent(sdkPackage.Ident("CallOption")) + ") (" + s += g.QualifiedGoIdent(sdkPackage.Ident("TypedCallClient")) + "[" + "*" + g.QualifiedGoIdent(method.Input.GoIdent) + ", *" + g.QualifiedGoIdent(method.Output.GoIdent) + "]" + s += ")" + return s +} + +func genClientMethod(gen *protogen.Plugin, g *protogen.GeneratedFile, method *protogen.Method) { + service := method.Parent + serviceType := proto.GetExtension(service.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + + if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { + g.P(deprecationComment) + } + g.P("func (c *", unexport(service.GoName), "Client) ", clientSignature(g, method), "{") + + g.P("cOpts := c.options") + g.P("if len(opts) > 0 {") + g.P("cOpts = append(append([]sdk_go.CallOption{}, cOpts...), opts...)") + g.P("}") + getClient := `c.ctx.` + switch serviceType { + case sdk.ServiceType_SERVICE_TYPE_UNSET, sdk.ServiceType_SERVICE_TYPE_SERVICE: + getClient += `Service` + `("` + service.GoName + `",` + case sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT: + getClient += `Object` + `("` + service.GoName + `", c.key,` + default: + gen.Error(fmt.Errorf("Unexpected service type: %s", serviceType.String())) + return + } + getClient += `"` + method.GoName + `", cOpts...)` + g.P("return ", sdkPackage.Ident("NewTypedCallClient"), "[*", method.Input.GoIdent, ", *", method.Output.GoIdent, "]", `(`, getClient, `)`) + g.P("}") + g.P() + return +} + +func serverSignature(gen *protogen.Plugin, g *protogen.GeneratedFile, method *protogen.Method) string { + var reqArgs []string + reqArgs = append(reqArgs, contextType(gen, g, method)) + return method.GoName + + "(ctx " + contextType(gen, g, method) + + ", req *" + g.QualifiedGoIdent(method.Input.GoIdent) + ") (*" + + g.QualifiedGoIdent(method.Output.GoIdent) + ", error)" +} + +func contextType(gen *protogen.Plugin, g *protogen.GeneratedFile, method *protogen.Method) string { + serviceType := proto.GetExtension(method.Parent.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + handlerType := proto.GetExtension(method.Desc.Options().(*descriptorpb.MethodOptions), sdk.E_HandlerType).(sdk.HandlerType) + + switch serviceType { + case sdk.ServiceType_SERVICE_TYPE_UNSET, sdk.ServiceType_SERVICE_TYPE_SERVICE: + if handlerType != sdk.HandlerType_HANDLER_TYPE_UNSET { + gen.Error(fmt.Errorf("Handlers in services of type SERVICE should not have a handler type set")) + return "" + } + return g.QualifiedGoIdent(sdkPackage.Ident("Context")) + case sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT: + switch handlerType { + case sdk.HandlerType_HANDLER_TYPE_SHARED: + return g.QualifiedGoIdent(sdkPackage.Ident("ObjectSharedContext")) + case sdk.HandlerType_HANDLER_TYPE_UNSET, sdk.HandlerType_HANDLER_TYPE_EXCLUSIVE: + // unset also defaults to exclusive + return g.QualifiedGoIdent(sdkPackage.Ident("ObjectContext")) + default: + gen.Error(fmt.Errorf("Handlers in services of type VIRTUAL_OBJECT must have type SHARED, EXCLUSIVE, or unset (defaults to EXCLUSIVE)")) + return "" + } + default: + gen.Error(fmt.Errorf("Unexpected service type: %s", serviceType.String())) + return "" + } +} + +func newRouterType(gen *protogen.Plugin, g *protogen.GeneratedFile, service *protogen.Service) string { + serviceType := proto.GetExtension(service.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + switch serviceType { + case sdk.ServiceType_SERVICE_TYPE_UNSET, sdk.ServiceType_SERVICE_TYPE_SERVICE: + return g.QualifiedGoIdent(sdkPackage.Ident("NewService")) + case sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT: + return g.QualifiedGoIdent(sdkPackage.Ident("NewObject")) + default: + gen.Error(fmt.Errorf("Unexpected service type: %s", serviceType.String())) + return "" + } +} + +func routerOptionType(gen *protogen.Plugin, g *protogen.GeneratedFile, service *protogen.Service) string { + serviceType := proto.GetExtension(service.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + switch serviceType { + case sdk.ServiceType_SERVICE_TYPE_UNSET, sdk.ServiceType_SERVICE_TYPE_SERVICE: + return g.QualifiedGoIdent(sdkPackage.Ident("ServiceOption")) + case sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT: + return g.QualifiedGoIdent(sdkPackage.Ident("ObjectOption")) + default: + gen.Error(fmt.Errorf("Unexpected service type: %s", serviceType.String())) + return "" + } +} + +func newHandlerType(gen *protogen.Plugin, g *protogen.GeneratedFile, method *protogen.Method) string { + serviceType := proto.GetExtension(method.Parent.Desc.Options().(*descriptorpb.ServiceOptions), sdk.E_ServiceType).(sdk.ServiceType) + handlerType := proto.GetExtension(method.Desc.Options().(*descriptorpb.MethodOptions), sdk.E_HandlerType).(sdk.HandlerType) + + switch serviceType { + case sdk.ServiceType_SERVICE_TYPE_UNSET, sdk.ServiceType_SERVICE_TYPE_SERVICE: + if handlerType != sdk.HandlerType_HANDLER_TYPE_UNSET { + gen.Error(fmt.Errorf("Handlers in services of type SERVICE should not have a handler type set")) + return "" + } + return g.QualifiedGoIdent(sdkPackage.Ident("NewServiceHandler")) + case sdk.ServiceType_SERVICE_TYPE_VIRTUAL_OBJECT: + switch handlerType { + case sdk.HandlerType_HANDLER_TYPE_SHARED: + return g.QualifiedGoIdent(sdkPackage.Ident("NewObjectSharedHandler")) + case sdk.HandlerType_HANDLER_TYPE_UNSET, sdk.HandlerType_HANDLER_TYPE_EXCLUSIVE: + // unset also defaults to exclusive + return g.QualifiedGoIdent(sdkPackage.Ident("NewObjectHandler")) + default: + gen.Error(fmt.Errorf("Handlers in services of type VIRTUAL_OBJECT must have type SHARED, EXCLUSIVE, or unset (defaults to EXCLUSIVE)")) + return "" + } + default: + gen.Error(fmt.Errorf("Unexpected service type: %s", serviceType.String())) + return "" + } +} + +func genLeadingComments(g *protogen.GeneratedFile, loc protoreflect.SourceLocation) { + for _, s := range loc.LeadingDetachedComments { + g.P(protogen.Comments(s)) + g.P() + } + if s := loc.LeadingComments; s != "" { + g.P(protogen.Comments(s)) + g.P() + } +} + +const deprecationComment = "// Deprecated: Do not use." + +func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } diff --git a/server/restate.go b/server/restate.go index 5e8653f..e56cd24 100644 --- a/server/restate.go +++ b/server/restate.go @@ -11,8 +11,7 @@ import ( "strings" restate "github.com/restatedev/sdk-go" - "github.com/restatedev/sdk-go/generated/proto/discovery" - "github.com/restatedev/sdk-go/generated/proto/protocol" + protocol "github.com/restatedev/sdk-go/generated/dev/restate/service" "github.com/restatedev/sdk-go/internal" "github.com/restatedev/sdk-go/internal/identity" "github.com/restatedev/sdk-go/internal/log" @@ -22,8 +21,8 @@ import ( const minServiceProtocolVersion protocol.ServiceProtocolVersion = protocol.ServiceProtocolVersion_V1 const maxServiceProtocolVersion protocol.ServiceProtocolVersion = protocol.ServiceProtocolVersion_V1 -const minServiceDiscoveryProtocolVersion discovery.ServiceDiscoveryProtocolVersion = discovery.ServiceDiscoveryProtocolVersion_V1 -const maxServiceDiscoveryProtocolVersion discovery.ServiceDiscoveryProtocolVersion = discovery.ServiceDiscoveryProtocolVersion_V1 +const minServiceDiscoveryProtocolVersion protocol.ServiceDiscoveryProtocolVersion = protocol.ServiceDiscoveryProtocolVersion_V1 +const maxServiceDiscoveryProtocolVersion protocol.ServiceDiscoveryProtocolVersion = protocol.ServiceDiscoveryProtocolVersion_V1 var xRestateServer = `restate-sdk-go/unknown` @@ -150,7 +149,7 @@ func (r *Restate) discoverHandler(writer http.ResponseWriter, req *http.Request) serviceDiscoveryProtocolVersion := selectSupportedServiceDiscoveryProtocolVersion(acceptVersionsString) - if serviceDiscoveryProtocolVersion == discovery.ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED { + if serviceDiscoveryProtocolVersion == protocol.ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED { writer.WriteHeader(http.StatusUnsupportedMediaType) writer.Write([]byte(fmt.Sprintf("Unsupported service discovery protocol version '%s'", acceptVersionsString))) return @@ -179,8 +178,8 @@ func (r *Restate) discoverHandler(writer http.ResponseWriter, req *http.Request) } } -func selectSupportedServiceDiscoveryProtocolVersion(accept string) discovery.ServiceDiscoveryProtocolVersion { - maxVersion := discovery.ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED +func selectSupportedServiceDiscoveryProtocolVersion(accept string) protocol.ServiceDiscoveryProtocolVersion { + maxVersion := protocol.ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED for _, versionString := range strings.Split(accept, ",") { version := parseServiceDiscoveryProtocolVersion(versionString) @@ -192,21 +191,21 @@ func selectSupportedServiceDiscoveryProtocolVersion(accept string) discovery.Ser return maxVersion } -func parseServiceDiscoveryProtocolVersion(versionString string) discovery.ServiceDiscoveryProtocolVersion { +func parseServiceDiscoveryProtocolVersion(versionString string) protocol.ServiceDiscoveryProtocolVersion { if strings.TrimSpace(versionString) == "application/vnd.restate.endpointmanifest.v1+json" { - return discovery.ServiceDiscoveryProtocolVersion_V1 + return protocol.ServiceDiscoveryProtocolVersion_V1 } - return discovery.ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED + return protocol.ServiceDiscoveryProtocolVersion_SERVICE_DISCOVERY_PROTOCOL_VERSION_UNSPECIFIED } -func isServiceDiscoveryProtocolVersionSupported(version discovery.ServiceDiscoveryProtocolVersion) bool { +func isServiceDiscoveryProtocolVersionSupported(version protocol.ServiceDiscoveryProtocolVersion) bool { return version >= minServiceDiscoveryProtocolVersion && version <= maxServiceDiscoveryProtocolVersion } -func serviceDiscoveryProtocolVersionToHeaderValue(serviceDiscoveryProtocolVersion discovery.ServiceDiscoveryProtocolVersion) string { +func serviceDiscoveryProtocolVersionToHeaderValue(serviceDiscoveryProtocolVersion protocol.ServiceDiscoveryProtocolVersion) string { switch serviceDiscoveryProtocolVersion { - case discovery.ServiceDiscoveryProtocolVersion_V1: + case protocol.ServiceDiscoveryProtocolVersion_V1: return "application/vnd.restate.endpointmanifest.v1+json" } panic(fmt.Sprintf("unexpected service discovery protocol version %d", serviceDiscoveryProtocolVersion)) diff --git a/test-services/proxy.go b/test-services/proxy.go index d01fba7..1b7e775 100644 --- a/test-services/proxy.go +++ b/test-services/proxy.go @@ -12,15 +12,15 @@ type ProxyRequest struct { Message []int `json:"message"` } -func (req *ProxyRequest) ToTarget(ctx restate.Context) restate.TypedCallClient[[]byte] { +func (req *ProxyRequest) ToTarget(ctx restate.Context) restate.TypedCallClient[[]byte, []byte] { if req.VirtualObjectKey != nil { - return restate.CallAs[[]byte](ctx.Object( + return restate.NewTypedCallClient[[]byte, []byte](ctx.Object( req.ServiceName, *req.VirtualObjectKey, req.HandlerName, restate.WithBinary)) } else { - return restate.CallAs[[]byte](ctx.Service( + return restate.NewTypedCallClient[[]byte, []byte](ctx.Service( req.ServiceName, req.HandlerName, restate.WithBinary))