diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9948844e..d3bd1e90 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -116,8 +116,9 @@ RUN ln -s /home/parigot/deps/protoc-${PROTOC_VERSION}/bin/protoc /home/parigot/t # docker socket dir? RUN mkdir /var/run/parigot -RUN chown parigot /var/run/parigot /home/parigot -RUN chgrp parigot /var/run/parigot /home/parigot +RUN chown -R parigot /var/run/parigot /home/parigot /workspaces/parigot/g +RUN chgrp -R parigot /var/run/parigot /home/parigot /workspaces/parigot/g +RUN chmod -R 775 /var/run/parigot /home/parigot #RUN chmod g+w /var/run/parigot # safety @@ -125,11 +126,7 @@ RUN chgrp parigot /var/run/parigot /home/parigot #RUN chown -R parigot . #RUN chgrp -R parigot . RUN mkdir -p /home/parigot/tools/bin -RUN chown -R parigot /home/parigot/tools -RUN chgrp -R parigot /home/parigot/tools RUN mkdir -p /home/parigot/deps -RUN chown -R parigot /home/parigot/deps -RUN chgrp -R parigot /home/parigot/deps #zsh RUN chsh -s /usr/bin/zsh parigot diff --git a/.github/workflows/automake.yaml b/.github/workflows/automake.yaml index 9b33654f..1c39a4b2 100644 --- a/.github/workflows/automake.yaml +++ b/.github/workflows/automake.yaml @@ -20,7 +20,7 @@ jobs: run: docker build -t my-test-image .devcontainer # - name: Run tests using Docker image # run: docker run --rm my-test-image make test - - name: build + - name: build Makefile run: make && make test # runs: # using: 'docker' diff --git a/g/file/v1/file.pb.go b/g/file/v1/file.pb.go new file mode 100644 index 00000000..98301e4c --- /dev/null +++ b/g/file/v1/file.pb.go @@ -0,0 +1,1523 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: file/v1/file.proto + +package file + +import ( + v1 "github.com/iansmith/parigot/g/protosupport/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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 FileErr int32 + +const ( + FileErr_NoError FileErr = 0 // mandatory + FileErr_DispatchError FileErr = 1 //mandatory + FileErr_UnmarshalError FileErr = 2 // mandatory + FileErr_MarshalError FileErr = 3 // mandatory + // InvalidPathError: Provided path name is not valid based on following rules: + // 1. The separator should be "/" + // 2. It should start with specific prefix -> '/parigot/app/' + // 3. It should not contain any "." or ".." in the path + // 4. It should not exceed a specific value for the number (max is 20) of parts in the path + // 5. It should avoid certain special characters, including: + // Asterisk (*) Question mark (?) Greater than (>) + // Less than (<) Pipe symbol (|) Ampersand (&) + // Semicolon (;) Dollar sign ($) Backtick (`) + // Double quotation marks (") Single quotation mark (') + // + // Invalid example: + // + // '/parigot/app/..' -> '..' is not allowed + // '/parigot/app/./' -> '.' is not allowed + // '/parigot/app/foo\bar' -> '\' is not allowed + // '//parigot/app/foo', '/parigot/app' -> prefix should be '/parigot/app/' + FileErr_InvalidPathError FileErr = 4 + // File status related errors + FileErr_AlreadyInUseError FileErr = 5 // The file is already being used. + FileErr_NotExistError FileErr = 6 // The file/path does not exist + FileErr_FileClosedError FileErr = 7 // The file status is CLOSED, cannot be accessed by a read or write request + FileErr_EOFError FileErr = 8 // The file is at the end of the file + FileErr_ReadError FileErr = 9 // Some error happened during reading a file + FileErr_WriteError FileErr = 10 // Some error happened during writing a file + FileErr_OpenError FileErr = 11 // Some error happened during opening a file + FileErr_DeleteError FileErr = 12 // Some error happened during deleting a file + FileErr_CreateError FileErr = 13 // Some error happened during creating a file + FileErr_NoDataFoundError FileErr = 14 // No data file found in the directory + FileErr_LargeBufError FileErr = 15 // The buffer for the file is too large + FileErr_InternalError FileErr = 16 // There are internal issues with the file service +) + +// Enum value maps for FileErr. +var ( + FileErr_name = map[int32]string{ + 0: "NoError", + 1: "DispatchError", + 2: "UnmarshalError", + 3: "MarshalError", + 4: "InvalidPathError", + 5: "AlreadyInUseError", + 6: "NotExistError", + 7: "FileClosedError", + 8: "EOFError", + 9: "ReadError", + 10: "WriteError", + 11: "OpenError", + 12: "DeleteError", + 13: "CreateError", + 14: "NoDataFoundError", + 15: "LargeBufError", + 16: "InternalError", + } + FileErr_value = map[string]int32{ + "NoError": 0, + "DispatchError": 1, + "UnmarshalError": 2, + "MarshalError": 3, + "InvalidPathError": 4, + "AlreadyInUseError": 5, + "NotExistError": 6, + "FileClosedError": 7, + "EOFError": 8, + "ReadError": 9, + "WriteError": 10, + "OpenError": 11, + "DeleteError": 12, + "CreateError": 13, + "NoDataFoundError": 14, + "LargeBufError": 15, + "InternalError": 16, + } +) + +func (x FileErr) Enum() *FileErr { + p := new(FileErr) + *p = x + return p +} + +func (x FileErr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileErr) Descriptor() protoreflect.EnumDescriptor { + return file_file_v1_file_proto_enumTypes[0].Descriptor() +} + +func (FileErr) Type() protoreflect.EnumType { + return &file_file_v1_file_proto_enumTypes[0] +} + +func (x FileErr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FileErr.Descriptor instead. +func (FileErr) EnumDescriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{0} +} + +type CreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_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 CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CreateRequest) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type OpenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *OpenRequest) Reset() { + *x = OpenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenRequest) ProtoMessage() {} + +func (x *OpenRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_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 OpenRequest.ProtoReflect.Descriptor instead. +func (*OpenRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{1} +} + +func (x *OpenRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type CloseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CloseRequest) Reset() { + *x = CloseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseRequest) ProtoMessage() {} + +func (x *CloseRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_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 CloseRequest.ProtoReflect.Descriptor instead. +func (*CloseRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{2} +} + +func (x *CloseRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +type CreateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Id *v1.IdRaw `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Truncated bool `protobuf:"varint,3,opt,name=truncated,proto3" json:"truncated,omitempty"` +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_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 CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateResponse) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CreateResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *CreateResponse) GetTruncated() bool { + if x != nil { + return x.Truncated + } + return false +} + +type OpenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Id *v1.IdRaw `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *OpenResponse) Reset() { + *x = OpenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenResponse) ProtoMessage() {} + +func (x *OpenResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_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 OpenResponse.ProtoReflect.Descriptor instead. +func (*OpenResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{4} +} + +func (x *OpenResponse) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *OpenResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// CloseResponse is not empty because it can return an error. However, there is no +// action that the receiver of this response can take other than perhaps issuing a warning +// to the system operators. +type CloseResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CloseResponse) Reset() { + *x = CloseResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseResponse) ProtoMessage() {} + +func (x *CloseResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[5] + 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 CloseResponse.ProtoReflect.Descriptor instead. +func (*CloseResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{5} +} + +func (x *CloseResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// LoadTestDataRequest loads the contents of given directory from the _host_ file system into the /app directory +// of the test filesystem (in memory). This is only intended to be use for test code. +type LoadTestDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // path is a path to a directory on the _host_ filesystem that is to be loaded in /app + DirPath string `protobuf:"bytes,1,opt,name=dir_path,json=dirPath,proto3" json:"dir_path,omitempty"` + // where this new file will exist in the in-memory filesystem... this path + // will be cleaned lexically and then joined to /app. Note that it is possible + // create paths with this parameter that cannot be opened because of + // restrictions on the path in open. + MountLocation string `protobuf:"bytes,2,opt,name=mount_location,json=mountLocation,proto3" json:"mount_location,omitempty"` + // returnOnFail should be set to true if you do NOT want the normal behavior of using panic on error. + // If this value is set to true, the paths that cause an error on import are return in the TestDataResponse. + ReturnOnFail bool `protobuf:"varint,3,opt,name=return_on_fail,json=returnOnFail,proto3" json:"return_on_fail,omitempty"` +} + +func (x *LoadTestDataRequest) Reset() { + *x = LoadTestDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadTestDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadTestDataRequest) ProtoMessage() {} + +func (x *LoadTestDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[6] + 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 LoadTestDataRequest.ProtoReflect.Descriptor instead. +func (*LoadTestDataRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{6} +} + +func (x *LoadTestDataRequest) GetDirPath() string { + if x != nil { + return x.DirPath + } + return "" +} + +func (x *LoadTestDataRequest) GetMountLocation() string { + if x != nil { + return x.MountLocation + } + return "" +} + +func (x *LoadTestDataRequest) GetReturnOnFail() bool { + if x != nil { + return x.ReturnOnFail + } + return false +} + +// LoadTestDataResponse contains a list of paths that caused an error during loading. This value is only +// returned if the LoadRequest has the returnOnFail set to true. If LoadDataRequest.return_on_fail is +// false since by definition the error_path will be empty. +type LoadTestDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ErrorPath []string `protobuf:"bytes,1,rep,name=error_path,json=errorPath,proto3" json:"error_path,omitempty"` +} + +func (x *LoadTestDataResponse) Reset() { + *x = LoadTestDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadTestDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadTestDataResponse) ProtoMessage() {} + +func (x *LoadTestDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[7] + 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 LoadTestDataResponse.ProtoReflect.Descriptor instead. +func (*LoadTestDataResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{7} +} + +func (x *LoadTestDataResponse) GetErrorPath() []string { + if x != nil { + return x.ErrorPath + } + return nil +} + +type ReadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Reads up to len(buf) bytes into buf + Buf []byte `protobuf:"bytes,2,opt,name=buf,proto3" json:"buf,omitempty"` +} + +func (x *ReadRequest) Reset() { + *x = ReadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadRequest) ProtoMessage() {} + +func (x *ReadRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[8] + 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 ReadRequest.ProtoReflect.Descriptor instead. +func (*ReadRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{8} +} + +func (x *ReadRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *ReadRequest) GetBuf() []byte { + if x != nil { + return x.Buf + } + return nil +} + +type ReadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The number of bytes read (0 <= num_read <= len(buf)) + NumRead int32 `protobuf:"varint,2,opt,name=num_read,json=numRead,proto3" json:"num_read,omitempty"` +} + +func (x *ReadResponse) Reset() { + *x = ReadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadResponse) ProtoMessage() {} + +func (x *ReadResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[9] + 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 ReadResponse.ProtoReflect.Descriptor instead. +func (*ReadResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{9} +} + +func (x *ReadResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *ReadResponse) GetNumRead() int32 { + if x != nil { + return x.NumRead + } + return 0 +} + +type WriteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Writes len(buf) bytes from buf + Buf []byte `protobuf:"bytes,2,opt,name=buf,proto3" json:"buf,omitempty"` +} + +func (x *WriteRequest) Reset() { + *x = WriteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteRequest) ProtoMessage() {} + +func (x *WriteRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[10] + 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 WriteRequest.ProtoReflect.Descriptor instead. +func (*WriteRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{10} +} + +func (x *WriteRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *WriteRequest) GetBuf() []byte { + if x != nil { + return x.Buf + } + return nil +} + +type WriteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The number of bytes written from buf (0 <= num_write <= len(buf)) + NumWrite int32 `protobuf:"varint,2,opt,name=num_write,json=numWrite,proto3" json:"num_write,omitempty"` +} + +func (x *WriteResponse) Reset() { + *x = WriteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteResponse) ProtoMessage() {} + +func (x *WriteResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[11] + 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 WriteResponse.ProtoReflect.Descriptor instead. +func (*WriteResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{11} +} + +func (x *WriteResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *WriteResponse) GetNumWrite() int32 { + if x != nil { + return x.NumWrite + } + return 0 +} + +type DeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[12] + 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 DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{12} +} + +func (x *DeleteRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type DeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Id *v1.IdRaw `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[13] + 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 DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteResponse) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *DeleteResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// StatRequest asks for the information about a file +type StatRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *StatRequest) Reset() { + *x = StatRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatRequest) ProtoMessage() {} + +func (x *StatRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[14] + 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 StatRequest.ProtoReflect.Descriptor instead. +func (*StatRequest) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{14} +} + +func (x *StatRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Define the FileInfo struct +type FileInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + IsDir bool `protobuf:"varint,3,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"` + Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // creation time + ModTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=mod_time,json=modTime,proto3" json:"mod_time,omitempty"` // modification time +} + +func (x *FileInfo) Reset() { + *x = FileInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileInfo) ProtoMessage() {} + +func (x *FileInfo) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[15] + 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 FileInfo.ProtoReflect.Descriptor instead. +func (*FileInfo) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{15} +} + +func (x *FileInfo) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *FileInfo) GetIsDir() bool { + if x != nil { + return x.IsDir + } + return false +} + +func (x *FileInfo) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *FileInfo) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *FileInfo) GetModTime() *timestamppb.Timestamp { + if x != nil { + return x.ModTime + } + return nil +} + +// Use the FileInfo struct in the StatResponse message +type StatResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileInfo *FileInfo `protobuf:"bytes,1,opt,name=file_info,json=fileInfo,proto3" json:"file_info,omitempty"` +} + +func (x *StatResponse) Reset() { + *x = StatResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_file_v1_file_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatResponse) ProtoMessage() {} + +func (x *StatResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_v1_file_proto_msgTypes[16] + 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 StatResponse.ProtoReflect.Descriptor instead. +func (*StatResponse) Descriptor() ([]byte, []int) { + return file_file_v1_file_proto_rawDescGZIP(), []int{16} +} + +func (x *StatResponse) GetFileInfo() *FileInfo { + if x != nil { + return x.FileInfo + } + return nil +} + +var File_file_v1_file_proto protoreflect.FileDescriptor + +var file_file_v1_file_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x22, 0x21, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x22, 0x36, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6a, 0x0a, 0x0e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x74, + 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x37, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7d, 0x0a, + 0x13, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x69, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x25, 0x0a, 0x0e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x5f, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x4f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x22, 0x35, 0x0a, 0x14, + 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x50, + 0x61, 0x74, 0x68, 0x22, 0x47, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, + 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x62, 0x75, 0x66, 0x22, 0x51, 0x0a, 0x0c, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x61, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x61, 0x64, 0x22, + 0x48, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x66, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x62, 0x75, 0x66, 0x22, 0x54, 0x0a, 0x0d, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x22, + 0x23, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x22, 0x4c, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x21, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, + 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x6d, 0x6f, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0xc5, 0x02, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x72, + 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, + 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x04, 0x12, 0x15, 0x0a, + 0x11, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x65, 0x43, + 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, + 0x45, 0x4f, 0x46, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x65, + 0x61, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x0a, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x70, 0x65, + 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x4e, 0x6f, + 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x0e, + 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x42, 0x75, 0x66, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x10, 0x10, 0x1a, 0x05, 0xd8, 0x9e, 0x89, 0x02, 0x01, 0x32, 0xd8, 0x03, + 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x14, + 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, + 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, + 0x0a, 0x0c, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, + 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x52, + 0x65, 0x61, 0x64, 0x12, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x74, 0x12, 0x14, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x2f, + 0x70, 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x2f, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x76, + 0x31, 0x3b, 0x66, 0x69, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_file_v1_file_proto_rawDescOnce sync.Once + file_file_v1_file_proto_rawDescData = file_file_v1_file_proto_rawDesc +) + +func file_file_v1_file_proto_rawDescGZIP() []byte { + file_file_v1_file_proto_rawDescOnce.Do(func() { + file_file_v1_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_file_v1_file_proto_rawDescData) + }) + return file_file_v1_file_proto_rawDescData +} + +var file_file_v1_file_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_file_v1_file_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_file_v1_file_proto_goTypes = []interface{}{ + (FileErr)(0), // 0: file.v1.FileErr + (*CreateRequest)(nil), // 1: file.v1.CreateRequest + (*OpenRequest)(nil), // 2: file.v1.OpenRequest + (*CloseRequest)(nil), // 3: file.v1.CloseRequest + (*CreateResponse)(nil), // 4: file.v1.CreateResponse + (*OpenResponse)(nil), // 5: file.v1.OpenResponse + (*CloseResponse)(nil), // 6: file.v1.CloseResponse + (*LoadTestDataRequest)(nil), // 7: file.v1.LoadTestDataRequest + (*LoadTestDataResponse)(nil), // 8: file.v1.LoadTestDataResponse + (*ReadRequest)(nil), // 9: file.v1.ReadRequest + (*ReadResponse)(nil), // 10: file.v1.ReadResponse + (*WriteRequest)(nil), // 11: file.v1.WriteRequest + (*WriteResponse)(nil), // 12: file.v1.WriteResponse + (*DeleteRequest)(nil), // 13: file.v1.DeleteRequest + (*DeleteResponse)(nil), // 14: file.v1.DeleteResponse + (*StatRequest)(nil), // 15: file.v1.StatRequest + (*FileInfo)(nil), // 16: file.v1.FileInfo + (*StatResponse)(nil), // 17: file.v1.StatResponse + (*v1.IdRaw)(nil), // 18: protosupport.v1.IdRaw + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp +} +var file_file_v1_file_proto_depIdxs = []int32{ + 18, // 0: file.v1.CloseRequest.id:type_name -> protosupport.v1.IdRaw + 18, // 1: file.v1.CreateResponse.id:type_name -> protosupport.v1.IdRaw + 18, // 2: file.v1.OpenResponse.id:type_name -> protosupport.v1.IdRaw + 18, // 3: file.v1.CloseResponse.id:type_name -> protosupport.v1.IdRaw + 18, // 4: file.v1.ReadRequest.id:type_name -> protosupport.v1.IdRaw + 18, // 5: file.v1.ReadResponse.id:type_name -> protosupport.v1.IdRaw + 18, // 6: file.v1.WriteRequest.id:type_name -> protosupport.v1.IdRaw + 18, // 7: file.v1.WriteResponse.id:type_name -> protosupport.v1.IdRaw + 18, // 8: file.v1.DeleteResponse.id:type_name -> protosupport.v1.IdRaw + 19, // 9: file.v1.FileInfo.create_time:type_name -> google.protobuf.Timestamp + 19, // 10: file.v1.FileInfo.mod_time:type_name -> google.protobuf.Timestamp + 16, // 11: file.v1.StatResponse.file_info:type_name -> file.v1.FileInfo + 2, // 12: file.v1.File.Open:input_type -> file.v1.OpenRequest + 1, // 13: file.v1.File.Create:input_type -> file.v1.CreateRequest + 3, // 14: file.v1.File.Close:input_type -> file.v1.CloseRequest + 7, // 15: file.v1.File.LoadTestData:input_type -> file.v1.LoadTestDataRequest + 9, // 16: file.v1.File.Read:input_type -> file.v1.ReadRequest + 11, // 17: file.v1.File.Write:input_type -> file.v1.WriteRequest + 13, // 18: file.v1.File.Delete:input_type -> file.v1.DeleteRequest + 15, // 19: file.v1.File.Stat:input_type -> file.v1.StatRequest + 5, // 20: file.v1.File.Open:output_type -> file.v1.OpenResponse + 4, // 21: file.v1.File.Create:output_type -> file.v1.CreateResponse + 6, // 22: file.v1.File.Close:output_type -> file.v1.CloseResponse + 8, // 23: file.v1.File.LoadTestData:output_type -> file.v1.LoadTestDataResponse + 10, // 24: file.v1.File.Read:output_type -> file.v1.ReadResponse + 12, // 25: file.v1.File.Write:output_type -> file.v1.WriteResponse + 14, // 26: file.v1.File.Delete:output_type -> file.v1.DeleteResponse + 17, // 27: file.v1.File.Stat:output_type -> file.v1.StatResponse + 20, // [20:28] is the sub-list for method output_type + 12, // [12:20] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_file_v1_file_proto_init() } +func file_file_v1_file_proto_init() { + if File_file_v1_file_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_file_v1_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadTestDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadTestDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_file_v1_file_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatResponse); 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_file_v1_file_proto_rawDesc, + NumEnums: 1, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_file_v1_file_proto_goTypes, + DependencyIndexes: file_file_v1_file_proto_depIdxs, + EnumInfos: file_file_v1_file_proto_enumTypes, + MessageInfos: file_file_v1_file_proto_msgTypes, + }.Build() + File_file_v1_file_proto = out.File + file_file_v1_file_proto_rawDesc = nil + file_file_v1_file_proto_goTypes = nil + file_file_v1_file_proto_depIdxs = nil +} diff --git a/g/file/v1/fileid.go b/g/file/v1/fileid.go new file mode 100644 index 00000000..a6c25ac7 --- /dev/null +++ b/g/file/v1/fileid.go @@ -0,0 +1,87 @@ +package file + +// +// DO NOT EDIT. This file was machine genarted by boilerplateid for FileId +// + +import ( + + "github.com/iansmith/parigot/api/shared/id" + + protosupport "github.com/iansmith/parigot/g/protosupport/v1" +) +// +// Begin Boilerplate for File +// + +type DefFile struct{} + +func (f DefFile) ShortString() string { return "file" } +func (f DefFile) Letter() byte { return 0x66 } + +type FileId id.IdRoot[DefFile] + + +func NewFileId() FileId { + return FileId(id.NewIdRoot[DefFile]()) +} + +func (f FileId) Marshal() *protosupport.IdRaw { + raw:=&protosupport.IdRaw{} + raw.High = f.High() + raw.Low = f.Low() + return raw +} + +func FileIdZeroValue() FileId { + return FileId(id.NewIdTyped[DefFile](0xffffffffffffff,0xffffffffffffffff)) +} +func FileIdEmptyValue() FileId { + return FileId(id.NewIdTyped[DefFile](0,0)) +} + +func (f FileId) Equal(other FileId) bool{ + return id.IdRoot[DefFile](f).Equal(id.IdRoot[DefFile](other)) +} +func (f FileId) String() string{ + return id.IdRoot[DefFile](f).String() +} +func (f FileId) Short() string{ + return id.IdRoot[DefFile](f).Short() +} + +func (f FileId) IsZeroValue() bool{ + return id.IdRoot[DefFile](f).IsZeroValue() +} +func (f FileId) IsEmptyValue() bool{ + return id.IdRoot[DefFile](f).IsEmptyValue() +} +func (f FileId) IsZeroOrEmptyValue() bool{ + return id.IdRoot[DefFile](f).IsZeroOrEmptyValue() +} + +func (f FileId) High() uint64{ + return id.IdRoot[DefFile](f).High() +} +func (f FileId) Low() uint64{ + return id.IdRoot[DefFile](f).Low() +} + +func UnmarshalFileId(b *protosupport.IdRaw) FileId { + l:=b.GetLow() + h:=b.GetHigh() + return FileId(id.NewIdTyped[DefFile](h,l)) +} + +// FromPair is probably not something you want to use unless you +// are pulling values from external storage or files. If you pulling +// values from the network, use the Marshal() ad Unmarshal() +// functions to work with Ids. Absolutely no checking is done +// on the values provided, so much caution is advised. +func FileIdFromPair(high, low uint64) FileId { + return FileId(id.NewIdTyped[DefFile](high,low)) +} + +// +// End Boilerplate for File +// diff --git a/g/file/v1/fileserver.p.go b/g/file/v1/fileserver.p.go new file mode 100644 index 00000000..5d408721 --- /dev/null +++ b/g/file/v1/fileserver.p.go @@ -0,0 +1,701 @@ +//go:build wasip1 + +// Code generated by protoc-gen-parigot. DO NOT EDIT. +// source: file/v1/file.proto + +package file + + + + +import ( + "context" + "fmt" + "log" + "log/slog" + "runtime/debug" + "unsafe" + + + // this set of imports is _unrelated_ to the particulars of what the .proto imported... those are above + syscallguest "github.com/iansmith/parigot/api/guest/syscall" + "github.com/iansmith/parigot/api/shared/id" + lib "github.com/iansmith/parigot/lib/go" + "github.com/iansmith/parigot/g/syscall/v1" + "github.com/iansmith/parigot/lib/go/future" + apishared "github.com/iansmith/parigot/api/shared" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "github.com/iansmith/parigot/lib/go/client" +) +var _ = unsafe.Sizeof([]byte{}) + + +func Launch(ctx context.Context, sid id.ServiceId, impl File) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start file.v1.File, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that Init returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func Init(require []lib.MustRequireFunc, impl File) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegister() + MustExport(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchService(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call File","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func Run(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run File: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCall(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of File") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillis = int32(50) + +func ReadOneAndCall(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("File, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func bind(ctx context.Context,sid id.ServiceId, impl File) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// file.v1.File.Open +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Open" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Open", + GenerateOpenInvoker(impl)) +// +// file.v1.File.Create +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Create" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Create", + GenerateCreateInvoker(impl)) +// +// file.v1.File.Close +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Close" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Close", + GenerateCloseInvoker(impl)) +// +// file.v1.File.LoadTestData +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "LoadTestData" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","LoadTestData", + GenerateLoadTestDataInvoker(impl)) +// +// file.v1.File.Read +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Read" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Read", + GenerateReadInvoker(impl)) +// +// file.v1.File.Write +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Write" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Write", + GenerateWriteInvoker(impl)) +// +// file.v1.File.Delete +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Delete" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Delete", + GenerateDeleteInvoker(impl)) +// +// file.v1.File.Stat +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Stat" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"File","Stat", + GenerateStatInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of File. +func Locate(ctx context.Context,sid id.ServiceId) (Client,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "file.v1","file", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &Client_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocate(ctx context.Context, sid id.ServiceId) Client { + result, err:=Locate(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate file.v1.file:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func Register() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","file.v1","file") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegister() (context.Context,id.ServiceId) { + sid, err:=Register() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","file.v1","service name","file") + panic("unable to register "+"file") + } + return context.Background(), sid +} + +func MustRequire(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "file.v1","file",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","file.v1","service name","file","error",syscall.KernelErr_name[int32(err)]) + panic("require file.v1.file creates a dependency loop") + } + slog.Error("unable to require","package","file.v1","service name","file","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require file.v1.file:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExport(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"file.v1","file",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","file.v1","service name","file") + panic("not able to export file.v1.file:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchService(ctx context.Context, sid id.ServiceId, impl File) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=bind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchService(ctx context.Context, sid id.ServiceId, impl File) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchService(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// Host from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport file open_ +func Open_(int32,int32,int32,int32) int64 +func OpenHost(ctx context.Context,inPtr *OpenRequest) *FutureOpen { + outProtoPtr := (*OpenResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Open_) + f:=NewFutureOpen() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file create_ +func Create_(int32,int32,int32,int32) int64 +func CreateHost(ctx context.Context,inPtr *CreateRequest) *FutureCreate { + outProtoPtr := (*CreateResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Create_) + f:=NewFutureCreate() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file close_ +func Close_(int32,int32,int32,int32) int64 +func CloseHost(ctx context.Context,inPtr *CloseRequest) *FutureClose { + outProtoPtr := (*CloseResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Close_) + f:=NewFutureClose() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file load_test_data_ +func LoadTestData_(int32,int32,int32,int32) int64 +func LoadTestDataHost(ctx context.Context,inPtr *LoadTestDataRequest) *FutureLoadTestData { + outProtoPtr := (*LoadTestDataResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, LoadTestData_) + f:=NewFutureLoadTestData() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file read_ +func Read_(int32,int32,int32,int32) int64 +func ReadHost(ctx context.Context,inPtr *ReadRequest) *FutureRead { + outProtoPtr := (*ReadResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Read_) + f:=NewFutureRead() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file write_ +func Write_(int32,int32,int32,int32) int64 +func WriteHost(ctx context.Context,inPtr *WriteRequest) *FutureWrite { + outProtoPtr := (*WriteResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Write_) + f:=NewFutureWrite() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file delete_ +func Delete_(int32,int32,int32,int32) int64 +func DeleteHost(ctx context.Context,inPtr *DeleteRequest) *FutureDelete { + outProtoPtr := (*DeleteResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Delete_) + f:=NewFutureDelete() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport file stat_ +func Stat_(int32,int32,int32,int32) int64 +func StatHost(ctx context.Context,inPtr *StatRequest) *FutureStat { + outProtoPtr := (*StatResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Stat_) + f:=NewFutureStat() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeOpen struct { + fn func(context.Context,*OpenRequest) *FutureOpen +} + +func (t *invokeOpen) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&OpenRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateOpenInvoker(impl File) future.Invoker { + return &invokeOpen{fn:impl.Open} +} + +// This is interface for invocation. + +type invokeCreate struct { + fn func(context.Context,*CreateRequest) *FutureCreate +} + +func (t *invokeCreate) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&CreateRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateCreateInvoker(impl File) future.Invoker { + return &invokeCreate{fn:impl.Create} +} + +// This is interface for invocation. + +type invokeClose struct { + fn func(context.Context,*CloseRequest) *FutureClose +} + +func (t *invokeClose) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&CloseRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateCloseInvoker(impl File) future.Invoker { + return &invokeClose{fn:impl.Close} +} + +// This is interface for invocation. + +type invokeLoadTestData struct { + fn func(context.Context,*LoadTestDataRequest) *FutureLoadTestData +} + +func (t *invokeLoadTestData) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&LoadTestDataRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateLoadTestDataInvoker(impl File) future.Invoker { + return &invokeLoadTestData{fn:impl.LoadTestData} +} + +// This is interface for invocation. + +type invokeRead struct { + fn func(context.Context,*ReadRequest) *FutureRead +} + +func (t *invokeRead) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&ReadRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateReadInvoker(impl File) future.Invoker { + return &invokeRead{fn:impl.Read} +} + +// This is interface for invocation. + +type invokeWrite struct { + fn func(context.Context,*WriteRequest) *FutureWrite +} + +func (t *invokeWrite) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&WriteRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateWriteInvoker(impl File) future.Invoker { + return &invokeWrite{fn:impl.Write} +} + +// This is interface for invocation. + +type invokeDelete struct { + fn func(context.Context,*DeleteRequest) *FutureDelete +} + +func (t *invokeDelete) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&DeleteRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateDeleteInvoker(impl File) future.Invoker { + return &invokeDelete{fn:impl.Delete} +} + +// This is interface for invocation. + +type invokeStat struct { + fn func(context.Context,*StatRequest) *FutureStat +} + +func (t *invokeStat) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&StatRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateStatInvoker(impl File) future.Invoker { + return &invokeStat{fn:impl.Stat} +} diff --git a/g/http/v1/http.pb.go b/g/http/v1/http.pb.go new file mode 100644 index 00000000..6de9742f --- /dev/null +++ b/g/http/v1/http.pb.go @@ -0,0 +1,1593 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: http/v1/http.proto + +package http + +import ( + _ "github.com/iansmith/parigot/g/protosupport/v1" + 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 HttpErr int32 + +const ( + HttpErr_NoError HttpErr = 0 // mandatory + HttpErr_DispatchError HttpErr = 1 //mandatory + HttpErr_UnmarshalError HttpErr = 2 // mandatory + HttpErr_MarshalError HttpErr = 3 // mandatory +) + +// Enum value maps for HttpErr. +var ( + HttpErr_name = map[int32]string{ + 0: "NoError", + 1: "DispatchError", + 2: "UnmarshalError", + 3: "MarshalError", + } + HttpErr_value = map[string]int32{ + "NoError": 0, + "DispatchError": 1, + "UnmarshalError": 2, + "MarshalError": 3, + } +) + +func (x HttpErr) Enum() *HttpErr { + p := new(HttpErr) + *p = x + return p +} + +func (x HttpErr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HttpErr) Descriptor() protoreflect.EnumDescriptor { + return file_http_v1_http_proto_enumTypes[0].Descriptor() +} + +func (HttpErr) Type() protoreflect.EnumType { + return &file_http_v1_http_proto_enumTypes[0] +} + +func (x HttpErr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HttpErr.Descriptor instead. +func (HttpErr) EnumDescriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{0} +} + +// Common message for fields that are used in method requests +type HttpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Header map[string]string `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + Trailer map[string]string `protobuf:"bytes,4,rep,name=trailer,proto3" json:"trailer,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *HttpRequest) Reset() { + *x = HttpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpRequest) ProtoMessage() {} + +func (x *HttpRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_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 HttpRequest.ProtoReflect.Descriptor instead. +func (*HttpRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{0} +} + +func (x *HttpRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *HttpRequest) GetHeader() map[string]string { + if x != nil { + return x.Header + } + return nil +} + +func (x *HttpRequest) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +func (x *HttpRequest) GetTrailer() map[string]string { + if x != nil { + return x.Trailer + } + return nil +} + +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[1] + 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_http_v1_http_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 GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{1} +} + +func (x *GetRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type PostRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *PostRequest) Reset() { + *x = PostRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostRequest) ProtoMessage() {} + +func (x *PostRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_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 PostRequest.ProtoReflect.Descriptor instead. +func (*PostRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{2} +} + +func (x *PostRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type PutRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *PutRequest) Reset() { + *x = PutRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutRequest) ProtoMessage() {} + +func (x *PutRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_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 PutRequest.ProtoReflect.Descriptor instead. +func (*PutRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{3} +} + +func (x *PutRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type DeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_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 DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type HeadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *HeadRequest) Reset() { + *x = HeadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeadRequest) ProtoMessage() {} + +func (x *HeadRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[5] + 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 HeadRequest.ProtoReflect.Descriptor instead. +func (*HeadRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{5} +} + +func (x *HeadRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type OptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *OptionsRequest) Reset() { + *x = OptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OptionsRequest) ProtoMessage() {} + +func (x *OptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[6] + 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 OptionsRequest.ProtoReflect.Descriptor instead. +func (*OptionsRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{6} +} + +func (x *OptionsRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type PatchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *PatchRequest) Reset() { + *x = PatchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchRequest) ProtoMessage() {} + +func (x *PatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[7] + 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 PatchRequest.ProtoReflect.Descriptor instead. +func (*PatchRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{7} +} + +func (x *PatchRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type ConnectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *ConnectRequest) Reset() { + *x = ConnectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectRequest) ProtoMessage() {} + +func (x *ConnectRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[8] + 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 ConnectRequest.ProtoReflect.Descriptor instead. +func (*ConnectRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{8} +} + +func (x *ConnectRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +type TraceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *TraceRequest) Reset() { + *x = TraceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceRequest) ProtoMessage() {} + +func (x *TraceRequest) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[9] + 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 TraceRequest.ProtoReflect.Descriptor instead. +func (*TraceRequest) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{9} +} + +func (x *TraceRequest) GetRequest() *HttpRequest { + if x != nil { + return x.Request + } + return nil +} + +// Common message for fields that are used in method responses +type HttpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // e.g. 200 + Header map[string]string `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + ContentLength int32 `protobuf:"varint,4,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"` // Note: This could also be inferred from 'body' length. + Trailer map[string]string `protobuf:"bytes,5,rep,name=trailer,proto3" json:"trailer,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *HttpResponse) Reset() { + *x = HttpResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpResponse) ProtoMessage() {} + +func (x *HttpResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[10] + 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 HttpResponse.ProtoReflect.Descriptor instead. +func (*HttpResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{10} +} + +func (x *HttpResponse) GetStatusCode() int32 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *HttpResponse) GetHeader() map[string]string { + if x != nil { + return x.Header + } + return nil +} + +func (x *HttpResponse) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +func (x *HttpResponse) GetContentLength() int32 { + if x != nil { + return x.ContentLength + } + return 0 +} + +func (x *HttpResponse) GetTrailer() map[string]string { + if x != nil { + return x.Trailer + } + return nil +} + +type GetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[11] + 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_http_v1_http_proto_msgTypes[11] + 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_http_v1_http_proto_rawDescGZIP(), []int{11} +} + +func (x *GetResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type PostResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *PostResponse) Reset() { + *x = PostResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostResponse) ProtoMessage() {} + +func (x *PostResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[12] + 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 PostResponse.ProtoReflect.Descriptor instead. +func (*PostResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{12} +} + +func (x *PostResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type PutResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *PutResponse) Reset() { + *x = PutResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutResponse) ProtoMessage() {} + +func (x *PutResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[13] + 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 PutResponse.ProtoReflect.Descriptor instead. +func (*PutResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{13} +} + +func (x *PutResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type DeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[14] + 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 DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type HeadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *HeadResponse) Reset() { + *x = HeadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeadResponse) ProtoMessage() {} + +func (x *HeadResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[15] + 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 HeadResponse.ProtoReflect.Descriptor instead. +func (*HeadResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{15} +} + +func (x *HeadResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type OptionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *OptionsResponse) Reset() { + *x = OptionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OptionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OptionsResponse) ProtoMessage() {} + +func (x *OptionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[16] + 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 OptionsResponse.ProtoReflect.Descriptor instead. +func (*OptionsResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{16} +} + +func (x *OptionsResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type PatchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *PatchResponse) Reset() { + *x = PatchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchResponse) ProtoMessage() {} + +func (x *PatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[17] + 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 PatchResponse.ProtoReflect.Descriptor instead. +func (*PatchResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{17} +} + +func (x *PatchResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type ConnectResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *ConnectResponse) Reset() { + *x = ConnectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectResponse) ProtoMessage() {} + +func (x *ConnectResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[18] + 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 ConnectResponse.ProtoReflect.Descriptor instead. +func (*ConnectResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{18} +} + +func (x *ConnectResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +type TraceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *TraceResponse) Reset() { + *x = TraceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_http_v1_http_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceResponse) ProtoMessage() {} + +func (x *TraceResponse) ProtoReflect() protoreflect.Message { + mi := &file_http_v1_http_proto_msgTypes[19] + 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 TraceResponse.ProtoReflect.Descriptor instead. +func (*TraceResponse) Descriptor() ([]byte, []int) { + return file_http_v1_http_proto_rawDescGZIP(), []int{19} +} + +func (x *TraceResponse) GetResponse() *HttpResponse { + if x != nil { + return x.Response + } + return nil +} + +var File_http_v1_http_proto protoreflect.FileDescriptor + +var file_http_v1_http_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x12, 0x3b, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x1a, 0x39, + 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x0a, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x3f, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x3d, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x40, 0x0a, 0x0e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x0c, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x40, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0xda, 0x02, 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3c, 0x0a, 0x07, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x40, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, + 0x0c, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x44, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0d, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x0f, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x42, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x56, 0x0a, 0x07, 0x48, 0x74, 0x74, 0x70, 0x45, 0x72, 0x72, 0x12, + 0x0b, 0x0a, 0x07, 0x4e, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, + 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x10, 0x03, 0x1a, 0x05, 0xd8, 0x9e, 0x89, 0x02, 0x01, 0x32, 0xfb, 0x03, 0x0a, + 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x30, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x13, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, + 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x03, + 0x50, 0x75, 0x74, 0x12, 0x13, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x48, 0x65, 0x61, + 0x64, 0x12, 0x14, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, + 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x15, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, + 0x17, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x15, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, + 0x68, 0x2f, 0x70, 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x2f, 0x67, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x76, 0x31, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_http_v1_http_proto_rawDescOnce sync.Once + file_http_v1_http_proto_rawDescData = file_http_v1_http_proto_rawDesc +) + +func file_http_v1_http_proto_rawDescGZIP() []byte { + file_http_v1_http_proto_rawDescOnce.Do(func() { + file_http_v1_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_http_v1_http_proto_rawDescData) + }) + return file_http_v1_http_proto_rawDescData +} + +var file_http_v1_http_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_http_v1_http_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_http_v1_http_proto_goTypes = []interface{}{ + (HttpErr)(0), // 0: http.v1.HttpErr + (*HttpRequest)(nil), // 1: http.v1.HttpRequest + (*GetRequest)(nil), // 2: http.v1.GetRequest + (*PostRequest)(nil), // 3: http.v1.PostRequest + (*PutRequest)(nil), // 4: http.v1.PutRequest + (*DeleteRequest)(nil), // 5: http.v1.DeleteRequest + (*HeadRequest)(nil), // 6: http.v1.HeadRequest + (*OptionsRequest)(nil), // 7: http.v1.OptionsRequest + (*PatchRequest)(nil), // 8: http.v1.PatchRequest + (*ConnectRequest)(nil), // 9: http.v1.ConnectRequest + (*TraceRequest)(nil), // 10: http.v1.TraceRequest + (*HttpResponse)(nil), // 11: http.v1.HttpResponse + (*GetResponse)(nil), // 12: http.v1.GetResponse + (*PostResponse)(nil), // 13: http.v1.PostResponse + (*PutResponse)(nil), // 14: http.v1.PutResponse + (*DeleteResponse)(nil), // 15: http.v1.DeleteResponse + (*HeadResponse)(nil), // 16: http.v1.HeadResponse + (*OptionsResponse)(nil), // 17: http.v1.OptionsResponse + (*PatchResponse)(nil), // 18: http.v1.PatchResponse + (*ConnectResponse)(nil), // 19: http.v1.ConnectResponse + (*TraceResponse)(nil), // 20: http.v1.TraceResponse + nil, // 21: http.v1.HttpRequest.HeaderEntry + nil, // 22: http.v1.HttpRequest.TrailerEntry + nil, // 23: http.v1.HttpResponse.HeaderEntry + nil, // 24: http.v1.HttpResponse.TrailerEntry +} +var file_http_v1_http_proto_depIdxs = []int32{ + 21, // 0: http.v1.HttpRequest.header:type_name -> http.v1.HttpRequest.HeaderEntry + 22, // 1: http.v1.HttpRequest.trailer:type_name -> http.v1.HttpRequest.TrailerEntry + 1, // 2: http.v1.GetRequest.request:type_name -> http.v1.HttpRequest + 1, // 3: http.v1.PostRequest.request:type_name -> http.v1.HttpRequest + 1, // 4: http.v1.PutRequest.request:type_name -> http.v1.HttpRequest + 1, // 5: http.v1.DeleteRequest.request:type_name -> http.v1.HttpRequest + 1, // 6: http.v1.HeadRequest.request:type_name -> http.v1.HttpRequest + 1, // 7: http.v1.OptionsRequest.request:type_name -> http.v1.HttpRequest + 1, // 8: http.v1.PatchRequest.request:type_name -> http.v1.HttpRequest + 1, // 9: http.v1.ConnectRequest.request:type_name -> http.v1.HttpRequest + 1, // 10: http.v1.TraceRequest.request:type_name -> http.v1.HttpRequest + 23, // 11: http.v1.HttpResponse.header:type_name -> http.v1.HttpResponse.HeaderEntry + 24, // 12: http.v1.HttpResponse.trailer:type_name -> http.v1.HttpResponse.TrailerEntry + 11, // 13: http.v1.GetResponse.response:type_name -> http.v1.HttpResponse + 11, // 14: http.v1.PostResponse.response:type_name -> http.v1.HttpResponse + 11, // 15: http.v1.PutResponse.response:type_name -> http.v1.HttpResponse + 11, // 16: http.v1.DeleteResponse.response:type_name -> http.v1.HttpResponse + 11, // 17: http.v1.HeadResponse.response:type_name -> http.v1.HttpResponse + 11, // 18: http.v1.OptionsResponse.response:type_name -> http.v1.HttpResponse + 11, // 19: http.v1.PatchResponse.response:type_name -> http.v1.HttpResponse + 11, // 20: http.v1.ConnectResponse.response:type_name -> http.v1.HttpResponse + 11, // 21: http.v1.TraceResponse.response:type_name -> http.v1.HttpResponse + 2, // 22: http.v1.Http.Get:input_type -> http.v1.GetRequest + 3, // 23: http.v1.Http.Post:input_type -> http.v1.PostRequest + 4, // 24: http.v1.Http.Put:input_type -> http.v1.PutRequest + 5, // 25: http.v1.Http.Delete:input_type -> http.v1.DeleteRequest + 6, // 26: http.v1.Http.Head:input_type -> http.v1.HeadRequest + 7, // 27: http.v1.Http.Options:input_type -> http.v1.OptionsRequest + 8, // 28: http.v1.Http.Patch:input_type -> http.v1.PatchRequest + 9, // 29: http.v1.Http.Connect:input_type -> http.v1.ConnectRequest + 10, // 30: http.v1.Http.Trace:input_type -> http.v1.TraceRequest + 12, // 31: http.v1.Http.Get:output_type -> http.v1.GetResponse + 13, // 32: http.v1.Http.Post:output_type -> http.v1.PostResponse + 14, // 33: http.v1.Http.Put:output_type -> http.v1.PutResponse + 15, // 34: http.v1.Http.Delete:output_type -> http.v1.DeleteResponse + 16, // 35: http.v1.Http.Head:output_type -> http.v1.HeadResponse + 17, // 36: http.v1.Http.Options:output_type -> http.v1.OptionsResponse + 18, // 37: http.v1.Http.Patch:output_type -> http.v1.PatchResponse + 19, // 38: http.v1.Http.Connect:output_type -> http.v1.ConnectResponse + 20, // 39: http.v1.Http.Trace:output_type -> http.v1.TraceResponse + 31, // [31:40] is the sub-list for method output_type + 22, // [22:31] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_http_v1_http_proto_init() } +func file_http_v1_http_proto_init() { + if File_http_v1_http_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_http_v1_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TraceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OptionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_v1_http_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TraceResponse); 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_http_v1_http_proto_rawDesc, + NumEnums: 1, + NumMessages: 24, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_http_v1_http_proto_goTypes, + DependencyIndexes: file_http_v1_http_proto_depIdxs, + EnumInfos: file_http_v1_http_proto_enumTypes, + MessageInfos: file_http_v1_http_proto_msgTypes, + }.Build() + File_http_v1_http_proto = out.File + file_http_v1_http_proto_rawDesc = nil + file_http_v1_http_proto_goTypes = nil + file_http_v1_http_proto_depIdxs = nil +} diff --git a/g/http/v1/httpserver.p.go b/g/http/v1/httpserver.p.go new file mode 100644 index 00000000..cd965d64 --- /dev/null +++ b/g/http/v1/httpserver.p.go @@ -0,0 +1,749 @@ +//go:build wasip1 + +// Code generated by protoc-gen-parigot. DO NOT EDIT. +// source: http/v1/http.proto + +package http + + + + +import ( + "context" + "fmt" + "log" + "log/slog" + "runtime/debug" + "unsafe" + + + // this set of imports is _unrelated_ to the particulars of what the .proto imported... those are above + syscallguest "github.com/iansmith/parigot/api/guest/syscall" + "github.com/iansmith/parigot/api/shared/id" + lib "github.com/iansmith/parigot/lib/go" + "github.com/iansmith/parigot/g/syscall/v1" + "github.com/iansmith/parigot/lib/go/future" + apishared "github.com/iansmith/parigot/api/shared" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "github.com/iansmith/parigot/lib/go/client" +) +var _ = unsafe.Sizeof([]byte{}) + + +func Launch(ctx context.Context, sid id.ServiceId, impl Http) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start http.v1.Http, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that Init returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func Init(require []lib.MustRequireFunc, impl Http) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegister() + MustExport(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchService(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call Http","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func Run(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run Http: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCall(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of Http") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillis = int32(50) + +func ReadOneAndCall(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("Http, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func bind(ctx context.Context,sid id.ServiceId, impl Http) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// http.v1.Http.Get +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Get" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Get", + GenerateGetInvoker(impl)) +// +// http.v1.Http.Post +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Post" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Post", + GeneratePostInvoker(impl)) +// +// http.v1.Http.Put +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Put" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Put", + GeneratePutInvoker(impl)) +// +// http.v1.Http.Delete +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Delete" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Delete", + GenerateDeleteInvoker(impl)) +// +// http.v1.Http.Head +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Head" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Head", + GenerateHeadInvoker(impl)) +// +// http.v1.Http.Options +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Options" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Options", + GenerateOptionsInvoker(impl)) +// +// http.v1.Http.Patch +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Patch" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Patch", + GeneratePatchInvoker(impl)) +// +// http.v1.Http.Connect +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Connect" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Connect", + GenerateConnectInvoker(impl)) +// +// http.v1.Http.Trace +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Trace" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Http","Trace", + GenerateTraceInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of Http. +func Locate(ctx context.Context,sid id.ServiceId) (Client,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "http.v1","http", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &Client_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocate(ctx context.Context, sid id.ServiceId) Client { + result, err:=Locate(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate http.v1.http:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func Register() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","http.v1","http") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegister() (context.Context,id.ServiceId) { + sid, err:=Register() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","http.v1","service name","http") + panic("unable to register "+"http") + } + return context.Background(), sid +} + +func MustRequire(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "http.v1","http",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","http.v1","service name","http","error",syscall.KernelErr_name[int32(err)]) + panic("require http.v1.http creates a dependency loop") + } + slog.Error("unable to require","package","http.v1","service name","http","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require http.v1.http:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExport(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"http.v1","http",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","http.v1","service name","http") + panic("not able to export http.v1.http:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchService(ctx context.Context, sid id.ServiceId, impl Http) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=bind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchService(ctx context.Context, sid id.ServiceId, impl Http) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchService(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// Host from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport http get_ +func Get_(int32,int32,int32,int32) int64 +func GetHost(ctx context.Context,inPtr *GetRequest) *FutureGet { + outProtoPtr := (*GetResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Get_) + f:=NewFutureGet() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http post_ +func Post_(int32,int32,int32,int32) int64 +func PostHost(ctx context.Context,inPtr *PostRequest) *FuturePost { + outProtoPtr := (*PostResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Post_) + f:=NewFuturePost() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http put_ +func Put_(int32,int32,int32,int32) int64 +func PutHost(ctx context.Context,inPtr *PutRequest) *FuturePut { + outProtoPtr := (*PutResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Put_) + f:=NewFuturePut() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http delete_ +func Delete_(int32,int32,int32,int32) int64 +func DeleteHost(ctx context.Context,inPtr *DeleteRequest) *FutureDelete { + outProtoPtr := (*DeleteResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Delete_) + f:=NewFutureDelete() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http head_ +func Head_(int32,int32,int32,int32) int64 +func HeadHost(ctx context.Context,inPtr *HeadRequest) *FutureHead { + outProtoPtr := (*HeadResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Head_) + f:=NewFutureHead() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http options_ +func Options_(int32,int32,int32,int32) int64 +func OptionsHost(ctx context.Context,inPtr *OptionsRequest) *FutureOptions { + outProtoPtr := (*OptionsResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Options_) + f:=NewFutureOptions() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http patch_ +func Patch_(int32,int32,int32,int32) int64 +func PatchHost(ctx context.Context,inPtr *PatchRequest) *FuturePatch { + outProtoPtr := (*PatchResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Patch_) + f:=NewFuturePatch() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http connect_ +func Connect_(int32,int32,int32,int32) int64 +func ConnectHost(ctx context.Context,inPtr *ConnectRequest) *FutureConnect { + outProtoPtr := (*ConnectResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Connect_) + f:=NewFutureConnect() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport http trace_ +func Trace_(int32,int32,int32,int32) int64 +func TraceHost(ctx context.Context,inPtr *TraceRequest) *FutureTrace { + outProtoPtr := (*TraceResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Trace_) + f:=NewFutureTrace() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeGet struct { + fn func(context.Context,*GetRequest) *FutureGet +} + +func (t *invokeGet) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&GetRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateGetInvoker(impl Http) future.Invoker { + return &invokeGet{fn:impl.Get} +} + +// This is interface for invocation. + +type invokePost struct { + fn func(context.Context,*PostRequest) *FuturePost +} + +func (t *invokePost) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&PostRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GeneratePostInvoker(impl Http) future.Invoker { + return &invokePost{fn:impl.Post} +} + +// This is interface for invocation. + +type invokePut struct { + fn func(context.Context,*PutRequest) *FuturePut +} + +func (t *invokePut) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&PutRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GeneratePutInvoker(impl Http) future.Invoker { + return &invokePut{fn:impl.Put} +} + +// This is interface for invocation. + +type invokeDelete struct { + fn func(context.Context,*DeleteRequest) *FutureDelete +} + +func (t *invokeDelete) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&DeleteRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateDeleteInvoker(impl Http) future.Invoker { + return &invokeDelete{fn:impl.Delete} +} + +// This is interface for invocation. + +type invokeHead struct { + fn func(context.Context,*HeadRequest) *FutureHead +} + +func (t *invokeHead) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&HeadRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateHeadInvoker(impl Http) future.Invoker { + return &invokeHead{fn:impl.Head} +} + +// This is interface for invocation. + +type invokeOptions struct { + fn func(context.Context,*OptionsRequest) *FutureOptions +} + +func (t *invokeOptions) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&OptionsRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateOptionsInvoker(impl Http) future.Invoker { + return &invokeOptions{fn:impl.Options} +} + +// This is interface for invocation. + +type invokePatch struct { + fn func(context.Context,*PatchRequest) *FuturePatch +} + +func (t *invokePatch) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&PatchRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GeneratePatchInvoker(impl Http) future.Invoker { + return &invokePatch{fn:impl.Patch} +} + +// This is interface for invocation. + +type invokeConnect struct { + fn func(context.Context,*ConnectRequest) *FutureConnect +} + +func (t *invokeConnect) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&ConnectRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateConnectInvoker(impl Http) future.Invoker { + return &invokeConnect{fn:impl.Connect} +} + +// This is interface for invocation. + +type invokeTrace struct { + fn func(context.Context,*TraceRequest) *FutureTrace +} + +func (t *invokeTrace) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&TraceRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateTraceInvoker(impl Http) future.Invoker { + return &invokeTrace{fn:impl.Trace} +} diff --git a/g/httpconnector/v1/httpconnector.pb.go b/g/httpconnector/v1/httpconnector.pb.go new file mode 100644 index 00000000..95389579 --- /dev/null +++ b/g/httpconnector/v1/httpconnector.pb.go @@ -0,0 +1,501 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: httpconnector/v1/httpconnector.proto + +package httpconnector + +import ( + v1 "github.com/iansmith/parigot/g/protosupport/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + 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 HttpConnectorErr int32 + +const ( + HttpConnectorErr_NoError HttpConnectorErr = 0 // mandatory + HttpConnectorErr_DispatchError HttpConnectorErr = 1 //mandatory + HttpConnectorErr_UnmarshalError HttpConnectorErr = 2 // mandatory + HttpConnectorErr_MarshalError HttpConnectorErr = 3 // mandatory + HttpConnectorErr_InternalError HttpConnectorErr = 4 // There are internal issues with the httpconnector service + HttpConnectorErr_NoReceiver HttpConnectorErr = 5 // We could not find any service that implements HttpConnector + HttpConnectorErr_ReceiverFailed HttpConnectorErr = 6 // We attempted to call the receiver, but got a failure back +) + +// Enum value maps for HttpConnectorErr. +var ( + HttpConnectorErr_name = map[int32]string{ + 0: "NoError", + 1: "DispatchError", + 2: "UnmarshalError", + 3: "MarshalError", + 4: "InternalError", + 5: "NoReceiver", + 6: "ReceiverFailed", + } + HttpConnectorErr_value = map[string]int32{ + "NoError": 0, + "DispatchError": 1, + "UnmarshalError": 2, + "MarshalError": 3, + "InternalError": 4, + "NoReceiver": 5, + "ReceiverFailed": 6, + } +) + +func (x HttpConnectorErr) Enum() *HttpConnectorErr { + p := new(HttpConnectorErr) + *p = x + return p +} + +func (x HttpConnectorErr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HttpConnectorErr) Descriptor() protoreflect.EnumDescriptor { + return file_httpconnector_v1_httpconnector_proto_enumTypes[0].Descriptor() +} + +func (HttpConnectorErr) Type() protoreflect.EnumType { + return &file_httpconnector_v1_httpconnector_proto_enumTypes[0] +} + +func (x HttpConnectorErr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HttpConnectorErr.Descriptor instead. +func (HttpConnectorErr) EnumDescriptor() ([]byte, []int) { + return file_httpconnector_v1_httpconnector_proto_rawDescGZIP(), []int{0} +} + +type HandleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HttpMethod string `protobuf:"bytes,1,opt,name=http_method,json=httpMethod,proto3" json:"http_method,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + ServiceId *v1.IdRaw `protobuf:"bytes,3,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + MethodId *v1.IdRaw `protobuf:"bytes,4,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` + ReqAny *anypb.Any `protobuf:"bytes,5,opt,name=req_any,json=reqAny,proto3" json:"req_any,omitempty"` +} + +func (x *HandleRequest) Reset() { + *x = HandleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_httpconnector_v1_httpconnector_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandleRequest) ProtoMessage() {} + +func (x *HandleRequest) ProtoReflect() protoreflect.Message { + mi := &file_httpconnector_v1_httpconnector_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 HandleRequest.ProtoReflect.Descriptor instead. +func (*HandleRequest) Descriptor() ([]byte, []int) { + return file_httpconnector_v1_httpconnector_proto_rawDescGZIP(), []int{0} +} + +func (x *HandleRequest) GetHttpMethod() string { + if x != nil { + return x.HttpMethod + } + return "" +} + +func (x *HandleRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *HandleRequest) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *HandleRequest) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +func (x *HandleRequest) GetReqAny() *anypb.Any { + if x != nil { + return x.ReqAny + } + return nil +} + +type HandleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HttpStatus int32 `protobuf:"varint,1,opt,name=http_status,json=httpStatus,proto3" json:"http_status,omitempty"` + HttpResponse []byte `protobuf:"bytes,2,opt,name=http_response,json=httpResponse,proto3" json:"http_response,omitempty"` + Header map[string]string `protobuf:"bytes,3,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *HandleResponse) Reset() { + *x = HandleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_httpconnector_v1_httpconnector_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandleResponse) ProtoMessage() {} + +func (x *HandleResponse) ProtoReflect() protoreflect.Message { + mi := &file_httpconnector_v1_httpconnector_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 HandleResponse.ProtoReflect.Descriptor instead. +func (*HandleResponse) Descriptor() ([]byte, []int) { + return file_httpconnector_v1_httpconnector_proto_rawDescGZIP(), []int{1} +} + +func (x *HandleResponse) GetHttpStatus() int32 { + if x != nil { + return x.HttpStatus + } + return 0 +} + +func (x *HandleResponse) GetHttpResponse() []byte { + if x != nil { + return x.HttpResponse + } + return nil +} + +func (x *HandleResponse) GetHeader() map[string]string { + if x != nil { + return x.Header + } + return nil +} + +type CheckRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *CheckRequest) Reset() { + *x = CheckRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_httpconnector_v1_httpconnector_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckRequest) ProtoMessage() {} + +func (x *CheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_httpconnector_v1_httpconnector_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 CheckRequest.ProtoReflect.Descriptor instead. +func (*CheckRequest) Descriptor() ([]byte, []int) { + return file_httpconnector_v1_httpconnector_proto_rawDescGZIP(), []int{2} +} + +func (x *CheckRequest) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type CheckResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether receive a http request from outside + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *CheckResponse) Reset() { + *x = CheckResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_httpconnector_v1_httpconnector_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckResponse) ProtoMessage() {} + +func (x *CheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_httpconnector_v1_httpconnector_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 CheckResponse.ProtoReflect.Descriptor instead. +func (*CheckResponse) Descriptor() ([]byte, []int) { + return file_httpconnector_v1_httpconnector_proto_rawDescGZIP(), []int{3} +} + +func (x *CheckResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +var File_httpconnector_v1_httpconnector_proto protoreflect.FileDescriptor + +var file_httpconnector_v1_httpconnector_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x68, 0x74, 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x68, 0x74, 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x35, 0x0a, 0x0a, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x5f, + 0x61, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x06, 0x72, 0x65, 0x71, 0x41, 0x6e, 0x79, 0x22, 0xd7, 0x01, 0x0a, 0x0e, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x44, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x29, 0x0a, 0x0d, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2a, 0x96, 0x01, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x4e, + 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x55, + 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, + 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x72, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x06, 0x1a, 0x05, 0xd8, 0x9e, 0x89, 0x02, 0x01, 0x32, + 0x5c, 0x0a, 0x0d, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x12, 0x4b, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3e, 0x5a, + 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x61, 0x6e, 0x73, + 0x6d, 0x69, 0x74, 0x68, 0x2f, 0x70, 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x2f, 0x67, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, + 0x68, 0x74, 0x74, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_httpconnector_v1_httpconnector_proto_rawDescOnce sync.Once + file_httpconnector_v1_httpconnector_proto_rawDescData = file_httpconnector_v1_httpconnector_proto_rawDesc +) + +func file_httpconnector_v1_httpconnector_proto_rawDescGZIP() []byte { + file_httpconnector_v1_httpconnector_proto_rawDescOnce.Do(func() { + file_httpconnector_v1_httpconnector_proto_rawDescData = protoimpl.X.CompressGZIP(file_httpconnector_v1_httpconnector_proto_rawDescData) + }) + return file_httpconnector_v1_httpconnector_proto_rawDescData +} + +var file_httpconnector_v1_httpconnector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_httpconnector_v1_httpconnector_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_httpconnector_v1_httpconnector_proto_goTypes = []interface{}{ + (HttpConnectorErr)(0), // 0: httpconnector.v1.HttpConnectorErr + (*HandleRequest)(nil), // 1: httpconnector.v1.HandleRequest + (*HandleResponse)(nil), // 2: httpconnector.v1.HandleResponse + (*CheckRequest)(nil), // 3: httpconnector.v1.CheckRequest + (*CheckResponse)(nil), // 4: httpconnector.v1.CheckResponse + nil, // 5: httpconnector.v1.HandleResponse.HeaderEntry + (*v1.IdRaw)(nil), // 6: protosupport.v1.IdRaw + (*anypb.Any)(nil), // 7: google.protobuf.Any +} +var file_httpconnector_v1_httpconnector_proto_depIdxs = []int32{ + 6, // 0: httpconnector.v1.HandleRequest.service_id:type_name -> protosupport.v1.IdRaw + 6, // 1: httpconnector.v1.HandleRequest.method_id:type_name -> protosupport.v1.IdRaw + 7, // 2: httpconnector.v1.HandleRequest.req_any:type_name -> google.protobuf.Any + 5, // 3: httpconnector.v1.HandleResponse.header:type_name -> httpconnector.v1.HandleResponse.HeaderEntry + 1, // 4: httpconnector.v1.HttpConnector.Handle:input_type -> httpconnector.v1.HandleRequest + 2, // 5: httpconnector.v1.HttpConnector.Handle:output_type -> httpconnector.v1.HandleResponse + 5, // [5:6] is the sub-list for method output_type + 4, // [4:5] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_httpconnector_v1_httpconnector_proto_init() } +func file_httpconnector_v1_httpconnector_proto_init() { + if File_httpconnector_v1_httpconnector_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_httpconnector_v1_httpconnector_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_httpconnector_v1_httpconnector_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_httpconnector_v1_httpconnector_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_httpconnector_v1_httpconnector_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckResponse); 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_httpconnector_v1_httpconnector_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_httpconnector_v1_httpconnector_proto_goTypes, + DependencyIndexes: file_httpconnector_v1_httpconnector_proto_depIdxs, + EnumInfos: file_httpconnector_v1_httpconnector_proto_enumTypes, + MessageInfos: file_httpconnector_v1_httpconnector_proto_msgTypes, + }.Build() + File_httpconnector_v1_httpconnector_proto = out.File + file_httpconnector_v1_httpconnector_proto_rawDesc = nil + file_httpconnector_v1_httpconnector_proto_goTypes = nil + file_httpconnector_v1_httpconnector_proto_depIdxs = nil +} diff --git a/g/httpconnector/v1/httpconnectorserver.p.go b/g/httpconnector/v1/httpconnectorserver.p.go new file mode 100644 index 00000000..631d50ab --- /dev/null +++ b/g/httpconnector/v1/httpconnectorserver.p.go @@ -0,0 +1,365 @@ +//go:build wasip1 + +// Code generated by protoc-gen-parigot. DO NOT EDIT. +// source: httpconnector/v1/httpconnector.proto + +package httpconnector + + + + +import ( + "context" + "fmt" + "log" + "log/slog" + "runtime/debug" + "unsafe" + + + // this set of imports is _unrelated_ to the particulars of what the .proto imported... those are above + syscallguest "github.com/iansmith/parigot/api/guest/syscall" + "github.com/iansmith/parigot/api/shared/id" + lib "github.com/iansmith/parigot/lib/go" + "github.com/iansmith/parigot/g/syscall/v1" + "github.com/iansmith/parigot/lib/go/future" + apishared "github.com/iansmith/parigot/api/shared" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "github.com/iansmith/parigot/lib/go/client" +) +var _ = unsafe.Sizeof([]byte{}) + + +func Launch(ctx context.Context, sid id.ServiceId, impl HttpConnector) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start httpconnector.v1.HttpConnector, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that Init returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func Init(require []lib.MustRequireFunc, impl HttpConnector) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegister() + MustExport(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchService(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call HttpConnector","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func Run(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run HttpConnector: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCall(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of HttpConnector") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillis = int32(50) + +func ReadOneAndCall(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("HttpConnector, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func bind(ctx context.Context,sid id.ServiceId, impl HttpConnector) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// httpconnector.v1.HttpConnector.Handle +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Handle" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"HttpConnector","Handle", + GenerateHandleInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of HttpConnector. +func Locate(ctx context.Context,sid id.ServiceId) (Client,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "httpconnector.v1","http_connector", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &Client_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocate(ctx context.Context, sid id.ServiceId) Client { + result, err:=Locate(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate httpconnector.v1.http_connector:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func Register() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","httpconnector.v1","http_connector") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegister() (context.Context,id.ServiceId) { + sid, err:=Register() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","httpconnector.v1","service name","http_connector") + panic("unable to register "+"http_connector") + } + return context.Background(), sid +} + +func MustRequire(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "httpconnector.v1","http_connector",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","httpconnector.v1","service name","http_connector","error",syscall.KernelErr_name[int32(err)]) + panic("require httpconnector.v1.http_connector creates a dependency loop") + } + slog.Error("unable to require","package","httpconnector.v1","service name","http_connector","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require httpconnector.v1.http_connector:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExport(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"httpconnector.v1","http_connector",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","httpconnector.v1","service name","http_connector") + panic("not able to export httpconnector.v1.http_connector:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchService(ctx context.Context, sid id.ServiceId, impl HttpConnector) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=bind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchService(ctx context.Context, sid id.ServiceId, impl HttpConnector) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchService(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// Host from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport httpconnector handle_ +func Handle_(int32,int32,int32,int32) int64 +func HandleHost(ctx context.Context,inPtr *HandleRequest) *FutureHandle { + outProtoPtr := (*HandleResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Handle_) + f:=NewFutureHandle() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeHandle struct { + fn func(context.Context,*HandleRequest) *FutureHandle +} + +func (t *invokeHandle) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&HandleRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateHandleInvoker(impl HttpConnector) future.Invoker { + return &invokeHandle{fn:impl.Handle} +} diff --git a/g/protosupport/v1/protosupport.pb.go b/g/protosupport/v1/protosupport.pb.go new file mode 100644 index 00000000..dd05b176 --- /dev/null +++ b/g/protosupport/v1/protosupport.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: protosupport/v1/protosupport.proto + +package protosupport + +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 IdRaw struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + High uint64 `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"` + Low uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"` +} + +func (x *IdRaw) Reset() { + *x = IdRaw{} + if protoimpl.UnsafeEnabled { + mi := &file_protosupport_v1_protosupport_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdRaw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdRaw) ProtoMessage() {} + +func (x *IdRaw) ProtoReflect() protoreflect.Message { + mi := &file_protosupport_v1_protosupport_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 IdRaw.ProtoReflect.Descriptor instead. +func (*IdRaw) Descriptor() ([]byte, []int) { + return file_protosupport_v1_protosupport_proto_rawDescGZIP(), []int{0} +} + +func (x *IdRaw) GetHigh() uint64 { + if x != nil { + return x.High + } + return 0 +} + +func (x *IdRaw) GetLow() uint64 { + if x != nil { + return x.Low + } + return 0 +} + +var file_protosupport_v1_protosupport_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 543211, + Name: "protosupport.v1.parigot_error", + Tag: "varint,543211,opt,name=parigot_error", + Filename: "protosupport/v1/protosupport.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 543212, + Name: "protosupport.v1.host_func_name", + Tag: "bytes,543212,opt,name=host_func_name", + Filename: "protosupport/v1/protosupport.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 543214, + Name: "protosupport.v1.is_reverse_api", + Tag: "varint,543214,opt,name=is_reverse_api", + Filename: "protosupport/v1/protosupport.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 543213, + Name: "protosupport.v1.error_id_name", + Tag: "bytes,543213,opt,name=error_id_name", + Filename: "protosupport/v1/protosupport.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 543215, + Name: "protosupport.v1.implements_reverse_api", + Tag: "bytes,543215,opt,name=implements_reverse_api", + Filename: "protosupport/v1/protosupport.proto", + }, +} + +// Extension fields to descriptorpb.EnumOptions. +var ( + // optional bool parigot_error = 543211; + E_ParigotError = &file_protosupport_v1_protosupport_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // optional string host_func_name = 543212; + E_HostFuncName = &file_protosupport_v1_protosupport_proto_extTypes[1] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // optional bool is_reverse_api = 543214; + E_IsReverseApi = &file_protosupport_v1_protosupport_proto_extTypes[2] + // optional string error_id_name = 543213; + E_ErrorIdName = &file_protosupport_v1_protosupport_proto_extTypes[3] + // optional string implements_reverse_api = 543215; + E_ImplementsReverseApi = &file_protosupport_v1_protosupport_proto_extTypes[4] +) + +var File_protosupport_v1_protosupport_proto protoreflect.FileDescriptor + +var file_protosupport_v1_protosupport_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x76, 0x31, 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, 0x2d, 0x0a, 0x05, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x68, 0x69, 0x67, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x3a, 0x43, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x69, 0x67, 0x6f, + 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xeb, 0x93, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, + 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x46, 0x0a, 0x0e, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 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, 0xec, 0x93, + 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x4e, + 0x61, 0x6d, 0x65, 0x3a, 0x47, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x5f, 0x61, 0x70, 0x69, 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, 0xee, 0x93, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x69, 0x73, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x41, 0x70, 0x69, 0x3a, 0x45, 0x0a, 0x0d, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 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, 0xed, + 0x93, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x3a, 0x57, 0x0a, 0x16, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x61, 0x70, 0x69, 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, 0xef, + 0x93, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x41, 0x70, 0x69, 0x42, 0x3c, 0x5a, 0x3a, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x61, 0x6e, 0x73, 0x6d, + 0x69, 0x74, 0x68, 0x2f, 0x70, 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x2f, 0x67, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_protosupport_v1_protosupport_proto_rawDescOnce sync.Once + file_protosupport_v1_protosupport_proto_rawDescData = file_protosupport_v1_protosupport_proto_rawDesc +) + +func file_protosupport_v1_protosupport_proto_rawDescGZIP() []byte { + file_protosupport_v1_protosupport_proto_rawDescOnce.Do(func() { + file_protosupport_v1_protosupport_proto_rawDescData = protoimpl.X.CompressGZIP(file_protosupport_v1_protosupport_proto_rawDescData) + }) + return file_protosupport_v1_protosupport_proto_rawDescData +} + +var file_protosupport_v1_protosupport_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_protosupport_v1_protosupport_proto_goTypes = []interface{}{ + (*IdRaw)(nil), // 0: protosupport.v1.IdRaw + (*descriptorpb.EnumOptions)(nil), // 1: google.protobuf.EnumOptions + (*descriptorpb.MethodOptions)(nil), // 2: google.protobuf.MethodOptions + (*descriptorpb.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions +} +var file_protosupport_v1_protosupport_proto_depIdxs = []int32{ + 1, // 0: protosupport.v1.parigot_error:extendee -> google.protobuf.EnumOptions + 2, // 1: protosupport.v1.host_func_name:extendee -> google.protobuf.MethodOptions + 3, // 2: protosupport.v1.is_reverse_api:extendee -> google.protobuf.ServiceOptions + 3, // 3: protosupport.v1.error_id_name:extendee -> google.protobuf.ServiceOptions + 3, // 4: protosupport.v1.implements_reverse_api:extendee -> google.protobuf.ServiceOptions + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 0, // [0:5] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_protosupport_v1_protosupport_proto_init() } +func file_protosupport_v1_protosupport_proto_init() { + if File_protosupport_v1_protosupport_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_protosupport_v1_protosupport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdRaw); 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_protosupport_v1_protosupport_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 5, + NumServices: 0, + }, + GoTypes: file_protosupport_v1_protosupport_proto_goTypes, + DependencyIndexes: file_protosupport_v1_protosupport_proto_depIdxs, + MessageInfos: file_protosupport_v1_protosupport_proto_msgTypes, + ExtensionInfos: file_protosupport_v1_protosupport_proto_extTypes, + }.Build() + File_protosupport_v1_protosupport_proto = out.File + file_protosupport_v1_protosupport_proto_rawDesc = nil + file_protosupport_v1_protosupport_proto_goTypes = nil + file_protosupport_v1_protosupport_proto_depIdxs = nil +} diff --git a/g/queue/v1/queue.pb.go b/g/queue/v1/queue.pb.go new file mode 100644 index 00000000..ea474f9b --- /dev/null +++ b/g/queue/v1/queue.pb.go @@ -0,0 +1,1406 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: queue/v1/queue.proto + +package queue + +import ( + v1 "github.com/iansmith/parigot/g/protosupport/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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 QueueErr int32 + +const ( + QueueErr_NoError QueueErr = 0 // mandatory + QueueErr_DispatchError QueueErr = 1 // mandatory + QueueErr_UnmarshalError QueueErr = 2 //mandatory + QueueErr_MarshalError QueueErr = 3 //mandatory + // InvalidName means that the given queue name is a not a valid + // identifier. Identifiers must contain only ascii alphanumeric characters + // and the symbols ".", ",","_" and "-". The first letter of a queue name + // must be an alphabetic character. + QueueErr_InvalidName QueueErr = 4 + // InternalError means that the queue's implementation (not the values) + // passed to it) is the problem. This is roughly a 500 not a 401. + // This is usually caused by a problem with the internal + // database used to store the queue items. + QueueErr_InternalError QueueErr = 5 + // NoPayload is an error that means that an attempt was made to create + // a message a nil payload. Payloads are mandatory and senders are optional. + QueueErr_NoPayload QueueErr = 6 + // NotFound means that the Queue name requested could not be found. + // This the queue equivalent of 404. + QueueErr_NotFound QueueErr = 7 + // AlreadyExists means that the Queue name is already in use. + QueueErr_AlreadyExists QueueErr = 8 + // Unmarshal error means that we could not use the protobuf + // unmarshal successfully for a payload or sender. + QueueErr_UnmarshalFailed QueueErr = 9 +) + +// Enum value maps for QueueErr. +var ( + QueueErr_name = map[int32]string{ + 0: "NoError", + 1: "DispatchError", + 2: "UnmarshalError", + 3: "MarshalError", + 4: "InvalidName", + 5: "InternalError", + 6: "NoPayload", + 7: "NotFound", + 8: "AlreadyExists", + 9: "UnmarshalFailed", + } + QueueErr_value = map[string]int32{ + "NoError": 0, + "DispatchError": 1, + "UnmarshalError": 2, + "MarshalError": 3, + "InvalidName": 4, + "InternalError": 5, + "NoPayload": 6, + "NotFound": 7, + "AlreadyExists": 8, + "UnmarshalFailed": 9, + } +) + +func (x QueueErr) Enum() *QueueErr { + p := new(QueueErr) + *p = x + return p +} + +func (x QueueErr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueueErr) Descriptor() protoreflect.EnumDescriptor { + return file_queue_v1_queue_proto_enumTypes[0].Descriptor() +} + +func (QueueErr) Type() protoreflect.EnumType { + return &file_queue_v1_queue_proto_enumTypes[0] +} + +func (x QueueErr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueueErr.Descriptor instead. +func (QueueErr) EnumDescriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{0} +} + +// Create creates a queue or returns an error. Note that this is usually used +// only once to set up the operating environment. +type CreateQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"` +} + +func (x *CreateQueueRequest) Reset() { + *x = CreateQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateQueueRequest) ProtoMessage() {} + +func (x *CreateQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_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 CreateQueueRequest.ProtoReflect.Descriptor instead. +func (*CreateQueueRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateQueueRequest) GetQueueName() string { + if x != nil { + return x.QueueName + } + return "" +} + +// CreateQueueResponse returns the queue just created. +// Errors are passed back out of band. +type CreateQueueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CreateQueueResponse) Reset() { + *x = CreateQueueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateQueueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateQueueResponse) ProtoMessage() {} + +func (x *CreateQueueResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_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 CreateQueueResponse.ProtoReflect.Descriptor instead. +func (*CreateQueueResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateQueueResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// LocateRequest is request to access a given queue. +type LocateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"` +} + +func (x *LocateRequest) Reset() { + *x = LocateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocateRequest) ProtoMessage() {} + +func (x *LocateRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_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 LocateRequest.ProtoReflect.Descriptor instead. +func (*LocateRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{2} +} + +func (x *LocateRequest) GetQueueName() string { + if x != nil { + return x.QueueName + } + return "" +} + +// LocateResponse returns the queue id corresponding to the name +// provided. It returns errors out of band. +type LocateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *LocateResponse) Reset() { + *x = LocateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocateResponse) ProtoMessage() {} + +func (x *LocateResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_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 LocateResponse.ProtoReflect.Descriptor instead. +func (*LocateResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{3} +} + +func (x *LocateResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// Delete queue deletes a queue and returns the queue id deleted, or sends +// an error out of band. +type DeleteQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteQueueRequest) Reset() { + *x = DeleteQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQueueRequest) ProtoMessage() {} + +func (x *DeleteQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_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 DeleteQueueRequest.ProtoReflect.Descriptor instead. +func (*DeleteQueueRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteQueueRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// DeleteQueueResponse returns the (now invalid) queue id of what +// was just deleted. +type DeleteQueueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteQueueResponse) Reset() { + *x = DeleteQueueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQueueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQueueResponse) ProtoMessage() {} + +func (x *DeleteQueueResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[5] + 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 DeleteQueueResponse.ProtoReflect.Descriptor instead. +func (*DeleteQueueResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteQueueResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// Receive pulls the available messages from the queue and returns +// them. Note that if multiple copies of the caller exist, the +// caller must be prepared to receive the same message multiple +// times. +type ReceiveRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // it is expected that you can process all received messages inside the time limit + MessageLimit int32 `protobuf:"varint,2,opt,name=message_limit,json=messageLimit,proto3" json:"message_limit,omitempty"` // 1 is usually the right choice here +} + +func (x *ReceiveRequest) Reset() { + *x = ReceiveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReceiveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReceiveRequest) ProtoMessage() {} + +func (x *ReceiveRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[6] + 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 ReceiveRequest.ProtoReflect.Descriptor instead. +func (*ReceiveRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{6} +} + +func (x *ReceiveRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *ReceiveRequest) GetMessageLimit() int32 { + if x != nil { + return x.MessageLimit + } + return 0 +} + +// Receive response hands the caller a list of messages to +// process. If you need to return an error, do so out of band. +type ReceiveResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Message []*QueueMsg `protobuf:"bytes,2,rep,name=message,proto3" json:"message,omitempty"` +} + +func (x *ReceiveResponse) Reset() { + *x = ReceiveResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReceiveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReceiveResponse) ProtoMessage() {} + +func (x *ReceiveResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[7] + 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 ReceiveResponse.ProtoReflect.Descriptor instead. +func (*ReceiveResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{7} +} + +func (x *ReceiveResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *ReceiveResponse) GetMessage() []*QueueMsg { + if x != nil { + return x.Message + } + return nil +} + +// QueueMsg represents an object returned by a call to Receive. +type QueueMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + MsgId *v1.IdRaw `protobuf:"bytes,2,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` + // ReceiveCount is an approximation of the number of times + // this messages has been delivered before this delivery. + ReceiveCount int32 `protobuf:"varint,3,opt,name=receive_count,json=receiveCount,proto3" json:"receive_count,omitempty"` + // ReceiveTime is an approximation to the first time the message was received. + // If the message has never been received before, this will be the zero value. + Received *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=received,proto3" json:"received,omitempty"` + // sender may be any type (or nil) at the discretion of sender + Sender *anypb.Any `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` + // when the message was sent + Sent *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=sent,proto3" json:"sent,omitempty"` + // payload must be a serialized protobuf object + Payload *anypb.Any `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *QueueMsg) Reset() { + *x = QueueMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueueMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueueMsg) ProtoMessage() {} + +func (x *QueueMsg) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[8] + 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 QueueMsg.ProtoReflect.Descriptor instead. +func (*QueueMsg) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{8} +} + +func (x *QueueMsg) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *QueueMsg) GetMsgId() *v1.IdRaw { + if x != nil { + return x.MsgId + } + return nil +} + +func (x *QueueMsg) GetReceiveCount() int32 { + if x != nil { + return x.ReceiveCount + } + return 0 +} + +func (x *QueueMsg) GetReceived() *timestamppb.Timestamp { + if x != nil { + return x.Received + } + return nil +} + +func (x *QueueMsg) GetSender() *anypb.Any { + if x != nil { + return x.Sender + } + return nil +} + +func (x *QueueMsg) GetSent() *timestamppb.Timestamp { + if x != nil { + return x.Sent + } + return nil +} + +func (x *QueueMsg) GetPayload() *anypb.Any { + if x != nil { + return x.Payload + } + return nil +} + +// MarkDone request indicates that the caller has finished processing +// each message in +type MarkDoneRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Msg []*v1.IdRaw `protobuf:"bytes,2,rep,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *MarkDoneRequest) Reset() { + *x = MarkDoneRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarkDoneRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkDoneRequest) ProtoMessage() {} + +func (x *MarkDoneRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[9] + 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 MarkDoneRequest.ProtoReflect.Descriptor instead. +func (*MarkDoneRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{9} +} + +func (x *MarkDoneRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *MarkDoneRequest) GetMsg() []*v1.IdRaw { + if x != nil { + return x.Msg + } + return nil +} + +// MarkDone returns the list of unmodified (not marked done) messages +// remaining. In the normal case, this will be empty. If there was an error +// trying to mark items as done, it returns the error and +// puts the unmarked elements in the list unmodified +type MarkDoneResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Unmodified []*v1.IdRaw `protobuf:"bytes,2,rep,name=unmodified,proto3" json:"unmodified,omitempty"` +} + +func (x *MarkDoneResponse) Reset() { + *x = MarkDoneResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarkDoneResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkDoneResponse) ProtoMessage() {} + +func (x *MarkDoneResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[10] + 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 MarkDoneResponse.ProtoReflect.Descriptor instead. +func (*MarkDoneResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{10} +} + +func (x *MarkDoneResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *MarkDoneResponse) GetUnmodified() []*v1.IdRaw { + if x != nil { + return x.Unmodified + } + return nil +} + +// Length requests and approximation of the number of elements in the queue +type LengthRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *LengthRequest) Reset() { + *x = LengthRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LengthRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LengthRequest) ProtoMessage() {} + +func (x *LengthRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[11] + 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 LengthRequest.ProtoReflect.Descriptor instead. +func (*LengthRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{11} +} + +func (x *LengthRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +// LengthResponse returns the queue id identifying the queue we +// computed the length for. +type LengthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Length int64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +func (x *LengthResponse) Reset() { + *x = LengthResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LengthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LengthResponse) ProtoMessage() {} + +func (x *LengthResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[12] + 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 LengthResponse.ProtoReflect.Descriptor instead. +func (*LengthResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{12} +} + +func (x *LengthResponse) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *LengthResponse) GetLength() int64 { + if x != nil { + return x.Length + } + return 0 +} + +// Send requests enqueues the queue messages provided. +type SendRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Msg []*QueueMsg `protobuf:"bytes,2,rep,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *SendRequest) Reset() { + *x = SendRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendRequest) ProtoMessage() {} + +func (x *SendRequest) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[13] + 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 SendRequest.ProtoReflect.Descriptor instead. +func (*SendRequest) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{13} +} + +func (x *SendRequest) GetId() *v1.IdRaw { + if x != nil { + return x.Id + } + return nil +} + +func (x *SendRequest) GetMsg() []*QueueMsg { + if x != nil { + return x.Msg + } + return nil +} + +// If the queue msg id is an error then we are using the error_detail_msg to +// return the value. Note that the message id you provide here will +// changed once we send you the success notification using your id. +type SendResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Succeed []*v1.IdRaw `protobuf:"bytes,1,rep,name=succeed,proto3" json:"succeed,omitempty"` + Fail []*QueueMsg `protobuf:"bytes,2,rep,name=fail,proto3" json:"fail,omitempty"` + FailedOn *v1.IdRaw `protobuf:"bytes,3,opt,name=failed_on,json=failedOn,proto3" json:"failed_on,omitempty"` +} + +func (x *SendResponse) Reset() { + *x = SendResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_queue_v1_queue_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendResponse) ProtoMessage() {} + +func (x *SendResponse) ProtoReflect() protoreflect.Message { + mi := &file_queue_v1_queue_proto_msgTypes[14] + 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 SendResponse.ProtoReflect.Descriptor instead. +func (*SendResponse) Descriptor() ([]byte, []int) { + return file_queue_v1_queue_proto_rawDescGZIP(), []int{14} +} + +func (x *SendResponse) GetSucceed() []*v1.IdRaw { + if x != nil { + return x.Succeed + } + return nil +} + +func (x *SendResponse) GetFail() []*QueueMsg { + if x != nil { + return x.Fail + } + return nil +} + +func (x *SendResponse) GetFailedOn() *v1.IdRaw { + if x != nil { + return x.FailedOn + } + return nil +} + +var File_queue_v1_queue_proto protoreflect.FileDescriptor + +var file_queue_v1_queue_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x33, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, 0x0a, 0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3c, + 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x13, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x0e, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, + 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x67, 0x0a, 0x0f, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, + 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0xcc, 0x02, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x73, 0x67, + 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x73, 0x65, + 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x63, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, + 0x61, 0x77, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x72, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x6b, 0x44, + 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, + 0x0a, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x37, 0x0a, 0x0d, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x0e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5b, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x03, + 0x6d, 0x73, 0x67, 0x22, 0x9d, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x66, 0x61, 0x69, 0x6c, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x04, 0x66, 0x61, 0x69, 0x6c, 0x12, 0x33, + 0x0a, 0x09, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x6e, 0x2a, 0xc0, 0x01, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x75, 0x65, 0x45, 0x72, 0x72, + 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x6f, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, + 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x6c, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x6e, + 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x09, 0x1a, + 0x05, 0xd8, 0x9e, 0x89, 0x02, 0x01, 0x32, 0xd3, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x12, 0x4a, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, + 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x12, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x6f, 0x6e, + 0x65, 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, + 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x6f, 0x6e, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x15, 0x2e, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2e, 0x5a, 0x2c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x61, 0x6e, 0x73, 0x6d, + 0x69, 0x74, 0x68, 0x2f, 0x70, 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x2f, 0x67, 0x2f, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_queue_v1_queue_proto_rawDescOnce sync.Once + file_queue_v1_queue_proto_rawDescData = file_queue_v1_queue_proto_rawDesc +) + +func file_queue_v1_queue_proto_rawDescGZIP() []byte { + file_queue_v1_queue_proto_rawDescOnce.Do(func() { + file_queue_v1_queue_proto_rawDescData = protoimpl.X.CompressGZIP(file_queue_v1_queue_proto_rawDescData) + }) + return file_queue_v1_queue_proto_rawDescData +} + +var file_queue_v1_queue_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_queue_v1_queue_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_queue_v1_queue_proto_goTypes = []interface{}{ + (QueueErr)(0), // 0: queue.v1.QueueErr + (*CreateQueueRequest)(nil), // 1: queue.v1.CreateQueueRequest + (*CreateQueueResponse)(nil), // 2: queue.v1.CreateQueueResponse + (*LocateRequest)(nil), // 3: queue.v1.LocateRequest + (*LocateResponse)(nil), // 4: queue.v1.LocateResponse + (*DeleteQueueRequest)(nil), // 5: queue.v1.DeleteQueueRequest + (*DeleteQueueResponse)(nil), // 6: queue.v1.DeleteQueueResponse + (*ReceiveRequest)(nil), // 7: queue.v1.ReceiveRequest + (*ReceiveResponse)(nil), // 8: queue.v1.ReceiveResponse + (*QueueMsg)(nil), // 9: queue.v1.QueueMsg + (*MarkDoneRequest)(nil), // 10: queue.v1.MarkDoneRequest + (*MarkDoneResponse)(nil), // 11: queue.v1.MarkDoneResponse + (*LengthRequest)(nil), // 12: queue.v1.LengthRequest + (*LengthResponse)(nil), // 13: queue.v1.LengthResponse + (*SendRequest)(nil), // 14: queue.v1.SendRequest + (*SendResponse)(nil), // 15: queue.v1.SendResponse + (*v1.IdRaw)(nil), // 16: protosupport.v1.IdRaw + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*anypb.Any)(nil), // 18: google.protobuf.Any +} +var file_queue_v1_queue_proto_depIdxs = []int32{ + 16, // 0: queue.v1.CreateQueueResponse.id:type_name -> protosupport.v1.IdRaw + 16, // 1: queue.v1.LocateResponse.id:type_name -> protosupport.v1.IdRaw + 16, // 2: queue.v1.DeleteQueueRequest.id:type_name -> protosupport.v1.IdRaw + 16, // 3: queue.v1.DeleteQueueResponse.id:type_name -> protosupport.v1.IdRaw + 16, // 4: queue.v1.ReceiveRequest.id:type_name -> protosupport.v1.IdRaw + 16, // 5: queue.v1.ReceiveResponse.id:type_name -> protosupport.v1.IdRaw + 9, // 6: queue.v1.ReceiveResponse.message:type_name -> queue.v1.QueueMsg + 16, // 7: queue.v1.QueueMsg.id:type_name -> protosupport.v1.IdRaw + 16, // 8: queue.v1.QueueMsg.msg_id:type_name -> protosupport.v1.IdRaw + 17, // 9: queue.v1.QueueMsg.received:type_name -> google.protobuf.Timestamp + 18, // 10: queue.v1.QueueMsg.sender:type_name -> google.protobuf.Any + 17, // 11: queue.v1.QueueMsg.sent:type_name -> google.protobuf.Timestamp + 18, // 12: queue.v1.QueueMsg.payload:type_name -> google.protobuf.Any + 16, // 13: queue.v1.MarkDoneRequest.id:type_name -> protosupport.v1.IdRaw + 16, // 14: queue.v1.MarkDoneRequest.msg:type_name -> protosupport.v1.IdRaw + 16, // 15: queue.v1.MarkDoneResponse.id:type_name -> protosupport.v1.IdRaw + 16, // 16: queue.v1.MarkDoneResponse.unmodified:type_name -> protosupport.v1.IdRaw + 16, // 17: queue.v1.LengthRequest.id:type_name -> protosupport.v1.IdRaw + 16, // 18: queue.v1.LengthResponse.id:type_name -> protosupport.v1.IdRaw + 16, // 19: queue.v1.SendRequest.id:type_name -> protosupport.v1.IdRaw + 9, // 20: queue.v1.SendRequest.msg:type_name -> queue.v1.QueueMsg + 16, // 21: queue.v1.SendResponse.succeed:type_name -> protosupport.v1.IdRaw + 9, // 22: queue.v1.SendResponse.fail:type_name -> queue.v1.QueueMsg + 16, // 23: queue.v1.SendResponse.failed_on:type_name -> protosupport.v1.IdRaw + 1, // 24: queue.v1.Queue.CreateQueue:input_type -> queue.v1.CreateQueueRequest + 3, // 25: queue.v1.Queue.Locate:input_type -> queue.v1.LocateRequest + 5, // 26: queue.v1.Queue.DeleteQueue:input_type -> queue.v1.DeleteQueueRequest + 7, // 27: queue.v1.Queue.Receive:input_type -> queue.v1.ReceiveRequest + 10, // 28: queue.v1.Queue.MarkDone:input_type -> queue.v1.MarkDoneRequest + 12, // 29: queue.v1.Queue.Length:input_type -> queue.v1.LengthRequest + 14, // 30: queue.v1.Queue.Send:input_type -> queue.v1.SendRequest + 2, // 31: queue.v1.Queue.CreateQueue:output_type -> queue.v1.CreateQueueResponse + 4, // 32: queue.v1.Queue.Locate:output_type -> queue.v1.LocateResponse + 6, // 33: queue.v1.Queue.DeleteQueue:output_type -> queue.v1.DeleteQueueResponse + 8, // 34: queue.v1.Queue.Receive:output_type -> queue.v1.ReceiveResponse + 11, // 35: queue.v1.Queue.MarkDone:output_type -> queue.v1.MarkDoneResponse + 13, // 36: queue.v1.Queue.Length:output_type -> queue.v1.LengthResponse + 15, // 37: queue.v1.Queue.Send:output_type -> queue.v1.SendResponse + 31, // [31:38] is the sub-list for method output_type + 24, // [24:31] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name +} + +func init() { file_queue_v1_queue_proto_init() } +func file_queue_v1_queue_proto_init() { + if File_queue_v1_queue_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_queue_v1_queue_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateQueueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQueueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReceiveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReceiveResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueueMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkDoneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkDoneResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LengthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LengthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_queue_v1_queue_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendResponse); 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_queue_v1_queue_proto_rawDesc, + NumEnums: 1, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_queue_v1_queue_proto_goTypes, + DependencyIndexes: file_queue_v1_queue_proto_depIdxs, + EnumInfos: file_queue_v1_queue_proto_enumTypes, + MessageInfos: file_queue_v1_queue_proto_msgTypes, + }.Build() + File_queue_v1_queue_proto = out.File + file_queue_v1_queue_proto_rawDesc = nil + file_queue_v1_queue_proto_goTypes = nil + file_queue_v1_queue_proto_depIdxs = nil +} diff --git a/g/queue/v1/queueid.go b/g/queue/v1/queueid.go new file mode 100644 index 00000000..05b6dcc4 --- /dev/null +++ b/g/queue/v1/queueid.go @@ -0,0 +1,87 @@ +package queue + +// +// DO NOT EDIT. This file was machine genarted by boilerplateid for QueueId +// + +import ( + + "github.com/iansmith/parigot/api/shared/id" + + protosupport "github.com/iansmith/parigot/g/protosupport/v1" +) +// +// Begin Boilerplate for Queue +// + +type DefQueue struct{} + +func (f DefQueue) ShortString() string { return "queue" } +func (f DefQueue) Letter() byte { return 0x71 } + +type QueueId id.IdRoot[DefQueue] + + +func NewQueueId() QueueId { + return QueueId(id.NewIdRoot[DefQueue]()) +} + +func (f QueueId) Marshal() *protosupport.IdRaw { + raw:=&protosupport.IdRaw{} + raw.High = f.High() + raw.Low = f.Low() + return raw +} + +func QueueIdZeroValue() QueueId { + return QueueId(id.NewIdTyped[DefQueue](0xffffffffffffff,0xffffffffffffffff)) +} +func QueueIdEmptyValue() QueueId { + return QueueId(id.NewIdTyped[DefQueue](0,0)) +} + +func (f QueueId) Equal(other QueueId) bool{ + return id.IdRoot[DefQueue](f).Equal(id.IdRoot[DefQueue](other)) +} +func (f QueueId) String() string{ + return id.IdRoot[DefQueue](f).String() +} +func (f QueueId) Short() string{ + return id.IdRoot[DefQueue](f).Short() +} + +func (f QueueId) IsZeroValue() bool{ + return id.IdRoot[DefQueue](f).IsZeroValue() +} +func (f QueueId) IsEmptyValue() bool{ + return id.IdRoot[DefQueue](f).IsEmptyValue() +} +func (f QueueId) IsZeroOrEmptyValue() bool{ + return id.IdRoot[DefQueue](f).IsZeroOrEmptyValue() +} + +func (f QueueId) High() uint64{ + return id.IdRoot[DefQueue](f).High() +} +func (f QueueId) Low() uint64{ + return id.IdRoot[DefQueue](f).Low() +} + +func UnmarshalQueueId(b *protosupport.IdRaw) QueueId { + l:=b.GetLow() + h:=b.GetHigh() + return QueueId(id.NewIdTyped[DefQueue](h,l)) +} + +// FromPair is probably not something you want to use unless you +// are pulling values from external storage or files. If you pulling +// values from the network, use the Marshal() ad Unmarshal() +// functions to work with Ids. Absolutely no checking is done +// on the values provided, so much caution is advised. +func QueueIdFromPair(high, low uint64) QueueId { + return QueueId(id.NewIdTyped[DefQueue](high,low)) +} + +// +// End Boilerplate for Queue +// diff --git a/g/queue/v1/queuemsgid.go b/g/queue/v1/queuemsgid.go new file mode 100644 index 00000000..a4516a1d --- /dev/null +++ b/g/queue/v1/queuemsgid.go @@ -0,0 +1,87 @@ +package queue + +// +// DO NOT EDIT. This file was machine genarted by boilerplateid for QueueMsgId +// + +import ( + + "github.com/iansmith/parigot/api/shared/id" + + protosupport "github.com/iansmith/parigot/g/protosupport/v1" +) +// +// Begin Boilerplate for QueueMsg +// + +type DefQueueMsg struct{} + +func (f DefQueueMsg) ShortString() string { return "msg" } +func (f DefQueueMsg) Letter() byte { return 0x6d } + +type QueueMsgId id.IdRoot[DefQueueMsg] + + +func NewQueueMsgId() QueueMsgId { + return QueueMsgId(id.NewIdRoot[DefQueueMsg]()) +} + +func (f QueueMsgId) Marshal() *protosupport.IdRaw { + raw:=&protosupport.IdRaw{} + raw.High = f.High() + raw.Low = f.Low() + return raw +} + +func QueueMsgIdZeroValue() QueueMsgId { + return QueueMsgId(id.NewIdTyped[DefQueueMsg](0xffffffffffffff,0xffffffffffffffff)) +} +func QueueMsgIdEmptyValue() QueueMsgId { + return QueueMsgId(id.NewIdTyped[DefQueueMsg](0,0)) +} + +func (f QueueMsgId) Equal(other QueueMsgId) bool{ + return id.IdRoot[DefQueueMsg](f).Equal(id.IdRoot[DefQueueMsg](other)) +} +func (f QueueMsgId) String() string{ + return id.IdRoot[DefQueueMsg](f).String() +} +func (f QueueMsgId) Short() string{ + return id.IdRoot[DefQueueMsg](f).Short() +} + +func (f QueueMsgId) IsZeroValue() bool{ + return id.IdRoot[DefQueueMsg](f).IsZeroValue() +} +func (f QueueMsgId) IsEmptyValue() bool{ + return id.IdRoot[DefQueueMsg](f).IsEmptyValue() +} +func (f QueueMsgId) IsZeroOrEmptyValue() bool{ + return id.IdRoot[DefQueueMsg](f).IsZeroOrEmptyValue() +} + +func (f QueueMsgId) High() uint64{ + return id.IdRoot[DefQueueMsg](f).High() +} +func (f QueueMsgId) Low() uint64{ + return id.IdRoot[DefQueueMsg](f).Low() +} + +func UnmarshalQueueMsgId(b *protosupport.IdRaw) QueueMsgId { + l:=b.GetLow() + h:=b.GetHigh() + return QueueMsgId(id.NewIdTyped[DefQueueMsg](h,l)) +} + +// FromPair is probably not something you want to use unless you +// are pulling values from external storage or files. If you pulling +// values from the network, use the Marshal() ad Unmarshal() +// functions to work with Ids. Absolutely no checking is done +// on the values provided, so much caution is advised. +func QueueMsgIdFromPair(high, low uint64) QueueMsgId { + return QueueMsgId(id.NewIdTyped[DefQueueMsg](high,low)) +} + +// +// End Boilerplate for QueueMsg +// diff --git a/g/queue/v1/queueserver.p.go b/g/queue/v1/queueserver.p.go new file mode 100644 index 00000000..5db7809d --- /dev/null +++ b/g/queue/v1/queueserver.p.go @@ -0,0 +1,653 @@ +//go:build wasip1 + +// Code generated by protoc-gen-parigot. DO NOT EDIT. +// source: queue/v1/queue.proto + +package queue + + + + +import ( + "context" + "fmt" + "log" + "log/slog" + "runtime/debug" + "unsafe" + + + // this set of imports is _unrelated_ to the particulars of what the .proto imported... those are above + syscallguest "github.com/iansmith/parigot/api/guest/syscall" + "github.com/iansmith/parigot/api/shared/id" + lib "github.com/iansmith/parigot/lib/go" + "github.com/iansmith/parigot/g/syscall/v1" + "github.com/iansmith/parigot/lib/go/future" + apishared "github.com/iansmith/parigot/api/shared" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "github.com/iansmith/parigot/lib/go/client" +) +var _ = unsafe.Sizeof([]byte{}) + + +func Launch(ctx context.Context, sid id.ServiceId, impl Queue) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start queue.v1.Queue, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that Init returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func Init(require []lib.MustRequireFunc, impl Queue) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegister() + MustExport(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchService(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call Queue","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func Run(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run Queue: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCall(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of Queue") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillis = int32(50) + +func ReadOneAndCall(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("Queue, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func bind(ctx context.Context,sid id.ServiceId, impl Queue) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// queue.v1.Queue.CreateQueue +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "CreateQueue" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","CreateQueue", + GenerateCreateQueueInvoker(impl)) +// +// queue.v1.Queue.Locate +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Locate" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","Locate", + GenerateLocateInvoker(impl)) +// +// queue.v1.Queue.DeleteQueue +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "DeleteQueue" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","DeleteQueue", + GenerateDeleteQueueInvoker(impl)) +// +// queue.v1.Queue.Receive +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Receive" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","Receive", + GenerateReceiveInvoker(impl)) +// +// queue.v1.Queue.MarkDone +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "MarkDone" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","MarkDone", + GenerateMarkDoneInvoker(impl)) +// +// queue.v1.Queue.Length +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Length" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","Length", + GenerateLengthInvoker(impl)) +// +// queue.v1.Queue.Send +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Send" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Queue","Send", + GenerateSendInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of Queue. +func Locate(ctx context.Context,sid id.ServiceId) (Client,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "queue.v1","queue", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &Client_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocate(ctx context.Context, sid id.ServiceId) Client { + result, err:=Locate(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate queue.v1.queue:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func Register() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","queue.v1","queue") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegister() (context.Context,id.ServiceId) { + sid, err:=Register() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","queue.v1","service name","queue") + panic("unable to register "+"queue") + } + return context.Background(), sid +} + +func MustRequire(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "queue.v1","queue",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","queue.v1","service name","queue","error",syscall.KernelErr_name[int32(err)]) + panic("require queue.v1.queue creates a dependency loop") + } + slog.Error("unable to require","package","queue.v1","service name","queue","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require queue.v1.queue:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExport(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"queue.v1","queue",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","queue.v1","service name","queue") + panic("not able to export queue.v1.queue:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchService(ctx context.Context, sid id.ServiceId, impl Queue) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=bind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchService(ctx context.Context, sid id.ServiceId, impl Queue) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchService(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// Host from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport queue create_queue_ +func CreateQueue_(int32,int32,int32,int32) int64 +func CreateQueueHost(ctx context.Context,inPtr *CreateQueueRequest) *FutureCreateQueue { + outProtoPtr := (*CreateQueueResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, CreateQueue_) + f:=NewFutureCreateQueue() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport queue locate_ +func Locate_(int32,int32,int32,int32) int64 +func LocateHost(ctx context.Context,inPtr *LocateRequest) *FutureLocate { + outProtoPtr := (*LocateResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Locate_) + f:=NewFutureLocate() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport queue delete_queue_ +func DeleteQueue_(int32,int32,int32,int32) int64 +func DeleteQueueHost(ctx context.Context,inPtr *DeleteQueueRequest) *FutureDeleteQueue { + outProtoPtr := (*DeleteQueueResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, DeleteQueue_) + f:=NewFutureDeleteQueue() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport queue receive_ +func Receive_(int32,int32,int32,int32) int64 +func ReceiveHost(ctx context.Context,inPtr *ReceiveRequest) *FutureReceive { + outProtoPtr := (*ReceiveResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Receive_) + f:=NewFutureReceive() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport queue mark_done_ +func MarkDone_(int32,int32,int32,int32) int64 +func MarkDoneHost(ctx context.Context,inPtr *MarkDoneRequest) *FutureMarkDone { + outProtoPtr := (*MarkDoneResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, MarkDone_) + f:=NewFutureMarkDone() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport queue length_ +func Length_(int32,int32,int32,int32) int64 +func LengthHost(ctx context.Context,inPtr *LengthRequest) *FutureLength { + outProtoPtr := (*LengthResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Length_) + f:=NewFutureLength() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport queue send_ +func Send_(int32,int32,int32,int32) int64 +func SendHost(ctx context.Context,inPtr *SendRequest) *FutureSend { + outProtoPtr := (*SendResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Send_) + f:=NewFutureSend() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeCreateQueue struct { + fn func(context.Context,*CreateQueueRequest) *FutureCreateQueue +} + +func (t *invokeCreateQueue) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&CreateQueueRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateCreateQueueInvoker(impl Queue) future.Invoker { + return &invokeCreateQueue{fn:impl.CreateQueue} +} + +// This is interface for invocation. + +type invokeLocate struct { + fn func(context.Context,*LocateRequest) *FutureLocate +} + +func (t *invokeLocate) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&LocateRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateLocateInvoker(impl Queue) future.Invoker { + return &invokeLocate{fn:impl.Locate} +} + +// This is interface for invocation. + +type invokeDeleteQueue struct { + fn func(context.Context,*DeleteQueueRequest) *FutureDeleteQueue +} + +func (t *invokeDeleteQueue) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&DeleteQueueRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateDeleteQueueInvoker(impl Queue) future.Invoker { + return &invokeDeleteQueue{fn:impl.DeleteQueue} +} + +// This is interface for invocation. + +type invokeReceive struct { + fn func(context.Context,*ReceiveRequest) *FutureReceive +} + +func (t *invokeReceive) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&ReceiveRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateReceiveInvoker(impl Queue) future.Invoker { + return &invokeReceive{fn:impl.Receive} +} + +// This is interface for invocation. + +type invokeMarkDone struct { + fn func(context.Context,*MarkDoneRequest) *FutureMarkDone +} + +func (t *invokeMarkDone) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&MarkDoneRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateMarkDoneInvoker(impl Queue) future.Invoker { + return &invokeMarkDone{fn:impl.MarkDone} +} + +// This is interface for invocation. + +type invokeLength struct { + fn func(context.Context,*LengthRequest) *FutureLength +} + +func (t *invokeLength) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&LengthRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateLengthInvoker(impl Queue) future.Invoker { + return &invokeLength{fn:impl.Length} +} + +// This is interface for invocation. + +type invokeSend struct { + fn func(context.Context,*SendRequest) *FutureSend +} + +func (t *invokeSend) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&SendRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateSendInvoker(impl Queue) future.Invoker { + return &invokeSend{fn:impl.Send} +} diff --git a/g/queue/v1/rowid.go b/g/queue/v1/rowid.go new file mode 100644 index 00000000..41a96670 --- /dev/null +++ b/g/queue/v1/rowid.go @@ -0,0 +1,87 @@ +package queue + +// +// DO NOT EDIT. This file was machine genarted by boilerplateid for RowId +// + +import ( + + "github.com/iansmith/parigot/api/shared/id" + + protosupport "github.com/iansmith/parigot/g/protosupport/v1" +) +// +// Begin Boilerplate for Row +// + +type DefRow struct{} + +func (f DefRow) ShortString() string { return "row" } +func (f DefRow) Letter() byte { return 0x72 } + +type RowId id.IdRoot[DefRow] + + +func NewRowId() RowId { + return RowId(id.NewIdRoot[DefRow]()) +} + +func (f RowId) Marshal() *protosupport.IdRaw { + raw:=&protosupport.IdRaw{} + raw.High = f.High() + raw.Low = f.Low() + return raw +} + +func RowIdZeroValue() RowId { + return RowId(id.NewIdTyped[DefRow](0xffffffffffffff,0xffffffffffffffff)) +} +func RowIdEmptyValue() RowId { + return RowId(id.NewIdTyped[DefRow](0,0)) +} + +func (f RowId) Equal(other RowId) bool{ + return id.IdRoot[DefRow](f).Equal(id.IdRoot[DefRow](other)) +} +func (f RowId) String() string{ + return id.IdRoot[DefRow](f).String() +} +func (f RowId) Short() string{ + return id.IdRoot[DefRow](f).Short() +} + +func (f RowId) IsZeroValue() bool{ + return id.IdRoot[DefRow](f).IsZeroValue() +} +func (f RowId) IsEmptyValue() bool{ + return id.IdRoot[DefRow](f).IsEmptyValue() +} +func (f RowId) IsZeroOrEmptyValue() bool{ + return id.IdRoot[DefRow](f).IsZeroOrEmptyValue() +} + +func (f RowId) High() uint64{ + return id.IdRoot[DefRow](f).High() +} +func (f RowId) Low() uint64{ + return id.IdRoot[DefRow](f).Low() +} + +func UnmarshalRowId(b *protosupport.IdRaw) RowId { + l:=b.GetLow() + h:=b.GetHigh() + return RowId(id.NewIdTyped[DefRow](h,l)) +} + +// FromPair is probably not something you want to use unless you +// are pulling values from external storage or files. If you pulling +// values from the network, use the Marshal() ad Unmarshal() +// functions to work with Ids. Absolutely no checking is done +// on the values provided, so much caution is advised. +func RowIdFromPair(high, low uint64) RowId { + return RowId(id.NewIdTyped[DefRow](high,low)) +} + +// +// End Boilerplate for Row +// diff --git a/g/syscall/v1/syscall.pb.go b/g/syscall/v1/syscall.pb.go new file mode 100644 index 00000000..bcd0d700 --- /dev/null +++ b/g/syscall/v1/syscall.pb.go @@ -0,0 +1,3314 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: syscall/v1/syscall.proto + +package syscall + +import ( + v1 "github.com/iansmith/parigot/g/protosupport/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + 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 KernelErr int32 + +const ( + KernelErr_NoError KernelErr = 0 + // LocateError is return when the kernel cannot find the requested + // service, given by a package name and service name pair. + KernelErr_LocateError KernelErr = 1 + // UnmarshalFailed is used to indicate that in unmarshaling + // a request or result, the protobuf layer returned an error. + KernelErr_UnmarshalFailed KernelErr = 2 + // IdDispatch means that a dispatch call failed due to an + // MethodId or ServiceId was not found. This is also used when + // binding a method if the name is invalid. + KernelErr_IdDispatch KernelErr = 3 + // NamespaceExhausted is returned when the kernel can no + // along accept additional packages, services, or methods. This is used + // primarily to thwart attempts at DOS attacks. + KernelErr_NamespaceExhausted KernelErr = 4 + // NotFound means that a package, service, or method that was requested + // could not be found. + KernelErr_NotFound KernelErr = 5 + // DataTooLarge means that the size of some part of method call was bigger + // than the buffer allocated to receive it. This could be a problem either on + // the call side or the return side. + KernelErr_DataTooLarge KernelErr = 6 + // Marshal means that a marshal of a protobuf has failed. + KernelErr_MarshalFailed KernelErr = 7 + // CallerUnavailable means that the kernel could not find the original caller + // that requested the computation for which results have been provided. + // It is most likely because the caller was killed, exited or timed out. + KernelErr_CallerUnavailable KernelErr = 8 + // KernelServiceAlreadyClosedOrExported means that some process has already + // reported the service in question as closed or has already expressed that it is + // exporting (implementing this service). This is very likely a case where there + // are two servers that think they are or should be implementing the same service. + KernelErr_ServiceAlreadyClosedOrExported KernelErr = 9 + // ServiceAlreadyRequired means that this same process has already + // required the given service. + KernelErr_ServiceAlreadyRequired KernelErr = 10 + // DependencyCycle means that no deterministic startup ordering + // exists for the set of exports and requires in use. In other words, + // you must refactor your program so that you do not have a cyle to make + // it come up cleanly. + KernelErr_DependencyCycle KernelErr = 11 + // NetworkFailed means that we successfully connected to the nameserver, but failed + // during the communication process itself. + KernelErr_NetworkFailed KernelErr = 12 + // NetworkConnectionLost means that our internal connection to the remote nameserver + // was either still working but has lost "sync" in the protocol or the connection has + // become entirely broken. The kernel will close the connection to remote nameserver + // and reestablish it after this error. + KernelErr_NetworkConnectionLost KernelErr = 13 + // DataTooSmall means that the kernel was speaking some protocol with a remote server, + // such as a remote nameserver, and data read from the remote said was smaller than the protocol + // dictated, e.g. it did not contain a checksum after a data block. + KernelErr_DataTooSmall KernelErr = 14 + // ConnectionFailed means that the attempt to open a connection to a remote + // service has failed to connect. + KernelErr_KernelConnectionFailed KernelErr = 15 + // NSRetryFailed means that we tried twice to reach the nameserver with + // the given request, but both times could not do so. + KernelErr_NSRetryFailed KernelErr = 16 + // DecodeError indicates that an attempt to extract a protobuf object + // from an encoded set of bytes has failed. Typically, this means that + // the encoder was not called. + KernelErr_DecodeError KernelErr = 17 + // ExecError means that we received a response from the implenter of a particular + // service's function and the execution of that function failed. + KernelErr_ExecError KernelErr = 18 + // DependencyFailure means that the dependency infrastructure has failed. This is different + // than when a user creates bad set of depedencies (KernelDependencyCycle). This + // an internal to the kernel error. + KernelErr_KernelDependencyFailure KernelErr = 19 + // AbortRequest indicates that the program that receives this error + // should exit because the nameserver has asked it to do so. This + // means that some _other_ program has failed to start correctly, so this + // deployment cannot succeed. + KernelErr_AbortRequest KernelErr = 20 + // EncodeError indicates that an attempt encode a protobuf + // with header and CRC has failed. + KernelErr_EncodeError KernelErr = 22 + // ClosedErr indicates that that object is now closed. This is used + // as a signal when writing data between the guest and host. + KernelErr_ClosedErr KernelErr = 23 + // GuestReadFailed indicates that we did not successfully read + // from guest memory. This is usually caused by the proposed address + // to read from being out of bounds. + KernelErr_GuestReadFailed KernelErr = 24 + // GuestWriteFailed indicates that we did not successfully write + // to guest memory. This is usually caused by the proposed address + // for writing to being out of bounds. + KernelErr_GuestWriteFailed KernelErr = 25 + // BadId indicates that you passed the zero value or the empty value of a + // an id type into a system call. This usually means that you did not + // properly initialize a protobuf. + KernelErr_BadId KernelErr = 26 + // NotReady that the service that was trying + // to start was aborted because it returned false from Ready(). + // Usually this error indicates that the program has no way to + // continue running. + KernelErr_NotReady KernelErr = 27 + // NotRequired that a service has tried to Locate() another service + // that that the first service did not Require() previously. + KernelErr_NotRequired KernelErr = 28 + // RunTimeout means that the programs timeout has expired when waiting + // for all the required dependencies to be fulfilled. + KernelErr_RunTimeout KernelErr = 29 + // ReadOneTimeout means that the program was trying to request + // a service/method pair to invoke, but the request timed out. + KernelErr_ReadOneTimeout KernelErr = 30 + // WriteTimeout means that the program was trying to send + // a request to another service, but timed out before it could do so. + KernelErr_WriteTimeout KernelErr = 31 + // BadCallId is returned when trying to match up the results + // and the call of a function resulting in a promise. It is returned + // if either there is no such cid registered yet or the cid + // is already in use. + KernelErr_BadCallId KernelErr = 32 + // ChannelClosed indicates that one of the internal channels used in + // waiting for input has been closed unexpectedly. + // is already in use. + KernelErr_ChannelClosed KernelErr = 33 + // ExitFailed means that we were tyring to send an orderly shutdown but + // could not reach all the of the hosts that we needed to notify. + KernelErr_ExitFailed KernelErr = 34 +) + +// Enum value maps for KernelErr. +var ( + KernelErr_name = map[int32]string{ + 0: "NoError", + 1: "LocateError", + 2: "UnmarshalFailed", + 3: "IdDispatch", + 4: "NamespaceExhausted", + 5: "NotFound", + 6: "DataTooLarge", + 7: "MarshalFailed", + 8: "CallerUnavailable", + 9: "ServiceAlreadyClosedOrExported", + 10: "ServiceAlreadyRequired", + 11: "DependencyCycle", + 12: "NetworkFailed", + 13: "NetworkConnectionLost", + 14: "DataTooSmall", + 15: "KernelConnectionFailed", + 16: "NSRetryFailed", + 17: "DecodeError", + 18: "ExecError", + 19: "KernelDependencyFailure", + 20: "AbortRequest", + 22: "EncodeError", + 23: "ClosedErr", + 24: "GuestReadFailed", + 25: "GuestWriteFailed", + 26: "BadId", + 27: "NotReady", + 28: "NotRequired", + 29: "RunTimeout", + 30: "ReadOneTimeout", + 31: "WriteTimeout", + 32: "BadCallId", + 33: "ChannelClosed", + 34: "ExitFailed", + } + KernelErr_value = map[string]int32{ + "NoError": 0, + "LocateError": 1, + "UnmarshalFailed": 2, + "IdDispatch": 3, + "NamespaceExhausted": 4, + "NotFound": 5, + "DataTooLarge": 6, + "MarshalFailed": 7, + "CallerUnavailable": 8, + "ServiceAlreadyClosedOrExported": 9, + "ServiceAlreadyRequired": 10, + "DependencyCycle": 11, + "NetworkFailed": 12, + "NetworkConnectionLost": 13, + "DataTooSmall": 14, + "KernelConnectionFailed": 15, + "NSRetryFailed": 16, + "DecodeError": 17, + "ExecError": 18, + "KernelDependencyFailure": 19, + "AbortRequest": 20, + "EncodeError": 22, + "ClosedErr": 23, + "GuestReadFailed": 24, + "GuestWriteFailed": 25, + "BadId": 26, + "NotReady": 27, + "NotRequired": 28, + "RunTimeout": 29, + "ReadOneTimeout": 30, + "WriteTimeout": 31, + "BadCallId": 32, + "ChannelClosed": 33, + "ExitFailed": 34, + } +) + +func (x KernelErr) Enum() *KernelErr { + p := new(KernelErr) + *p = x + return p +} + +func (x KernelErr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KernelErr) Descriptor() protoreflect.EnumDescriptor { + return file_syscall_v1_syscall_proto_enumTypes[0].Descriptor() +} + +func (KernelErr) Type() protoreflect.EnumType { + return &file_syscall_v1_syscall_proto_enumTypes[0] +} + +func (x KernelErr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KernelErr.Descriptor instead. +func (KernelErr) EnumDescriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{0} +} + +type MethodDirection int32 + +const ( + MethodDirection_METHOD_DIRECTION_UNSPECIFIED MethodDirection = 0 + MethodDirection_METHOD_DIRECTION_IN MethodDirection = 1 + MethodDirection_METHOD_DIRECTION_OUT MethodDirection = 2 + MethodDirection_METHOD_DIRECTION_BOTH MethodDirection = 3 +) + +// Enum value maps for MethodDirection. +var ( + MethodDirection_name = map[int32]string{ + 0: "METHOD_DIRECTION_UNSPECIFIED", + 1: "METHOD_DIRECTION_IN", + 2: "METHOD_DIRECTION_OUT", + 3: "METHOD_DIRECTION_BOTH", + } + MethodDirection_value = map[string]int32{ + "METHOD_DIRECTION_UNSPECIFIED": 0, + "METHOD_DIRECTION_IN": 1, + "METHOD_DIRECTION_OUT": 2, + "METHOD_DIRECTION_BOTH": 3, + } +) + +func (x MethodDirection) Enum() *MethodDirection { + p := new(MethodDirection) + *p = x + return p +} + +func (x MethodDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MethodDirection) Descriptor() protoreflect.EnumDescriptor { + return file_syscall_v1_syscall_proto_enumTypes[1].Descriptor() +} + +func (MethodDirection) Type() protoreflect.EnumType { + return &file_syscall_v1_syscall_proto_enumTypes[1] +} + +func (x MethodDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MethodDirection.Descriptor instead. +func (MethodDirection) EnumDescriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{1} +} + +// MessageBundle tells the receiver all the necessary info to make a call +// on a method. Note that when this is sent to a particular server, the HostId +// is the host id of the _caller_ not the place where the service is implemented. +type MethodBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HostId *v1.IdRaw `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` + ServiceId *v1.IdRaw `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + MethodId *v1.IdRaw `protobuf:"bytes,3,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` + CallId *v1.IdRaw `protobuf:"bytes,4,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` +} + +func (x *MethodBundle) Reset() { + *x = MethodBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodBundle) ProtoMessage() {} + +func (x *MethodBundle) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_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 MethodBundle.ProtoReflect.Descriptor instead. +func (*MethodBundle) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{0} +} + +func (x *MethodBundle) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *MethodBundle) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *MethodBundle) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +func (x *MethodBundle) GetCallId() *v1.IdRaw { + if x != nil { + return x.CallId + } + return nil +} + +type MethodBinding struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + MethodId *v1.IdRaw `protobuf:"bytes,2,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` +} + +func (x *MethodBinding) Reset() { + *x = MethodBinding{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodBinding) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodBinding) ProtoMessage() {} + +func (x *MethodBinding) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_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 MethodBinding.ProtoReflect.Descriptor instead. +func (*MethodBinding) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{1} +} + +func (x *MethodBinding) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *MethodBinding) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +// LocateRequest is a read from the kernel of the service id associated with a package, service pair. +type LocateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackageName string `protobuf:"bytes,1,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` + ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + // called_by is only needed for true clients. If you are doing a call to + // locate with a service that you did not and could not have known beforehand + // you should leave this empty. + CalledBy *v1.IdRaw `protobuf:"bytes,3,opt,name=called_by,json=calledBy,proto3" json:"called_by,omitempty"` +} + +func (x *LocateRequest) Reset() { + *x = LocateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocateRequest) ProtoMessage() {} + +func (x *LocateRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_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 LocateRequest.ProtoReflect.Descriptor instead. +func (*LocateRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{2} +} + +func (x *LocateRequest) GetPackageName() string { + if x != nil { + return x.PackageName + } + return "" +} + +func (x *LocateRequest) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *LocateRequest) GetCalledBy() *v1.IdRaw { + if x != nil { + return x.CalledBy + } + return nil +} + +// LocateResponse hands back the service Id of the package_name and service_name supplied in the request. +// A service id can be thought of as a (network hostname,port) pair that defines which +// service's "location". +type LocateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HostId *v1.IdRaw `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` + ServiceId *v1.IdRaw `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + Binding []*MethodBinding `protobuf:"bytes,3,rep,name=binding,proto3" json:"binding,omitempty"` +} + +func (x *LocateResponse) Reset() { + *x = LocateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocateResponse) ProtoMessage() {} + +func (x *LocateResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_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 LocateResponse.ProtoReflect.Descriptor instead. +func (*LocateResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{3} +} + +func (x *LocateResponse) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *LocateResponse) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *LocateResponse) GetBinding() []*MethodBinding { + if x != nil { + return x.Binding + } + return nil +} + +// DispatchRequest is a request by a client to invoke a particular method with the parameters provided. +type DispatchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bundle *MethodBundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` + Param *anypb.Any `protobuf:"bytes,3,opt,name=param,proto3" json:"param,omitempty"` // inside is another Request object, but we don't know its type +} + +func (x *DispatchRequest) Reset() { + *x = DispatchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DispatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DispatchRequest) ProtoMessage() {} + +func (x *DispatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_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 DispatchRequest.ProtoReflect.Descriptor instead. +func (*DispatchRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{4} +} + +func (x *DispatchRequest) GetBundle() *MethodBundle { + if x != nil { + return x.Bundle + } + return nil +} + +func (x *DispatchRequest) GetParam() *anypb.Any { + if x != nil { + return x.Param + } + return nil +} + +// DispatchResponse sent by the server back to a client. This what is returned +// as the intermediate value to the caller, because the caller +// cannot block. This call_id value can be used on the client side +// to map to additional info about the call. +type DispatchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CallId *v1.IdRaw `protobuf:"bytes,1,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` // reserved for internal use + TargetHostId *v1.IdRaw `protobuf:"bytes,2,opt,name=target_host_id,json=targetHostId,proto3" json:"target_host_id,omitempty"` // reserved for internal use +} + +func (x *DispatchResponse) Reset() { + *x = DispatchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DispatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DispatchResponse) ProtoMessage() {} + +func (x *DispatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[5] + 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 DispatchResponse.ProtoReflect.Descriptor instead. +func (*DispatchResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{5} +} + +func (x *DispatchResponse) GetCallId() *v1.IdRaw { + if x != nil { + return x.CallId + } + return nil +} + +func (x *DispatchResponse) GetTargetHostId() *v1.IdRaw { + if x != nil { + return x.TargetHostId + } + return nil +} + +// ReturnValueRequest is used to return the result of a +// function back to the caller. It is the result information +// of a call to a service/method function. +type ReturnValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bundle *MethodBundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` + Result *anypb.Any `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + ResultError int32 `protobuf:"varint,3,opt,name=result_error,json=resultError,proto3" json:"result_error,omitempty"` +} + +func (x *ReturnValueRequest) Reset() { + *x = ReturnValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReturnValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReturnValueRequest) ProtoMessage() {} + +func (x *ReturnValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[6] + 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 ReturnValueRequest.ProtoReflect.Descriptor instead. +func (*ReturnValueRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{6} +} + +func (x *ReturnValueRequest) GetBundle() *MethodBundle { + if x != nil { + return x.Bundle + } + return nil +} + +func (x *ReturnValueRequest) GetResult() *anypb.Any { + if x != nil { + return x.Result + } + return nil +} + +func (x *ReturnValueRequest) GetResultError() int32 { + if x != nil { + return x.ResultError + } + return 0 +} + +// ReturnValueResponse is currently empty. +type ReturnValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReturnValueResponse) Reset() { + *x = ReturnValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReturnValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReturnValueResponse) ProtoMessage() {} + +func (x *ReturnValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[7] + 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 ReturnValueResponse.ProtoReflect.Descriptor instead. +func (*ReturnValueResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{7} +} + +type BlockUntilCallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CanTimeout bool `protobuf:"varint,1,opt,name=can_timeout,json=canTimeout,proto3" json:"can_timeout,omitempty"` +} + +func (x *BlockUntilCallRequest) Reset() { + *x = BlockUntilCallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockUntilCallRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockUntilCallRequest) ProtoMessage() {} + +func (x *BlockUntilCallRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[8] + 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 BlockUntilCallRequest.ProtoReflect.Descriptor instead. +func (*BlockUntilCallRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{8} +} + +func (x *BlockUntilCallRequest) GetCanTimeout() bool { + if x != nil { + return x.CanTimeout + } + return false +} + +type BlockUntilCallResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Param *anypb.Any `protobuf:"bytes,1,opt,name=param,proto3" json:"param,omitempty"` + Method *v1.IdRaw `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + Call *v1.IdRaw `protobuf:"bytes,3,opt,name=call,proto3" json:"call,omitempty"` + TimedOut bool `protobuf:"varint,4,opt,name=timed_out,json=timedOut,proto3" json:"timed_out,omitempty"` +} + +func (x *BlockUntilCallResponse) Reset() { + *x = BlockUntilCallResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockUntilCallResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockUntilCallResponse) ProtoMessage() {} + +func (x *BlockUntilCallResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[9] + 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 BlockUntilCallResponse.ProtoReflect.Descriptor instead. +func (*BlockUntilCallResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{9} +} + +func (x *BlockUntilCallResponse) GetParam() *anypb.Any { + if x != nil { + return x.Param + } + return nil +} + +func (x *BlockUntilCallResponse) GetMethod() *v1.IdRaw { + if x != nil { + return x.Method + } + return nil +} + +func (x *BlockUntilCallResponse) GetCall() *v1.IdRaw { + if x != nil { + return x.Call + } + return nil +} + +func (x *BlockUntilCallResponse) GetTimedOut() bool { + if x != nil { + return x.TimedOut + } + return false +} + +// BindMethodRequest is used to tell parigot that the given service_id (located +// at host_id) has an implementation for the given method name. This will create +// the mapping to a method_id, which is in the response. The direction parameter +// is either METHOD_DIRECTION_IN, OUT, or BOTH. IN means thath the method has +// no output parameter (the result is ignored), OUT means the method has no input +// parameters, and BOTH means that both input and output parameters are used. +type BindMethodRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HostId *v1.IdRaw `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` + ServiceId *v1.IdRaw `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + Direction MethodDirection `protobuf:"varint,4,opt,name=direction,proto3,enum=syscall.v1.MethodDirection" json:"direction,omitempty"` +} + +func (x *BindMethodRequest) Reset() { + *x = BindMethodRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BindMethodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindMethodRequest) ProtoMessage() {} + +func (x *BindMethodRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[10] + 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 BindMethodRequest.ProtoReflect.Descriptor instead. +func (*BindMethodRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{10} +} + +func (x *BindMethodRequest) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *BindMethodRequest) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *BindMethodRequest) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *BindMethodRequest) GetDirection() MethodDirection { + if x != nil { + return x.Direction + } + return MethodDirection_METHOD_DIRECTION_UNSPECIFIED +} + +// BindMethodResponse is the method_id of the service and method name provided +// in the request. +type BindMethodResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MethodId *v1.IdRaw `protobuf:"bytes,1,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` +} + +func (x *BindMethodResponse) Reset() { + *x = BindMethodResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BindMethodResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindMethodResponse) ProtoMessage() {} + +func (x *BindMethodResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[11] + 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 BindMethodResponse.ProtoReflect.Descriptor instead. +func (*BindMethodResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{11} +} + +func (x *BindMethodResponse) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +// FullyQualified service is the complete (protobuf) name of a service as a +// a string. This is typically something like "foo.v1" for the package and +// the service name is "Foo". These are the names used by the export, require, +// and locate calls. +type FullyQualifiedService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackagePath string `protobuf:"bytes,1,opt,name=package_path,json=packagePath,proto3" json:"package_path,omitempty"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` +} + +func (x *FullyQualifiedService) Reset() { + *x = FullyQualifiedService{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FullyQualifiedService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FullyQualifiedService) ProtoMessage() {} + +func (x *FullyQualifiedService) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[12] + 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 FullyQualifiedService.ProtoReflect.Descriptor instead. +func (*FullyQualifiedService) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{12} +} + +func (x *FullyQualifiedService) GetPackagePath() string { + if x != nil { + return x.PackagePath + } + return "" +} + +func (x *FullyQualifiedService) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +// ExportRequest informs the kernel that the given +// service id implements the named services on the +// host given. Note that the services provided must be +// distinct. +type ExportRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + Service []*FullyQualifiedService `protobuf:"bytes,2,rep,name=service,proto3" json:"service,omitempty"` + HostId *v1.IdRaw `protobuf:"bytes,3,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` +} + +func (x *ExportRequest) Reset() { + *x = ExportRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportRequest) ProtoMessage() {} + +func (x *ExportRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[13] + 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 ExportRequest.ProtoReflect.Descriptor instead. +func (*ExportRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{13} +} + +func (x *ExportRequest) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *ExportRequest) GetService() []*FullyQualifiedService { + if x != nil { + return x.Service + } + return nil +} + +func (x *ExportRequest) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +// Nothing to return. +type ExportResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ExportResponse) Reset() { + *x = ExportResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportResponse) ProtoMessage() {} + +func (x *ExportResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[14] + 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 ExportResponse.ProtoReflect.Descriptor instead. +func (*ExportResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{14} +} + +// Require establishes that the source given is going to import the service +// given by dest. It is not required that the source locate the dest, although +// if one does call locate, a check is done to insure require was called previously. +// This check is done to prevent a common programming mistake. +type RequireRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Dest []*FullyQualifiedService `protobuf:"bytes,1,rep,name=dest,proto3" json:"dest,omitempty"` + Source *v1.IdRaw `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` +} + +func (x *RequireRequest) Reset() { + *x = RequireRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequireRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequireRequest) ProtoMessage() {} + +func (x *RequireRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[15] + 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 RequireRequest.ProtoReflect.Descriptor instead. +func (*RequireRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{15} +} + +func (x *RequireRequest) GetDest() []*FullyQualifiedService { + if x != nil { + return x.Dest + } + return nil +} + +func (x *RequireRequest) GetSource() *v1.IdRaw { + if x != nil { + return x.Source + } + return nil +} + +// RequireResponse is currently empty. +type RequireResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RequireResponse) Reset() { + *x = RequireResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequireResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequireResponse) ProtoMessage() {} + +func (x *RequireResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[16] + 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 RequireResponse.ProtoReflect.Descriptor instead. +func (*RequireResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{16} +} + +// LaunchRequest is used to block a service until its depnedencies are ready. +// It returns a future to the guest that can be used to take action once +// launch is completed. +type LaunchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + CallId *v1.IdRaw `protobuf:"bytes,2,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` // reserved for internal use + HostId *v1.IdRaw `protobuf:"bytes,3,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` // reserved for internal use + MethodId *v1.IdRaw `protobuf:"bytes,4,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` // reserved for internal use +} + +func (x *LaunchRequest) Reset() { + *x = LaunchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchRequest) ProtoMessage() {} + +func (x *LaunchRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[17] + 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 LaunchRequest.ProtoReflect.Descriptor instead. +func (*LaunchRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{17} +} + +func (x *LaunchRequest) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *LaunchRequest) GetCallId() *v1.IdRaw { + if x != nil { + return x.CallId + } + return nil +} + +func (x *LaunchRequest) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *LaunchRequest) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +// LaunchResponse has nothing in it because the action will be handled by +// a future created as a result of LaunchRequest. +type LaunchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LaunchResponse) Reset() { + *x = LaunchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchResponse) ProtoMessage() {} + +func (x *LaunchResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[18] + 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 LaunchResponse.ProtoReflect.Descriptor instead. +func (*LaunchResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{18} +} + +// ExitRequest is how you can request for your wasm program, or the whole system +// to exit. This will not terminate the process immediately as there may be other +// services running that need to be notified. +type ExitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // For the code in the ExitPair, the valid values here are 0...192 and values>192 + // or <0 will be set to 192. The valid values for the service are a service id + // (typically the service making this request) or an zero valued service, indicating + // that the entire system should be brought down. + Pair *ExitPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + CallId *v1.IdRaw `protobuf:"bytes,2,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` // reserved for internal use + HostId *v1.IdRaw `protobuf:"bytes,3,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` // reserved for internal use + MethodId *v1.IdRaw `protobuf:"bytes,4,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` // reserved for internal use + ShutdownAll bool `protobuf:"varint,5,opt,name=shutdown_all,json=shutdownAll,proto3" json:"shutdown_all,omitempty"` +} + +func (x *ExitRequest) Reset() { + *x = ExitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExitRequest) ProtoMessage() {} + +func (x *ExitRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[19] + 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 ExitRequest.ProtoReflect.Descriptor instead. +func (*ExitRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{19} +} + +func (x *ExitRequest) GetPair() *ExitPair { + if x != nil { + return x.Pair + } + return nil +} + +func (x *ExitRequest) GetCallId() *v1.IdRaw { + if x != nil { + return x.CallId + } + return nil +} + +func (x *ExitRequest) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *ExitRequest) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +func (x *ExitRequest) GetShutdownAll() bool { + if x != nil { + return x.ShutdownAll + } + return false +} + +// ExitResponse will not happen. The stack will unwind before this +// message could be received. +type ExitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pair *ExitPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` +} + +func (x *ExitResponse) Reset() { + *x = ExitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExitResponse) ProtoMessage() {} + +func (x *ExitResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[20] + 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 ExitResponse.ProtoReflect.Descriptor instead. +func (*ExitResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{20} +} + +func (x *ExitResponse) GetPair() *ExitPair { + if x != nil { + return x.Pair + } + return nil +} + +// Register informs the kernel you are one of the running services +// and you want a service id. +type RegisterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HostId *v1.IdRaw `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` + DebugName string `protobuf:"bytes,2,opt,name=debug_name,json=debugName,proto3" json:"debug_name,omitempty"` +} + +func (x *RegisterRequest) Reset() { + *x = RegisterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterRequest) ProtoMessage() {} + +func (x *RegisterRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[21] + 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 RegisterRequest.ProtoReflect.Descriptor instead. +func (*RegisterRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{21} +} + +func (x *RegisterRequest) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *RegisterRequest) GetDebugName() string { + if x != nil { + return x.DebugName + } + return "" +} + +// RegisterResponse indicates if the registering caller has created +// the new service or not. +type RegisterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + ExistedPreviously bool `protobuf:"varint,2,opt,name=existed_previously,json=existedPreviously,proto3" json:"existed_previously,omitempty"` +} + +func (x *RegisterResponse) Reset() { + *x = RegisterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterResponse) ProtoMessage() {} + +func (x *RegisterResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[22] + 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 RegisterResponse.ProtoReflect.Descriptor instead. +func (*RegisterResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{22} +} + +func (x *RegisterResponse) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *RegisterResponse) GetExistedPreviously() bool { + if x != nil { + return x.ExistedPreviously + } + return false +} + +// HostBinding is the mapping between a service and a host. Note that a given +// host may be bound to many services, but a single service is always bound +// to exactly one host. +type HostBinding struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + HostId *v1.IdRaw `protobuf:"bytes,2,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` +} + +func (x *HostBinding) Reset() { + *x = HostBinding{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HostBinding) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HostBinding) ProtoMessage() {} + +func (x *HostBinding) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[23] + 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 HostBinding.ProtoReflect.Descriptor instead. +func (*HostBinding) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{23} +} + +func (x *HostBinding) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *HostBinding) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +// ServiceByName looks up the given service and returns all +// the host bindings associated with it. This does +// change the internal data structures, only reports on them. +type ServiceByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fqs *FullyQualifiedService `protobuf:"bytes,1,opt,name=fqs,proto3" json:"fqs,omitempty"` +} + +func (x *ServiceByNameRequest) Reset() { + *x = ServiceByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceByNameRequest) ProtoMessage() {} + +func (x *ServiceByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[24] + 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 ServiceByNameRequest.ProtoReflect.Descriptor instead. +func (*ServiceByNameRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{24} +} + +func (x *ServiceByNameRequest) GetFqs() *FullyQualifiedService { + if x != nil { + return x.Fqs + } + return nil +} + +// ServiceByNameResponse returns the list, possibly empty, +// that has all the host bindings for the named service. +type ServiceByNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Binding []*HostBinding `protobuf:"bytes,1,rep,name=binding,proto3" json:"binding,omitempty"` +} + +func (x *ServiceByNameResponse) Reset() { + *x = ServiceByNameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceByNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceByNameResponse) ProtoMessage() {} + +func (x *ServiceByNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[25] + 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 ServiceByNameResponse.ProtoReflect.Descriptor instead. +func (*ServiceByNameResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{25} +} + +func (x *ServiceByNameResponse) GetBinding() []*HostBinding { + if x != nil { + return x.Binding + } + return nil +} + +// ServiceByIdRequest looks up the given service by +// its string representation. This is probably only +// useful for passing service objects over the wire. +type ServiceByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` +} + +func (x *ServiceByIdRequest) Reset() { + *x = ServiceByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceByIdRequest) ProtoMessage() {} + +func (x *ServiceByIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[26] + 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 ServiceByIdRequest.ProtoReflect.Descriptor instead. +func (*ServiceByIdRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{26} +} + +func (x *ServiceByIdRequest) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +// ServiceByIdResponse returns host binding for the +// service or nothing. +type ServiceByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Binding *HostBinding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` +} + +func (x *ServiceByIdResponse) Reset() { + *x = ServiceByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceByIdResponse) ProtoMessage() {} + +func (x *ServiceByIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[27] + 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 ServiceByIdResponse.ProtoReflect.Descriptor instead. +func (*ServiceByIdResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{27} +} + +func (x *ServiceByIdResponse) GetBinding() *HostBinding { + if x != nil { + return x.Binding + } + return nil +} + +// DependencyExistsRequest is used to check if there a dependency +// path from source to destination. Callers should use either +// a target service or a target service name, not both. +// The semantics are slightly different. When you ask about the +// name of a service, it is a question about what the service +// has declared with require calls. When you ask about a specific +// service you are asking if a dependency path between the two services +// exists and thus the dest service must be started before the +// source. +type DependencyExistsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=source_service_id,json=sourceServiceId,proto3" json:"source_service_id,omitempty"` + DestServiceId *v1.IdRaw `protobuf:"bytes,2,opt,name=dest_service_id,json=destServiceId,proto3" json:"dest_service_id,omitempty"` + ServiceName *FullyQualifiedService `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` +} + +func (x *DependencyExistsRequest) Reset() { + *x = DependencyExistsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DependencyExistsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DependencyExistsRequest) ProtoMessage() {} + +func (x *DependencyExistsRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[28] + 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 DependencyExistsRequest.ProtoReflect.Descriptor instead. +func (*DependencyExistsRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{28} +} + +func (x *DependencyExistsRequest) GetSourceServiceId() *v1.IdRaw { + if x != nil { + return x.SourceServiceId + } + return nil +} + +func (x *DependencyExistsRequest) GetDestServiceId() *v1.IdRaw { + if x != nil { + return x.DestServiceId + } + return nil +} + +func (x *DependencyExistsRequest) GetServiceName() *FullyQualifiedService { + if x != nil { + return x.ServiceName + } + return nil +} + +// DependencyExistsResponse has the exists field set to +// true if there exists a sequence of dependencies that +// join source and dest (from the request). +type DependencyExistsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *DependencyExistsResponse) Reset() { + *x = DependencyExistsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DependencyExistsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DependencyExistsResponse) ProtoMessage() {} + +func (x *DependencyExistsResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[29] + 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 DependencyExistsResponse.ProtoReflect.Descriptor instead. +func (*DependencyExistsResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{29} +} + +func (x *DependencyExistsResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +// ServiceMethodCall is the structure that holds "what's been called" in a service. +type ServiceMethodCall struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + MethodId *v1.IdRaw `protobuf:"bytes,2,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` +} + +func (x *ServiceMethodCall) Reset() { + *x = ServiceMethodCall{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceMethodCall) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceMethodCall) ProtoMessage() {} + +func (x *ServiceMethodCall) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[30] + 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 ServiceMethodCall.ProtoReflect.Descriptor instead. +func (*ServiceMethodCall) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{30} +} + +func (x *ServiceMethodCall) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *ServiceMethodCall) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +// ResolvedCall is used to hold the output of a service/method call while we +// are waiting for the future to be resolved. Note that the host_id here is the +// host id of the SENDER of this message, so the place that the result was +// calculated. +type ResolvedCall struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HostId *v1.IdRaw `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` + CallId *v1.IdRaw `protobuf:"bytes,2,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` + MethodId *v1.IdRaw `protobuf:"bytes,3,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"` + Result *anypb.Any `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` + ResultError int32 `protobuf:"varint,5,opt,name=result_error,json=resultError,proto3" json:"result_error,omitempty"` +} + +func (x *ResolvedCall) Reset() { + *x = ResolvedCall{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResolvedCall) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolvedCall) ProtoMessage() {} + +func (x *ResolvedCall) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[31] + 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 ResolvedCall.ProtoReflect.Descriptor instead. +func (*ResolvedCall) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{31} +} + +func (x *ResolvedCall) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +func (x *ResolvedCall) GetCallId() *v1.IdRaw { + if x != nil { + return x.CallId + } + return nil +} + +func (x *ResolvedCall) GetMethodId() *v1.IdRaw { + if x != nil { + return x.MethodId + } + return nil +} + +func (x *ResolvedCall) GetResult() *anypb.Any { + if x != nil { + return x.Result + } + return nil +} + +func (x *ResolvedCall) GetResultError() int32 { + if x != nil { + return x.ResultError + } + return 0 +} + +// ReadOneRequest gives a set of service/method pairs +// that should be considered for a read. The ReadOne +// operation returns a single service/method pair that +// has received a call. If the timeout expires, only +// the timeout bool is returned. If the timeout value +// is 0, then an instanteous sample is returned. If +// the timeout value is negative, it means wait forever. +// In addition to potential calls on the service who +// requests this read, it is also possible that the +// return value represents a completed call from a previous +// point in the execution of the calling program. +type ReadOneRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TimeoutInMillis int32 `protobuf:"varint,1,opt,name=timeout_in_millis,json=timeoutInMillis,proto3" json:"timeout_in_millis,omitempty"` + HostId *v1.IdRaw `protobuf:"bytes,2,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` +} + +func (x *ReadOneRequest) Reset() { + *x = ReadOneRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadOneRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadOneRequest) ProtoMessage() {} + +func (x *ReadOneRequest) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[32] + 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 ReadOneRequest.ProtoReflect.Descriptor instead. +func (*ReadOneRequest) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{32} +} + +func (x *ReadOneRequest) GetTimeoutInMillis() int32 { + if x != nil { + return x.TimeoutInMillis + } + return 0 +} + +func (x *ReadOneRequest) GetHostId() *v1.IdRaw { + if x != nil { + return x.HostId + } + return nil +} + +// ReadOneResponse is returned when the control +// is turned over to parigot for a period of time via +// a call to ReadOne. +// ReadOneResponse returns timeout = true if a timeout +// has occurred. If timeout is true, all the other fields +// should be ignored. There are two types of results and +// these are mutually exclusive. +// +// If resolved is not nil, then this a notification that a +// call made by this program have completed. The +// resolved field holds information about the completed call, +// and that data needs to be matched with the appropriate call ids +// and the promises resolved. +// +// If resolved is nil, then the call is a call +// on a service and method exposed by this server. +// In that case the pair indicates the method and service +// being invoked, and the param and call id should be +// to create a matching ReturnValueRequest. +// +// Note that if the method denoted by the pair does not +// take input, the value of param should be ignored and +// it may be nil. +type ReadOneResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timeout bool `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"` + Bundle *MethodBundle `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` + ParamOrResult *anypb.Any `protobuf:"bytes,3,opt,name=param_or_result,json=paramOrResult,proto3" json:"param_or_result,omitempty"` + ResultErr int32 `protobuf:"varint,4,opt,name=result_err,json=resultErr,proto3" json:"result_err,omitempty"` + Resolved *ResolvedCall `protobuf:"bytes,5,opt,name=resolved,proto3" json:"resolved,omitempty"` + Exit *ExitPair `protobuf:"bytes,6,opt,name=exit,proto3" json:"exit,omitempty"` +} + +func (x *ReadOneResponse) Reset() { + *x = ReadOneResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadOneResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadOneResponse) ProtoMessage() {} + +func (x *ReadOneResponse) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[33] + 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 ReadOneResponse.ProtoReflect.Descriptor instead. +func (*ReadOneResponse) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{33} +} + +func (x *ReadOneResponse) GetTimeout() bool { + if x != nil { + return x.Timeout + } + return false +} + +func (x *ReadOneResponse) GetBundle() *MethodBundle { + if x != nil { + return x.Bundle + } + return nil +} + +func (x *ReadOneResponse) GetParamOrResult() *anypb.Any { + if x != nil { + return x.ParamOrResult + } + return nil +} + +func (x *ReadOneResponse) GetResultErr() int32 { + if x != nil { + return x.ResultErr + } + return 0 +} + +func (x *ReadOneResponse) GetResolved() *ResolvedCall { + if x != nil { + return x.Resolved + } + return nil +} + +func (x *ReadOneResponse) GetExit() *ExitPair { + if x != nil { + return x.Exit + } + return nil +} + +// ExitPair is a structure that is a service that is requesting +// an exit and the exit code desired. The service can be empty +// if the caller wants the entire suite of services to be exited. +// Code will be in the "allowed" range of 0 to 192. +type ExitPair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId *v1.IdRaw `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *ExitPair) Reset() { + *x = ExitPair{} + if protoimpl.UnsafeEnabled { + mi := &file_syscall_v1_syscall_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExitPair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExitPair) ProtoMessage() {} + +func (x *ExitPair) ProtoReflect() protoreflect.Message { + mi := &file_syscall_v1_syscall_proto_msgTypes[34] + 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 ExitPair.ProtoReflect.Descriptor instead. +func (*ExitPair) Descriptor() ([]byte, []int) { + return file_syscall_v1_syscall_proto_rawDescGZIP(), []int{34} +} + +func (x *ExitPair) GetServiceId() *v1.IdRaw { + if x != nil { + return x.ServiceId + } + return nil +} + +func (x *ExitPair) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +var File_syscall_v1_syscall_proto protoreflect.FileDescriptor + +var file_syscall_v1_syscall_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x73, + 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x79, 0x73, 0x63, + 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, + 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x33, + 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x63, 0x61, + 0x6c, 0x6c, 0x49, 0x64, 0x22, 0x65, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, + 0x77, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x0d, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, + 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x42, 0x79, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x0a, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, + 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x6f, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x62, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x79, + 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2a, 0x0a, + 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x44, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, + 0x0a, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x12, + 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, + 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x97, 0x01, + 0x0a, 0x12, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, + 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, + 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x61, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xbd, 0x01, 0x0a, 0x16, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, + 0x2e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x2a, 0x0a, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x74, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x11, 0x42, 0x69, 0x6e, + 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, + 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, + 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x79, 0x73, + 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x12, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x52, 0x61, 0x77, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x22, 0x54, 0x0a, + 0x15, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, + 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x79, + 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, + 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, 0x0a, 0x0e, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, + 0x0a, 0x04, 0x64, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, + 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x51, + 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x04, 0x64, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x4c, 0x61, 0x75, + 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, + 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, + 0x74, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x4c, 0x61, 0x75, 0x6e, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x0b, 0x45, + 0x78, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, + 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, + 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x69, 0x74, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, + 0x70, 0x61, 0x69, 0x72, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x63, + 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, + 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, + 0x77, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x6c, 0x6c, 0x22, 0x38, + 0x0a, 0x0c, 0x45, 0x78, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, + 0x0a, 0x04, 0x70, 0x61, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, + 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x69, 0x74, 0x50, 0x61, + 0x69, 0x72, 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x22, 0x61, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x10, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x22, 0x75, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, + 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x14, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x03, 0x66, 0x71, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x75, 0x6c, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x03, 0x66, 0x71, 0x73, 0x22, 0x4a, 0x0a, 0x15, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x33, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x13, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x22, 0xe3, 0x01, 0x0a, 0x17, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x42, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x52, 0x61, 0x77, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x79, 0x73, + 0x63, 0x61, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x51, 0x75, 0x61, + 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0b, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x32, 0x0a, 0x18, 0x44, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x7f, + 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, + 0x61, 0x6c, 0x6c, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, + 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x22, + 0xf6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, + 0x12, 0x2f, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, + 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, + 0x49, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x6d, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, + 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, + 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, + 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x9a, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, + 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, + 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x5f, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x4f, 0x72, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, + 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x45, 0x72, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x65, 0x78, + 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x61, + 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x69, 0x74, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, + 0x65, 0x78, 0x69, 0x74, 0x22, 0x55, 0x0a, 0x08, 0x45, 0x78, 0x69, 0x74, 0x50, 0x61, 0x69, 0x72, + 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, 0x61, 0x77, 0x52, 0x09, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xa7, 0x05, 0x0a, 0x09, + 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x45, 0x72, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x6f, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x6e, 0x6d, 0x61, 0x72, + 0x73, 0x68, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, + 0x49, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, + 0x65, 0x64, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, + 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x6f, 0x4c, 0x61, 0x72, + 0x67, 0x65, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x46, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x08, 0x12, 0x22, + 0x0a, 0x1e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x4f, 0x72, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x10, 0x09, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x0a, 0x12, 0x13, + 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x79, 0x63, 0x6c, + 0x65, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x10, 0x0c, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x73, 0x74, 0x10, + 0x0d, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x6f, 0x53, 0x6d, 0x61, 0x6c, + 0x6c, 0x10, 0x0e, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x0f, 0x12, + 0x11, 0x0a, 0x0d, 0x4e, 0x53, 0x52, 0x65, 0x74, 0x72, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0x11, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x10, 0x12, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x10, 0x13, 0x12, + 0x10, 0x0a, 0x0c, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, + 0x14, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x10, 0x16, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x45, 0x72, 0x72, 0x10, + 0x17, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x61, 0x64, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x10, 0x18, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x75, 0x65, 0x73, 0x74, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x19, 0x12, 0x09, 0x0a, 0x05, + 0x42, 0x61, 0x64, 0x49, 0x64, 0x10, 0x1a, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x52, 0x65, + 0x61, 0x64, 0x79, 0x10, 0x1b, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x10, 0x1c, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x10, 0x1d, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0x1e, 0x12, 0x10, 0x0a, 0x0c, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0x1f, 0x12, 0x0d, 0x0a, 0x09, + 0x42, 0x61, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x10, 0x21, 0x12, 0x0e, + 0x0a, 0x0a, 0x45, 0x78, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x22, 0x1a, 0x05, + 0xd8, 0x9e, 0x89, 0x02, 0x01, 0x2a, 0x81, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x1c, 0x4d, 0x45, 0x54, + 0x48, 0x4f, 0x44, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, + 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x49, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, + 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x19, + 0x0a, 0x15, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x54, 0x48, 0x10, 0x03, 0x42, 0x16, 0x5a, 0x14, 0x67, 0x2f, 0x73, + 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, + 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_syscall_v1_syscall_proto_rawDescOnce sync.Once + file_syscall_v1_syscall_proto_rawDescData = file_syscall_v1_syscall_proto_rawDesc +) + +func file_syscall_v1_syscall_proto_rawDescGZIP() []byte { + file_syscall_v1_syscall_proto_rawDescOnce.Do(func() { + file_syscall_v1_syscall_proto_rawDescData = protoimpl.X.CompressGZIP(file_syscall_v1_syscall_proto_rawDescData) + }) + return file_syscall_v1_syscall_proto_rawDescData +} + +var file_syscall_v1_syscall_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_syscall_v1_syscall_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_syscall_v1_syscall_proto_goTypes = []interface{}{ + (KernelErr)(0), // 0: syscall.v1.KernelErr + (MethodDirection)(0), // 1: syscall.v1.MethodDirection + (*MethodBundle)(nil), // 2: syscall.v1.MethodBundle + (*MethodBinding)(nil), // 3: syscall.v1.MethodBinding + (*LocateRequest)(nil), // 4: syscall.v1.LocateRequest + (*LocateResponse)(nil), // 5: syscall.v1.LocateResponse + (*DispatchRequest)(nil), // 6: syscall.v1.DispatchRequest + (*DispatchResponse)(nil), // 7: syscall.v1.DispatchResponse + (*ReturnValueRequest)(nil), // 8: syscall.v1.ReturnValueRequest + (*ReturnValueResponse)(nil), // 9: syscall.v1.ReturnValueResponse + (*BlockUntilCallRequest)(nil), // 10: syscall.v1.BlockUntilCallRequest + (*BlockUntilCallResponse)(nil), // 11: syscall.v1.BlockUntilCallResponse + (*BindMethodRequest)(nil), // 12: syscall.v1.BindMethodRequest + (*BindMethodResponse)(nil), // 13: syscall.v1.BindMethodResponse + (*FullyQualifiedService)(nil), // 14: syscall.v1.FullyQualifiedService + (*ExportRequest)(nil), // 15: syscall.v1.ExportRequest + (*ExportResponse)(nil), // 16: syscall.v1.ExportResponse + (*RequireRequest)(nil), // 17: syscall.v1.RequireRequest + (*RequireResponse)(nil), // 18: syscall.v1.RequireResponse + (*LaunchRequest)(nil), // 19: syscall.v1.LaunchRequest + (*LaunchResponse)(nil), // 20: syscall.v1.LaunchResponse + (*ExitRequest)(nil), // 21: syscall.v1.ExitRequest + (*ExitResponse)(nil), // 22: syscall.v1.ExitResponse + (*RegisterRequest)(nil), // 23: syscall.v1.RegisterRequest + (*RegisterResponse)(nil), // 24: syscall.v1.RegisterResponse + (*HostBinding)(nil), // 25: syscall.v1.HostBinding + (*ServiceByNameRequest)(nil), // 26: syscall.v1.ServiceByNameRequest + (*ServiceByNameResponse)(nil), // 27: syscall.v1.ServiceByNameResponse + (*ServiceByIdRequest)(nil), // 28: syscall.v1.ServiceByIdRequest + (*ServiceByIdResponse)(nil), // 29: syscall.v1.ServiceByIdResponse + (*DependencyExistsRequest)(nil), // 30: syscall.v1.DependencyExistsRequest + (*DependencyExistsResponse)(nil), // 31: syscall.v1.DependencyExistsResponse + (*ServiceMethodCall)(nil), // 32: syscall.v1.ServiceMethodCall + (*ResolvedCall)(nil), // 33: syscall.v1.ResolvedCall + (*ReadOneRequest)(nil), // 34: syscall.v1.ReadOneRequest + (*ReadOneResponse)(nil), // 35: syscall.v1.ReadOneResponse + (*ExitPair)(nil), // 36: syscall.v1.ExitPair + (*v1.IdRaw)(nil), // 37: protosupport.v1.IdRaw + (*anypb.Any)(nil), // 38: google.protobuf.Any +} +var file_syscall_v1_syscall_proto_depIdxs = []int32{ + 37, // 0: syscall.v1.MethodBundle.host_id:type_name -> protosupport.v1.IdRaw + 37, // 1: syscall.v1.MethodBundle.service_id:type_name -> protosupport.v1.IdRaw + 37, // 2: syscall.v1.MethodBundle.method_id:type_name -> protosupport.v1.IdRaw + 37, // 3: syscall.v1.MethodBundle.call_id:type_name -> protosupport.v1.IdRaw + 37, // 4: syscall.v1.MethodBinding.method_id:type_name -> protosupport.v1.IdRaw + 37, // 5: syscall.v1.LocateRequest.called_by:type_name -> protosupport.v1.IdRaw + 37, // 6: syscall.v1.LocateResponse.host_id:type_name -> protosupport.v1.IdRaw + 37, // 7: syscall.v1.LocateResponse.service_id:type_name -> protosupport.v1.IdRaw + 3, // 8: syscall.v1.LocateResponse.binding:type_name -> syscall.v1.MethodBinding + 2, // 9: syscall.v1.DispatchRequest.bundle:type_name -> syscall.v1.MethodBundle + 38, // 10: syscall.v1.DispatchRequest.param:type_name -> google.protobuf.Any + 37, // 11: syscall.v1.DispatchResponse.call_id:type_name -> protosupport.v1.IdRaw + 37, // 12: syscall.v1.DispatchResponse.target_host_id:type_name -> protosupport.v1.IdRaw + 2, // 13: syscall.v1.ReturnValueRequest.bundle:type_name -> syscall.v1.MethodBundle + 38, // 14: syscall.v1.ReturnValueRequest.result:type_name -> google.protobuf.Any + 38, // 15: syscall.v1.BlockUntilCallResponse.param:type_name -> google.protobuf.Any + 37, // 16: syscall.v1.BlockUntilCallResponse.method:type_name -> protosupport.v1.IdRaw + 37, // 17: syscall.v1.BlockUntilCallResponse.call:type_name -> protosupport.v1.IdRaw + 37, // 18: syscall.v1.BindMethodRequest.host_id:type_name -> protosupport.v1.IdRaw + 37, // 19: syscall.v1.BindMethodRequest.service_id:type_name -> protosupport.v1.IdRaw + 1, // 20: syscall.v1.BindMethodRequest.direction:type_name -> syscall.v1.MethodDirection + 37, // 21: syscall.v1.BindMethodResponse.method_id:type_name -> protosupport.v1.IdRaw + 37, // 22: syscall.v1.ExportRequest.service_id:type_name -> protosupport.v1.IdRaw + 14, // 23: syscall.v1.ExportRequest.service:type_name -> syscall.v1.FullyQualifiedService + 37, // 24: syscall.v1.ExportRequest.host_id:type_name -> protosupport.v1.IdRaw + 14, // 25: syscall.v1.RequireRequest.dest:type_name -> syscall.v1.FullyQualifiedService + 37, // 26: syscall.v1.RequireRequest.source:type_name -> protosupport.v1.IdRaw + 37, // 27: syscall.v1.LaunchRequest.service_id:type_name -> protosupport.v1.IdRaw + 37, // 28: syscall.v1.LaunchRequest.call_id:type_name -> protosupport.v1.IdRaw + 37, // 29: syscall.v1.LaunchRequest.host_id:type_name -> protosupport.v1.IdRaw + 37, // 30: syscall.v1.LaunchRequest.method_id:type_name -> protosupport.v1.IdRaw + 36, // 31: syscall.v1.ExitRequest.pair:type_name -> syscall.v1.ExitPair + 37, // 32: syscall.v1.ExitRequest.call_id:type_name -> protosupport.v1.IdRaw + 37, // 33: syscall.v1.ExitRequest.host_id:type_name -> protosupport.v1.IdRaw + 37, // 34: syscall.v1.ExitRequest.method_id:type_name -> protosupport.v1.IdRaw + 36, // 35: syscall.v1.ExitResponse.pair:type_name -> syscall.v1.ExitPair + 37, // 36: syscall.v1.RegisterRequest.host_id:type_name -> protosupport.v1.IdRaw + 37, // 37: syscall.v1.RegisterResponse.service_id:type_name -> protosupport.v1.IdRaw + 37, // 38: syscall.v1.HostBinding.service_id:type_name -> protosupport.v1.IdRaw + 37, // 39: syscall.v1.HostBinding.host_id:type_name -> protosupport.v1.IdRaw + 14, // 40: syscall.v1.ServiceByNameRequest.fqs:type_name -> syscall.v1.FullyQualifiedService + 25, // 41: syscall.v1.ServiceByNameResponse.binding:type_name -> syscall.v1.HostBinding + 25, // 42: syscall.v1.ServiceByIdResponse.binding:type_name -> syscall.v1.HostBinding + 37, // 43: syscall.v1.DependencyExistsRequest.source_service_id:type_name -> protosupport.v1.IdRaw + 37, // 44: syscall.v1.DependencyExistsRequest.dest_service_id:type_name -> protosupport.v1.IdRaw + 14, // 45: syscall.v1.DependencyExistsRequest.service_name:type_name -> syscall.v1.FullyQualifiedService + 37, // 46: syscall.v1.ServiceMethodCall.service_id:type_name -> protosupport.v1.IdRaw + 37, // 47: syscall.v1.ServiceMethodCall.method_id:type_name -> protosupport.v1.IdRaw + 37, // 48: syscall.v1.ResolvedCall.host_id:type_name -> protosupport.v1.IdRaw + 37, // 49: syscall.v1.ResolvedCall.call_id:type_name -> protosupport.v1.IdRaw + 37, // 50: syscall.v1.ResolvedCall.method_id:type_name -> protosupport.v1.IdRaw + 38, // 51: syscall.v1.ResolvedCall.result:type_name -> google.protobuf.Any + 37, // 52: syscall.v1.ReadOneRequest.host_id:type_name -> protosupport.v1.IdRaw + 2, // 53: syscall.v1.ReadOneResponse.bundle:type_name -> syscall.v1.MethodBundle + 38, // 54: syscall.v1.ReadOneResponse.param_or_result:type_name -> google.protobuf.Any + 33, // 55: syscall.v1.ReadOneResponse.resolved:type_name -> syscall.v1.ResolvedCall + 36, // 56: syscall.v1.ReadOneResponse.exit:type_name -> syscall.v1.ExitPair + 37, // 57: syscall.v1.ExitPair.service_id:type_name -> protosupport.v1.IdRaw + 58, // [58:58] is the sub-list for method output_type + 58, // [58:58] is the sub-list for method input_type + 58, // [58:58] is the sub-list for extension type_name + 58, // [58:58] is the sub-list for extension extendee + 0, // [0:58] is the sub-list for field type_name +} + +func init() { file_syscall_v1_syscall_proto_init() } +func file_syscall_v1_syscall_proto_init() { + if File_syscall_v1_syscall_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_syscall_v1_syscall_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodBinding); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DispatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DispatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReturnValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReturnValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockUntilCallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockUntilCallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BindMethodRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BindMethodResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FullyQualifiedService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequireRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequireResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HostBinding); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceByNameResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceByIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DependencyExistsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DependencyExistsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceMethodCall); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResolvedCall); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadOneResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_syscall_v1_syscall_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExitPair); 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_syscall_v1_syscall_proto_rawDesc, + NumEnums: 2, + NumMessages: 35, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_syscall_v1_syscall_proto_goTypes, + DependencyIndexes: file_syscall_v1_syscall_proto_depIdxs, + EnumInfos: file_syscall_v1_syscall_proto_enumTypes, + MessageInfos: file_syscall_v1_syscall_proto_msgTypes, + }.Build() + File_syscall_v1_syscall_proto = out.File + file_syscall_v1_syscall_proto_rawDesc = nil + file_syscall_v1_syscall_proto_goTypes = nil + file_syscall_v1_syscall_proto_depIdxs = nil +} diff --git a/g/test/v1/test.pb.go b/g/test/v1/test.pb.go new file mode 100644 index 00000000..147a0739 --- /dev/null +++ b/g/test/v1/test.pb.go @@ -0,0 +1,1248 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: test/v1/test.proto + +package test + +import ( + v1 "github.com/iansmith/parigot/g/protosupport/v1" + 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) +) + +// Error codes +type TestErr int32 + +const ( + TestErr_NoError TestErr = 0 // mandatory + TestErr_DispatchError TestErr = 1 // used by generated code + TestErr_UnmarshalError TestErr = 2 //used by generated code + // ServiceNotFound means that the service that was supposed to be under test + // could not be found. + TestErr_ServiceNotFound TestErr = 3 + // Exec means that the exec itself (not the thing being execed) has failed. + TestErr_Exec TestErr = 4 + // SendFailed means that the Test code itself could not create the + // necessary queue entries. + TestErr_SendFailed TestErr = 5 + // Internal means that the Test code itself (not the code under test) has had + // a problem. + TestErr_Internal TestErr = 6 + // RegexpFailed means that the regexp provided by the caller did not compile + // and is not a valid go regexp. + TestErr_RegexpFailed TestErr = 7 + // Marshal is used to when we cannot marshal arguments + // into to a protobuf. + TestErr_Marshal TestErr = 8 + // Queue means that the there was internal error with the queue + // that is used by the Test service. + TestErr_Queue TestErr = 9 + // DynamicLocate is returned when we cannot discover the protobuf + // package and service name pair provided. + TestErr_DynamicLocate TestErr = 10 +) + +// Enum value maps for TestErr. +var ( + TestErr_name = map[int32]string{ + 0: "NoError", + 1: "DispatchError", + 2: "UnmarshalError", + 3: "ServiceNotFound", + 4: "Exec", + 5: "SendFailed", + 6: "Internal", + 7: "RegexpFailed", + 8: "Marshal", + 9: "Queue", + 10: "DynamicLocate", + } + TestErr_value = map[string]int32{ + "NoError": 0, + "DispatchError": 1, + "UnmarshalError": 2, + "ServiceNotFound": 3, + "Exec": 4, + "SendFailed": 5, + "Internal": 6, + "RegexpFailed": 7, + "Marshal": 8, + "Queue": 9, + "DynamicLocate": 10, + } +) + +func (x TestErr) Enum() *TestErr { + p := new(TestErr) + *p = x + return p +} + +func (x TestErr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TestErr) Descriptor() protoreflect.EnumDescriptor { + return file_test_v1_test_proto_enumTypes[0].Descriptor() +} + +func (TestErr) Type() protoreflect.EnumType { + return &file_test_v1_test_proto_enumTypes[0] +} + +func (x TestErr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TestErr.Descriptor instead. +func (TestErr) EnumDescriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{0} +} + +// AddTestSuiteRequest adds one or more test suites to the list of available +// suites for the TestService. +type AddTestSuiteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Suite []*SuiteInfo `protobuf:"bytes,1,rep,name=suite,proto3" json:"suite,omitempty"` + ExecPackage string `protobuf:"bytes,2,opt,name=exec_package,json=execPackage,proto3" json:"exec_package,omitempty"` + ExecService string `protobuf:"bytes,3,opt,name=exec_service,json=execService,proto3" json:"exec_service,omitempty"` +} + +func (x *AddTestSuiteRequest) Reset() { + *x = AddTestSuiteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddTestSuiteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddTestSuiteRequest) ProtoMessage() {} + +func (x *AddTestSuiteRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_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 AddTestSuiteRequest.ProtoReflect.Descriptor instead. +func (*AddTestSuiteRequest) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{0} +} + +func (x *AddTestSuiteRequest) GetSuite() []*SuiteInfo { + if x != nil { + return x.Suite + } + return nil +} + +func (x *AddTestSuiteRequest) GetExecPackage() string { + if x != nil { + return x.ExecPackage + } + return "" +} + +func (x *AddTestSuiteRequest) GetExecService() string { + if x != nil { + return x.ExecService + } + return "" +} + +// AddTestSuiteResponse contains a map that takes a tuple, written as +// pkg.service.name, and maps it to a boolean to indicate if the given +// tuple was added successfully. +type AddTestSuiteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Succeeded map[string]bool `protobuf:"bytes,1,rep,name=succeeded,proto3" json:"succeeded,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *AddTestSuiteResponse) Reset() { + *x = AddTestSuiteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddTestSuiteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddTestSuiteResponse) ProtoMessage() {} + +func (x *AddTestSuiteResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_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 AddTestSuiteResponse.ProtoReflect.Descriptor instead. +func (*AddTestSuiteResponse) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{1} +} + +func (x *AddTestSuiteResponse) GetSucceeded() map[string]bool { + if x != nil { + return x.Succeeded + } + return nil +} + +// StartRequest is what the client should use to start the tests running. +// The provided data is exclusive, if filter_suite is provided filter_name +// may not be, and vice versa. Both the suite and name filters may be empty +// to request running all tests. filter_name and filter_suite must be legal +// golang regular expressions. Parallel is currently ignored. +type StartRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FilterSuite string `protobuf:"bytes,1,opt,name=filter_suite,json=filterSuite,proto3" json:"filter_suite,omitempty"` + FilterName string `protobuf:"bytes,2,opt,name=filter_name,json=filterName,proto3" json:"filter_name,omitempty"` + Parallel bool `protobuf:"varint,3,opt,name=parallel,proto3" json:"parallel,omitempty"` +} + +func (x *StartRequest) Reset() { + *x = StartRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartRequest) ProtoMessage() {} + +func (x *StartRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_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 StartRequest.ProtoReflect.Descriptor instead. +func (*StartRequest) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{2} +} + +func (x *StartRequest) GetFilterSuite() string { + if x != nil { + return x.FilterSuite + } + return "" +} + +func (x *StartRequest) GetFilterName() string { + if x != nil { + return x.FilterName + } + return "" +} + +func (x *StartRequest) GetParallel() bool { + if x != nil { + return x.Parallel + } + return false +} + +// StartResponse returns the number of tests that will be run, given +// the filters provided in StartRequest. If regex_failed means that one +// of the regex fields (filter_suite or filter_name) was not a valid +// golang regex. +type StartResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RegexFailed bool `protobuf:"varint,1,opt,name=regex_failed,json=regexFailed,proto3" json:"regex_failed,omitempty"` // so common we don't even call it an error + NumTest int32 `protobuf:"varint,2,opt,name=num_test,json=numTest,proto3" json:"num_test,omitempty"` +} + +func (x *StartResponse) Reset() { + *x = StartResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartResponse) ProtoMessage() {} + +func (x *StartResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_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 StartResponse.ProtoReflect.Descriptor instead. +func (*StartResponse) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{3} +} + +func (x *StartResponse) GetRegexFailed() bool { + if x != nil { + return x.RegexFailed + } + return false +} + +func (x *StartResponse) GetNumTest() int32 { + if x != nil { + return x.NumTest + } + return 0 +} + +// SuiteInfo is used to describe the set of test functions that a +// suite has. The map provided goes from the logical name of the +// test ("MyFunc") to the function the test service will actually +// request ("MyTrickyDispatcher"). The key and value can be identical in +// the simple case. +type SuiteInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackagePath string `protobuf:"bytes,1,opt,name=package_path,json=packagePath,proto3" json:"package_path,omitempty"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + FunctionName []string `protobuf:"bytes,3,rep,name=function_name,json=functionName,proto3" json:"function_name,omitempty"` +} + +func (x *SuiteInfo) Reset() { + *x = SuiteInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuiteInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuiteInfo) ProtoMessage() {} + +func (x *SuiteInfo) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_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 SuiteInfo.ProtoReflect.Descriptor instead. +func (*SuiteInfo) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{4} +} + +func (x *SuiteInfo) GetPackagePath() string { + if x != nil { + return x.PackagePath + } + return "" +} + +func (x *SuiteInfo) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *SuiteInfo) GetFunctionName() []string { + if x != nil { + return x.FunctionName + } + return nil +} + +// Comparison result describes a single comparison that was done during +// a test. This result is generally optional inside a ExecResult. The +// name field is not the package, service, or function name, it is a name +// that can used to narrow down to a single comparison. name can be "", +// as can error_message. The error_id can be nil. These can be zero +// value because they are not crucial to the display of the results, although +// it is highly recommended that if the success == false, then one of +// error_message or error_id is set. +type ComparisonResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + ErrorId *v1.IdRaw `protobuf:"bytes,3,opt,name=error_id,json=errorId,proto3" json:"error_id,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *ComparisonResult) Reset() { + *x = ComparisonResult{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComparisonResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComparisonResult) ProtoMessage() {} + +func (x *ComparisonResult) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_proto_msgTypes[5] + 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 ComparisonResult.ProtoReflect.Descriptor instead. +func (*ComparisonResult) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{5} +} + +func (x *ComparisonResult) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ComparisonResult) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *ComparisonResult) GetErrorId() *v1.IdRaw { + if x != nil { + return x.ErrorId + } + return nil +} + +func (x *ComparisonResult) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +// ExecRequest is the type that flows _from_ the TestService to the +// package.service.func that is under test. The package, service, and +// name are in the request message because the callee might be doing +// trickery with names (see the map field in the SuiteInfo) and +// thus needs to know what to emulate, dispatch, etc. +type ExecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ExecRequest) Reset() { + *x = ExecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecRequest) ProtoMessage() {} + +func (x *ExecRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_proto_msgTypes[6] + 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 ExecRequest.ProtoReflect.Descriptor instead. +func (*ExecRequest) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{6} +} + +func (x *ExecRequest) GetPackage() string { + if x != nil { + return x.Package + } + return "" +} + +func (x *ExecRequest) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *ExecRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// ExecResponse is what an object under test sends back to the TestService +// describing the test outcome. A single package/service/name can have +// many comparisons. +type ExecResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Skipped bool `protobuf:"varint,2,opt,name=skipped,proto3" json:"skipped,omitempty"` + Package string `protobuf:"bytes,3,opt,name=package,proto3" json:"package,omitempty"` + Service string `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Detail []*ComparisonResult `protobuf:"bytes,6,rep,name=detail,proto3" json:"detail,omitempty"` +} + +func (x *ExecResponse) Reset() { + *x = ExecResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecResponse) ProtoMessage() {} + +func (x *ExecResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_proto_msgTypes[7] + 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 ExecResponse.ProtoReflect.Descriptor instead. +func (*ExecResponse) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{7} +} + +func (x *ExecResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *ExecResponse) GetSkipped() bool { + if x != nil { + return x.Skipped + } + return false +} + +func (x *ExecResponse) GetPackage() string { + if x != nil { + return x.Package + } + return "" +} + +func (x *ExecResponse) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *ExecResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecResponse) GetDetail() []*ComparisonResult { + if x != nil { + return x.Detail + } + return nil +} + +// SuiteReportRequest is passed to the suite _from_ the TestService and +// contains overall information about the suite's tests. The maps have a key +// that is the logical function name (the key in the map of SuiteRequest). +type SuiteReportRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + NumSuccess int32 `protobuf:"varint,2,opt,name=num_success,json=numSuccess,proto3" json:"num_success,omitempty"` + NumFailure int32 `protobuf:"varint,3,opt,name=num_failure,json=numFailure,proto3" json:"num_failure,omitempty"` + NumSkip int32 `protobuf:"varint,4,opt,name=num_skip,json=numSkip,proto3" json:"num_skip,omitempty"` + Package string `protobuf:"bytes,5,opt,name=package,proto3" json:"package,omitempty"` + Service string `protobuf:"bytes,6,opt,name=service,proto3" json:"service,omitempty"` + TestSuccess map[string]bool `protobuf:"bytes,7,rep,name=test_success,json=testSuccess,proto3" json:"test_success,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + TestSkip map[string]bool `protobuf:"bytes,8,rep,name=test_skip,json=testSkip,proto3" json:"test_skip,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Detail map[string]*ComparisonResult `protobuf:"bytes,9,rep,name=detail,proto3" json:"detail,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SuiteReportRequest) Reset() { + *x = SuiteReportRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuiteReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuiteReportRequest) ProtoMessage() {} + +func (x *SuiteReportRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_proto_msgTypes[8] + 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 SuiteReportRequest.ProtoReflect.Descriptor instead. +func (*SuiteReportRequest) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{8} +} + +func (x *SuiteReportRequest) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *SuiteReportRequest) GetNumSuccess() int32 { + if x != nil { + return x.NumSuccess + } + return 0 +} + +func (x *SuiteReportRequest) GetNumFailure() int32 { + if x != nil { + return x.NumFailure + } + return 0 +} + +func (x *SuiteReportRequest) GetNumSkip() int32 { + if x != nil { + return x.NumSkip + } + return 0 +} + +func (x *SuiteReportRequest) GetPackage() string { + if x != nil { + return x.Package + } + return "" +} + +func (x *SuiteReportRequest) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *SuiteReportRequest) GetTestSuccess() map[string]bool { + if x != nil { + return x.TestSuccess + } + return nil +} + +func (x *SuiteReportRequest) GetTestSkip() map[string]bool { + if x != nil { + return x.TestSkip + } + return nil +} + +func (x *SuiteReportRequest) GetDetail() map[string]*ComparisonResult { + if x != nil { + return x.Detail + } + return nil +} + +// SuiteReportResponse is empty because there is nothing valuable that +// can be sent from the suite to the TestService. +type SuiteReportResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SuiteReportResponse) Reset() { + *x = SuiteReportResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuiteReportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuiteReportResponse) ProtoMessage() {} + +func (x *SuiteReportResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_proto_msgTypes[9] + 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 SuiteReportResponse.ProtoReflect.Descriptor instead. +func (*SuiteReportResponse) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{9} +} + +// QueuePayload is the payload that is sent to the TestService via sending +// and receiving items from the queue. Note that the TestSends these messages +// during setup and retreives them in the background once the tests have started. +type QueuePayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + FuncName string `protobuf:"bytes,2,opt,name=func_name,json=funcName,proto3" json:"func_name,omitempty"` +} + +func (x *QueuePayload) Reset() { + *x = QueuePayload{} + if protoimpl.UnsafeEnabled { + mi := &file_test_v1_test_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueuePayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueuePayload) ProtoMessage() {} + +func (x *QueuePayload) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_proto_msgTypes[10] + 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 QueuePayload.ProtoReflect.Descriptor instead. +func (*QueuePayload) Descriptor() ([]byte, []int) { + return file_test_v1_test_proto_rawDescGZIP(), []int{10} +} + +func (x *QueuePayload) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *QueuePayload) GetFuncName() string { + if x != nil { + return x.FuncName + } + return "" +} + +var File_test_v1_test_proto protoreflect.FileDescriptor + +var file_test_v1_test_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x54, 0x65, 0x73, 0x74, 0x53, 0x75, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x75, 0x69, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x75, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x73, 0x75, + 0x69, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, + 0x65, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x64, + 0x64, 0x54, 0x65, 0x73, 0x74, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x64, 0x64, 0x54, 0x65, 0x73, 0x74, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x1a, 0x3c, + 0x0a, 0x0e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, + 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, + 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6e, 0x0a, 0x0c, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x22, 0x4d, 0x0a, 0x0d, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x65, 0x78, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x54, 0x65, 0x73, 0x74, 0x22, 0x6d, 0x0a, 0x09, 0x53, + 0x75, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x10, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x52, + 0x61, 0x77, 0x52, 0x07, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x55, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, + 0x0c, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0xec, 0x04, 0x0a, + 0x12, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x53, 0x6b, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, + 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x46, 0x0a, 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x6b, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, + 0x65, 0x73, 0x74, 0x53, 0x6b, 0x69, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x1a, 0x3e, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x08, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x54, 0x65, 0x73, 0x74, + 0x53, 0x6b, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x54, 0x0a, 0x0b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x15, 0x0a, 0x13, 0x53, + 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x4e, + 0x61, 0x6d, 0x65, 0x2a, 0xbe, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x45, 0x72, 0x72, 0x12, + 0x0b, 0x0a, 0x07, 0x4e, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, + 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x6f, + 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, + 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x06, + 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x10, 0x08, 0x12, + 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x75, 0x65, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x10, 0x0a, 0x1a, 0x05, 0xd8, + 0x9e, 0x89, 0x02, 0x01, 0x32, 0x8b, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, + 0x0c, 0x41, 0x64, 0x64, 0x54, 0x65, 0x73, 0x74, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x65, 0x73, 0x74, 0x53, + 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x65, 0x73, 0x74, 0x53, 0x75, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0x9e, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x61, 0x6c, + 0x6c, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x14, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x53, + 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0c, 0xea, 0x9e, 0x89, 0x02, 0x07, 0x54, 0x65, 0x73, 0x74, + 0x45, 0x72, 0x72, 0x32, 0x62, 0x0a, 0x09, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x73, 0x74, + 0x12, 0x47, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0xe2, 0x9e, 0x89, 0x02, 0x0d, 0x45, 0x78, 0x65, 0x63, + 0x55, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0xea, 0x9e, 0x89, 0x02, 0x07, + 0x54, 0x65, 0x73, 0x74, 0x45, 0x72, 0x72, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x2f, 0x70, + 0x61, 0x72, 0x69, 0x67, 0x6f, 0x74, 0x2f, 0x67, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, + 0x3b, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_test_v1_test_proto_rawDescOnce sync.Once + file_test_v1_test_proto_rawDescData = file_test_v1_test_proto_rawDesc +) + +func file_test_v1_test_proto_rawDescGZIP() []byte { + file_test_v1_test_proto_rawDescOnce.Do(func() { + file_test_v1_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_v1_test_proto_rawDescData) + }) + return file_test_v1_test_proto_rawDescData +} + +var file_test_v1_test_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_test_v1_test_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_test_v1_test_proto_goTypes = []interface{}{ + (TestErr)(0), // 0: test.v1.TestErr + (*AddTestSuiteRequest)(nil), // 1: test.v1.AddTestSuiteRequest + (*AddTestSuiteResponse)(nil), // 2: test.v1.AddTestSuiteResponse + (*StartRequest)(nil), // 3: test.v1.StartRequest + (*StartResponse)(nil), // 4: test.v1.StartResponse + (*SuiteInfo)(nil), // 5: test.v1.SuiteInfo + (*ComparisonResult)(nil), // 6: test.v1.ComparisonResult + (*ExecRequest)(nil), // 7: test.v1.ExecRequest + (*ExecResponse)(nil), // 8: test.v1.ExecResponse + (*SuiteReportRequest)(nil), // 9: test.v1.SuiteReportRequest + (*SuiteReportResponse)(nil), // 10: test.v1.SuiteReportResponse + (*QueuePayload)(nil), // 11: test.v1.QueuePayload + nil, // 12: test.v1.AddTestSuiteResponse.SucceededEntry + nil, // 13: test.v1.SuiteReportRequest.TestSuccessEntry + nil, // 14: test.v1.SuiteReportRequest.TestSkipEntry + nil, // 15: test.v1.SuiteReportRequest.DetailEntry + (*v1.IdRaw)(nil), // 16: protosupport.v1.IdRaw +} +var file_test_v1_test_proto_depIdxs = []int32{ + 5, // 0: test.v1.AddTestSuiteRequest.suite:type_name -> test.v1.SuiteInfo + 12, // 1: test.v1.AddTestSuiteResponse.succeeded:type_name -> test.v1.AddTestSuiteResponse.SucceededEntry + 16, // 2: test.v1.ComparisonResult.error_id:type_name -> protosupport.v1.IdRaw + 6, // 3: test.v1.ExecResponse.detail:type_name -> test.v1.ComparisonResult + 13, // 4: test.v1.SuiteReportRequest.test_success:type_name -> test.v1.SuiteReportRequest.TestSuccessEntry + 14, // 5: test.v1.SuiteReportRequest.test_skip:type_name -> test.v1.SuiteReportRequest.TestSkipEntry + 15, // 6: test.v1.SuiteReportRequest.detail:type_name -> test.v1.SuiteReportRequest.DetailEntry + 6, // 7: test.v1.SuiteReportRequest.DetailEntry.value:type_name -> test.v1.ComparisonResult + 1, // 8: test.v1.Test.AddTestSuite:input_type -> test.v1.AddTestSuiteRequest + 3, // 9: test.v1.Test.Start:input_type -> test.v1.StartRequest + 7, // 10: test.v1.MethodCallSuite.Exec:input_type -> test.v1.ExecRequest + 9, // 11: test.v1.MethodCallSuite.SuiteReport:input_type -> test.v1.SuiteReportRequest + 7, // 12: test.v1.UnderTest.Exec:input_type -> test.v1.ExecRequest + 2, // 13: test.v1.Test.AddTestSuite:output_type -> test.v1.AddTestSuiteResponse + 4, // 14: test.v1.Test.Start:output_type -> test.v1.StartResponse + 8, // 15: test.v1.MethodCallSuite.Exec:output_type -> test.v1.ExecResponse + 10, // 16: test.v1.MethodCallSuite.SuiteReport:output_type -> test.v1.SuiteReportResponse + 8, // 17: test.v1.UnderTest.Exec:output_type -> test.v1.ExecResponse + 13, // [13:18] is the sub-list for method output_type + 8, // [8:13] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_test_v1_test_proto_init() } +func file_test_v1_test_proto_init() { + if File_test_v1_test_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_v1_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddTestSuiteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddTestSuiteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuiteInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComparisonResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuiteReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuiteReportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_v1_test_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueuePayload); 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_test_v1_test_proto_rawDesc, + NumEnums: 1, + NumMessages: 15, + NumExtensions: 0, + NumServices: 3, + }, + GoTypes: file_test_v1_test_proto_goTypes, + DependencyIndexes: file_test_v1_test_proto_depIdxs, + EnumInfos: file_test_v1_test_proto_enumTypes, + MessageInfos: file_test_v1_test_proto_msgTypes, + }.Build() + File_test_v1_test_proto = out.File + file_test_v1_test_proto_rawDesc = nil + file_test_v1_test_proto_goTypes = nil + file_test_v1_test_proto_depIdxs = nil +} diff --git a/g/test/v1/testid.go b/g/test/v1/testid.go new file mode 100644 index 00000000..61653de4 --- /dev/null +++ b/g/test/v1/testid.go @@ -0,0 +1,87 @@ +package test + +// +// DO NOT EDIT. This file was machine genarted by boilerplateid for TestId +// + +import ( + + "github.com/iansmith/parigot/api/shared/id" + + protosupport "github.com/iansmith/parigot/g/protosupport/v1" +) +// +// Begin Boilerplate for Test +// + +type DefTest struct{} + +func (f DefTest) ShortString() string { return "test" } +func (f DefTest) Letter() byte { return 0x74 } + +type TestId id.IdRoot[DefTest] + + +func NewTestId() TestId { + return TestId(id.NewIdRoot[DefTest]()) +} + +func (f TestId) Marshal() *protosupport.IdRaw { + raw:=&protosupport.IdRaw{} + raw.High = f.High() + raw.Low = f.Low() + return raw +} + +func TestIdZeroValue() TestId { + return TestId(id.NewIdTyped[DefTest](0xffffffffffffff,0xffffffffffffffff)) +} +func TestIdEmptyValue() TestId { + return TestId(id.NewIdTyped[DefTest](0,0)) +} + +func (f TestId) Equal(other TestId) bool{ + return id.IdRoot[DefTest](f).Equal(id.IdRoot[DefTest](other)) +} +func (f TestId) String() string{ + return id.IdRoot[DefTest](f).String() +} +func (f TestId) Short() string{ + return id.IdRoot[DefTest](f).Short() +} + +func (f TestId) IsZeroValue() bool{ + return id.IdRoot[DefTest](f).IsZeroValue() +} +func (f TestId) IsEmptyValue() bool{ + return id.IdRoot[DefTest](f).IsEmptyValue() +} +func (f TestId) IsZeroOrEmptyValue() bool{ + return id.IdRoot[DefTest](f).IsZeroOrEmptyValue() +} + +func (f TestId) High() uint64{ + return id.IdRoot[DefTest](f).High() +} +func (f TestId) Low() uint64{ + return id.IdRoot[DefTest](f).Low() +} + +func UnmarshalTestId(b *protosupport.IdRaw) TestId { + l:=b.GetLow() + h:=b.GetHigh() + return TestId(id.NewIdTyped[DefTest](h,l)) +} + +// FromPair is probably not something you want to use unless you +// are pulling values from external storage or files. If you pulling +// values from the network, use the Marshal() ad Unmarshal() +// functions to work with Ids. Absolutely no checking is done +// on the values provided, so much caution is advised. +func TestIdFromPair(high, low uint64) TestId { + return TestId(id.NewIdTyped[DefTest](high,low)) +} + +// +// End Boilerplate for Test +// diff --git a/g/test/v1/testserver.p.go b/g/test/v1/testserver.p.go new file mode 100644 index 00000000..b28c1aad --- /dev/null +++ b/g/test/v1/testserver.p.go @@ -0,0 +1,1132 @@ +//go:build wasip1 + +// Code generated by protoc-gen-parigot. DO NOT EDIT. +// source: test/v1/test.proto + +package test + + + + +import ( + "context" + "fmt" + "log" + "log/slog" + "runtime/debug" + "unsafe" + + + // this set of imports is _unrelated_ to the particulars of what the .proto imported... those are above + syscallguest "github.com/iansmith/parigot/api/guest/syscall" + "github.com/iansmith/parigot/api/shared/id" + lib "github.com/iansmith/parigot/lib/go" + "github.com/iansmith/parigot/g/syscall/v1" + "github.com/iansmith/parigot/lib/go/future" + apishared "github.com/iansmith/parigot/api/shared" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "github.com/iansmith/parigot/lib/go/client" +) +var _ = unsafe.Sizeof([]byte{}) + + + +func LaunchTest(ctx context.Context, sid id.ServiceId, impl Test) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start test.v1.Test, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that InitTest returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func InitTest(require []lib.MustRequireFunc, impl Test) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegisterTest() + MustExportTest(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchServiceTest(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call Test","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func RunTest(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run Test: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCallTest(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of Test") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for Test service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillisTest = int32(50) + +func ReadOneAndCallTest(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("Test, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func testbind(ctx context.Context,sid id.ServiceId, impl Test) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// test.v1.Test.AddTestSuite +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "AddTestSuite" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Test","TestAddTestSuite", + GenerateTestAddTestSuiteInvoker(impl)) +// +// test.v1.Test.Start +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Start" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"Test","TestStart", + GenerateTestStartInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of Test. +func LocateTest(ctx context.Context,sid id.ServiceId) (ClientTest,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "test.v1","test", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &ClientTest_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocateTest(ctx context.Context, sid id.ServiceId) ClientTest { + result, err:=LocateTest(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate test.v1.test:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func RegisterTest() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","test.v1","test") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegisterTest() (context.Context,id.ServiceId) { + sid, err:=RegisterTest() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","test.v1","service name","test") + panic("unable to register "+"test") + } + return context.Background(), sid +} + +func MustRequireTest(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "test.v1","test",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","test.v1","service name","test","error",syscall.KernelErr_name[int32(err)]) + panic("require test.v1.test creates a dependency loop") + } + slog.Error("unable to require","package","test.v1","service name","test","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require test.v1.test:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExportTest(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"test.v1","test",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","test.v1","service name","test") + panic("not able to export test.v1.test:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchServiceTest(ctx context.Context, sid id.ServiceId, impl Test) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=testbind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchServiceTest(ctx context.Context, sid id.ServiceId, impl Test) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchServiceTest(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// TestHost from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport test add_test_suiteTest_ +func AddTestSuite_(int32,int32,int32,int32) int64 +func AddTestSuiteTestHost(ctx context.Context,inPtr *AddTestSuiteRequest) *FutureTestAddTestSuite { + outProtoPtr := (*AddTestSuiteResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, AddTestSuite_) + f:=NewFutureTestAddTestSuite() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport test startTest_ +func Start_(int32,int32,int32,int32) int64 +func StartTestHost(ctx context.Context,inPtr *StartRequest) *FutureTestStart { + outProtoPtr := (*StartResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Start_) + f:=NewFutureTestStart() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeTestAddTestSuite struct { + fn func(context.Context,*AddTestSuiteRequest) *FutureTestAddTestSuite +} + +func (t *invokeTestAddTestSuite) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&AddTestSuiteRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateTestAddTestSuiteInvoker(impl Test) future.Invoker { + return &invokeTestAddTestSuite{fn:impl.TestAddTestSuite} +} + +// This is interface for invocation. + +type invokeTestStart struct { + fn func(context.Context,*StartRequest) *FutureTestStart +} + +func (t *invokeTestStart) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&StartRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateTestStartInvoker(impl Test) future.Invoker { + return &invokeTestStart{fn:impl.TestStart} +} + + + +func LaunchMethodCallSuite(ctx context.Context, sid id.ServiceId, impl MethodCallSuite) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start test.v1.MethodCallSuite, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that InitMethodCallSuite returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func InitMethodCallSuite(require []lib.MustRequireFunc, impl MethodCallSuite) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegisterMethodCallSuite() + MustExportMethodCallSuite(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchServiceMethodCallSuite(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call MethodCallSuite","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func RunMethodCallSuite(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run MethodCallSuite: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCallMethodCallSuite(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of MethodCallSuite") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for MethodCallSuite service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillisMethodCallSuite = int32(50) + +func ReadOneAndCallMethodCallSuite(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("MethodCallSuite, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func methodCallSuitebind(ctx context.Context,sid id.ServiceId, impl MethodCallSuite) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// test.v1.MethodCallSuite.Exec +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Exec" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"MethodCallSuite","MethodCallSuiteExec", + GenerateMethodCallSuiteExecInvoker(impl)) +// +// test.v1.MethodCallSuite.SuiteReport +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "SuiteReport" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"MethodCallSuite","MethodCallSuiteSuiteReport", + GenerateMethodCallSuiteSuiteReportInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of MethodCallSuite. +func LocateMethodCallSuite(ctx context.Context,sid id.ServiceId) (ClientMethodCallSuite,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "test.v1","method_call_suite", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &ClientMethodCallSuite_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocateMethodCallSuite(ctx context.Context, sid id.ServiceId) ClientMethodCallSuite { + result, err:=LocateMethodCallSuite(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate test.v1.method_call_suite:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func RegisterMethodCallSuite() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","test.v1","method_call_suite") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegisterMethodCallSuite() (context.Context,id.ServiceId) { + sid, err:=RegisterMethodCallSuite() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","test.v1","service name","method_call_suite") + panic("unable to register "+"method_call_suite") + } + return context.Background(), sid +} + +func MustRequireMethodCallSuite(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "test.v1","method_call_suite",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","test.v1","service name","method_call_suite","error",syscall.KernelErr_name[int32(err)]) + panic("require test.v1.method_call_suite creates a dependency loop") + } + slog.Error("unable to require","package","test.v1","service name","method_call_suite","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require test.v1.method_call_suite:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExportMethodCallSuite(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"test.v1","method_call_suite",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","test.v1","service name","method_call_suite") + panic("not able to export test.v1.method_call_suite:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchServiceMethodCallSuite(ctx context.Context, sid id.ServiceId, impl MethodCallSuite) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=methodCallSuitebind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchServiceMethodCallSuite(ctx context.Context, sid id.ServiceId, impl MethodCallSuite) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchServiceMethodCallSuite(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// MethodCallSuiteHost from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport test execMethodCallSuite_ +func Exec_(int32,int32,int32,int32) int64 +func ExecMethodCallSuiteHost(ctx context.Context,inPtr *ExecRequest) *FutureMethodCallSuiteExec { + outProtoPtr := (*ExecResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Exec_) + f:=NewFutureMethodCallSuiteExec() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +//go:wasmimport test suite_reportMethodCallSuite_ +func SuiteReport_(int32,int32,int32,int32) int64 +func SuiteReportMethodCallSuiteHost(ctx context.Context,inPtr *SuiteReportRequest) *FutureMethodCallSuiteSuiteReport { + outProtoPtr := (*SuiteReportResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, SuiteReport_) + f:=NewFutureMethodCallSuiteSuiteReport() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeMethodCallSuiteExec struct { + fn func(context.Context,*ExecRequest) *FutureMethodCallSuiteExec +} + +func (t *invokeMethodCallSuiteExec) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&ExecRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateMethodCallSuiteExecInvoker(impl MethodCallSuite) future.Invoker { + return &invokeMethodCallSuiteExec{fn:impl.MethodCallSuiteExec} +} + +// This is interface for invocation. + +type invokeMethodCallSuiteSuiteReport struct { + fn func(context.Context,*SuiteReportRequest) *FutureMethodCallSuiteSuiteReport +} + +func (t *invokeMethodCallSuiteSuiteReport) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&SuiteReportRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateMethodCallSuiteSuiteReportInvoker(impl MethodCallSuite) future.Invoker { + return &invokeMethodCallSuiteSuiteReport{fn:impl.MethodCallSuiteSuiteReport} +} + + + +func LaunchUnderTest(ctx context.Context, sid id.ServiceId, impl UnderTest) *future.Base[bool] { + + readyResult:=future.NewBase[bool]() + + ready:=impl.Ready(ctx,sid) + ready.Handle(func (b bool) { + if b { + readyResult.Set(true) + return + } + slog.Error("Unable to start test.v1.UnderTest, Ready returned false") + readyResult.Set(false) + }) + + return readyResult +} + +// Note that InitUnderTest returns a future, but the case of failure is covered +// by this definition so the caller need only deal with Success case. +// The context passed here does not need to contain a logger, one will be created. +func InitUnderTest(require []lib.MustRequireFunc, impl UnderTest) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture, context.Context, id.ServiceId){ + // tricky, this context really should not be used but is + // passed so as to allow printing if things go wrong + ctx, myId := MustRegisterUnderTest() + MustExportUnderTest(context.Background(),myId) + if len(require)>0 { + for _, f := range require { + f(ctx, myId) + } + } + smmap, launchF:=MustLaunchServiceUnderTest(ctx, myId, impl) + launchF.Failure(func (err syscall.KernelErr) { + t:=syscall.KernelErr_name[int32(err)] + slog.Error("launch failure on call UnderTest","error",t) + lib.ExitSelf(ctx, 1, myId) + }) + return smmap,launchF, ctx,myId +} +func RunUnderTest(ctx context.Context, + binding *lib.ServiceMethodMap, timeoutInMillis int32, bg lib.Backgrounder) syscall.KernelErr{ + defer func() { + if r := recover(); r != nil { + s, ok:=r.(string) + if !ok && s!=apishared.ControlledExit { + slog.Error("Run UnderTest: trapped a panic in the guest side", "recovered", r) + debug.PrintStack() + } + } + }() + var kerr syscall.KernelErr + for { + kerr:=ReadOneAndCallUnderTest(ctx, binding, timeoutInMillis) + if kerr == syscall.KernelErr_ReadOneTimeout { + if bg==nil { + continue + } + slog.Info("calling backgrounder of UnderTest") + bg.Background(ctx) + continue + } + if kerr == syscall.KernelErr_NoError { + continue + } + break + } + slog.Error("error while waiting for UnderTest service calls", "error",syscall.KernelErr_name[int32(kerr)]) + return kerr +} +// Increase this value at your peril! +// Decreasing this value may make your overall program more responsive if you have many services. +var TimeoutInMillisUnderTest = int32(50) + +func ReadOneAndCallUnderTest(ctx context.Context, binding *lib.ServiceMethodMap, + timeoutInMillis int32) syscall.KernelErr{ + req:=syscall.ReadOneRequest{} + hid:= syscallguest.CurrentHostId() + + req.TimeoutInMillis = timeoutInMillis + req.HostId = hid.Marshal() + resp, err:=syscallguest.ReadOne(ctx, &req) + if err!=syscall.KernelErr_NoError { + return err + } + // is timeout? + if resp.Timeout { + return syscall.KernelErr_ReadOneTimeout + } + + // check for finished futures from within our address space + ctx, t:=lib.CurrentTime(ctx) + syscallguest.ExpireMethod(ctx,t) + + // is a promise being completed that was fulfilled somewhere else + if r:=resp.GetResolved(); r!=nil { + cid:=id.UnmarshalCallId(r.GetCallId()) + defer func() { + if r:=recover(); r!=nil { + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + log.Printf("completing method %s on service %s failed due to panic: '%s', exiting", + mid.Short(), sid.Short(), r) + debug.PrintStack() + syscallguest.Exit(ctx, &syscall.ExitRequest{ + Pair: &syscall.ExitPair { + ServiceId: sid.Marshal(), + Code: 2, + }, + }) + } + }() + syscallguest.CompleteCall(ctx, syscallguest.CurrentHostId(),cid,r.GetResult(), r.GetResultError()) + return syscall.KernelErr_NoError + } + + // its a method call from another address space + sid:=id.UnmarshalServiceId(resp.GetBundle().GetServiceId()) + mid:=id.UnmarshalMethodId(resp.GetBundle().GetMethodId()) + cid:=id.UnmarshalCallId(resp.GetBundle().GetCallId()) + + //if mid.Equal(apishared.ExitMethod) { + // log.Printf("xxx -- got an exit marked read one %s", hid.Short()) + // os.Exit(51) + //} + + // we let the invoker handle the unmarshal from anypb.Any because it + // knows the precise type to be consumed + fn:=binding.Func(sid,mid) + if fn==nil { + slog.Error("UnderTest, readOneAndCall:unable to find binding for method on service, ignoring","mid",mid.Short(),"sid", sid.Short(), + "current host",syscallguest.CurrentHostId().Short()) + return syscall.KernelErr_NoError + } + fut:=fn.Invoke(ctx,resp.GetParamOrResult()) + // if we get a nil, the intention is that the invocation be ignored + if fut==nil { + slog.Warn("ignoring call result for call","call",cid.Short()) + return syscall.KernelErr_NoError + } + fut.Success(func (result proto.Message){ + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + var a anypb.Any + if err:=a.MarshalFrom(result); err!=nil { + slog.Error("unable to marshal result for return value request") + return + } + rvReq.Result = &a + rvReq.ResultError = 0 + syscallguest.ReturnValue(ctx, rvReq) // nowhere for return value to go + }) + fut.Failure(func (err int32) { + rvReq:=&syscall.ReturnValueRequest{} + rvReq.Bundle=&syscall.MethodBundle{} + + rvReq.Bundle.CallId= cid.Marshal() + rvReq.Bundle.HostId= syscallguest.CurrentHostId().Marshal() + rvReq.ResultError = err + syscallguest.ReturnValue(ctx,rvReq) // nowhere for return value to go + }) + return syscall.KernelErr_NoError + +} + + +func underTestbind(ctx context.Context,sid id.ServiceId, impl UnderTest) (*lib.ServiceMethodMap, syscall.KernelErr) { + smmap:=lib.NewServiceMethodMap() + var mid id.MethodId + var bindReq *syscall.BindMethodRequest + var resp *syscall.BindMethodResponse + var err syscall.KernelErr +// +// test.v1.UnderTest.Exec +// + + bindReq = &syscall.BindMethodRequest{} + bindReq.HostId = syscallguest.CurrentHostId().Marshal() + bindReq.ServiceId = sid.Marshal() + bindReq.MethodName = "Exec" + resp, err=syscallguest.BindMethod(ctx, bindReq) + if err!=syscall.KernelErr_NoError { + return nil, err + } + mid=id.UnmarshalMethodId(resp.GetMethodId()) + + // completer already prepared elsewhere + smmap.AddServiceMethod(sid,mid,"UnderTest","UnderTestExec", + GenerateUnderTestExecInvoker(impl)) + return smmap,syscall.KernelErr_NoError +} + + +// Locate finds a reference to the client interface of UnderTest. +func LocateUnderTest(ctx context.Context,sid id.ServiceId) (ClientUnderTest,syscall.KernelErr) { + cs, kerr:=client.LocateDynamic(ctx, "test.v1","under_test", sid) + if kerr!=syscall.KernelErr_NoError{ + return nil, kerr + } + return &ClientUnderTest_{ + BaseService: cs, + },syscall.KernelErr_NoError +} + +func MustLocateUnderTest(ctx context.Context, sid id.ServiceId) ClientUnderTest { + result, err:=LocateUnderTest(ctx, sid) + name:=syscall.KernelErr_name[int32(err)] + normal:="unable to locate test.v1.under_test:"+name + if err!=0 { + if err == syscall.KernelErr_NotRequired { + slog.Error("service was located, but it was not required") + panic("locate attempted on a service that was not required") + } + panic(normal) + } + return result +} + + +func RegisterUnderTest() (id.ServiceId, syscall.KernelErr){ + req := &syscall.RegisterRequest{} + debugName:=fmt.Sprintf("%s.%s","test.v1","under_test") + req.HostId = syscallguest.CurrentHostId().Marshal() + req.DebugName = debugName + + resp, err := syscallguest.Register(context.Background(), req) + if err!=syscall.KernelErr_NoError{ + return id.ServiceIdZeroValue(), err + } + sid:=id.UnmarshalServiceId(resp.ServiceId) + if sid.IsZeroOrEmptyValue() { + panic("received bad service Id from register") + } + + return sid,syscall.KernelErr_NoError +} +func MustRegisterUnderTest() (context.Context,id.ServiceId) { + sid, err:=RegisterUnderTest() + if err!=syscall.KernelErr_NoError { + slog.Error("unable to register","package","test.v1","service name","under_test") + panic("unable to register "+"under_test") + } + return context.Background(), sid +} + +func MustRequireUnderTest(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Require1(ctx, "test.v1","under_test",sid) + if err!=syscall.KernelErr_NoError { + if err==syscall.KernelErr_DependencyCycle{ + slog.Error("unable to require because it creates a dependcy loop","package","test.v1","service name","under_test","error",syscall.KernelErr_name[int32(err)]) + panic("require test.v1.under_test creates a dependency loop") + } + slog.Error("unable to require","package","test.v1","service name","under_test","error",syscall.KernelErr_name[int32(err)]) + panic("not able to require test.v1.under_test:"+syscall.KernelErr_name[int32(err)]) + } +} + +func MustExportUnderTest(ctx context.Context, sid id.ServiceId) { + _, err:=lib.Export1(ctx,"test.v1","under_test",sid) + if err!=syscall.KernelErr_NoError{ + slog.Error("unable to export","package","test.v1","service name","under_test") + panic("not able to export test.v1.under_test:"+syscall.KernelErr_name[int32(err)]) + } +} + + +func LaunchServiceUnderTest(ctx context.Context, sid id.ServiceId, impl UnderTest) (*lib.ServiceMethodMap,*syscallguest.LaunchFuture,syscall.KernelErr) { + smmap, err:=underTestbind(ctx,sid, impl) + if err!=0{ + return nil,nil,syscall.KernelErr(err) + } + + cid:=id.NewCallId() + req:=&syscall.LaunchRequest{ + ServiceId: sid.Marshal(), + CallId: cid.Marshal(), + HostId: syscallguest.CurrentHostId().Marshal(), + MethodId: apishared.LaunchMethod.Marshal(), + } + fut:=syscallguest.Launch(ctx,req) + + + return smmap,fut,syscall.KernelErr_NoError + +} +func MustLaunchServiceUnderTest(ctx context.Context, sid id.ServiceId, impl UnderTest) (*lib.ServiceMethodMap, *syscallguest.LaunchFuture) { + + smmap,fut,err:=LaunchServiceUnderTest(ctx,sid,impl) + if err!=syscall.KernelErr_NoError { + panic("Unable to call LaunchService successfully: "+syscall.KernelErr_name[int32(err)]) + } + return smmap,fut +} + + +// If you want to implement part of your server in host cost you should call +// UnderTestHost from your server implementation. These will be optimized +// away by the compiler if you don't use them--in other words, if you want to +// implement everything on the guest side). +// + +//go:wasmimport test exec_under_testUnderTest_ +func ExecUnderTest_(int32,int32,int32,int32) int64 +func ExecUnderTestUnderTestHost(ctx context.Context,inPtr *ExecRequest) *FutureUnderTestExec { + outProtoPtr := (*ExecResponse)(nil) + ret, raw, _:= syscallguest.ClientSide(ctx, inPtr, outProtoPtr, Exec_) + f:=NewFutureUnderTestExec() + f.CompleteMethod(ctx,ret,raw, syscallguest.CurrentHostId()) + return f +} + +// This is interface for invocation. + +type invokeUnderTestExec struct { + fn func(context.Context,*ExecRequest) *FutureUnderTestExec +} + +func (t *invokeUnderTestExec) Invoke(ctx context.Context,a *anypb.Any) future.Completer { + in:=&ExecRequest{} + err:=a.UnmarshalTo(in) + if err!=nil { + slog.Error("unmarshal inside Invoke() failed","error",err.Error()) + return nil + } + return t.fn(ctx,in) + +} + +func GenerateUnderTestExecInvoker(impl UnderTest) future.Invoker { + return &invokeUnderTestExec{fn:impl.UnderTestExec} +}