internal/gomote, internal/gomote/protos: add create instance implementation This change implements the endpoint to create gomote instances for the gomote GRPC service. In the process of implementing creates, various other changes were needed: - Refactoring the remote session pool. - Extending the fake schedule used for testing. Updates golang/go#48742 Change-Id: I0c74e38539428d028917200ccd6bd0c58fa14801 Reviewed-on: https://go-review.googlesource.com/c/build/+/370662 Trust: Carlos Amedee <carlos@golang.org> Run-TryBot: Carlos Amedee <carlos@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/internal/gomote/gomote.go b/internal/gomote/gomote.go index 51332e1..c84c70a 100644 --- a/internal/gomote/gomote.go +++ b/internal/gomote/gomote.go
@@ -2,24 +2,153 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux || darwin +// +build linux darwin + package gomote import ( + "context" + "errors" + "log" + "regexp" + "strings" + "time" + + "golang.org/x/build/buildlet" + "golang.org/x/build/dashboard" + "golang.org/x/build/internal/access" "golang.org/x/build/internal/coordinator/remote" + "golang.org/x/build/internal/coordinator/schedule" "golang.org/x/build/internal/gomote/protos" + "golang.org/x/build/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) +type scheduler interface { + State() (st schedule.SchedulerState) + WaiterState(waiter *schedule.SchedItem) (ws types.BuildletWaitStatus) + GetBuildlet(ctx context.Context, si *schedule.SchedItem) (buildlet.Client, error) +} + // Server is a gomote server implementation. type Server struct { // embed the unimplemented server. protos.UnimplementedGomoteServiceServer buildlets *remote.SessionPool + scheduler scheduler } // New creates a gomote server. -func New(rsp *remote.SessionPool) *Server { +func New(rsp *remote.SessionPool, sched *schedule.Scheduler) *Server { return &Server{ buildlets: rsp, + scheduler: sched, } } + +// CreateInstance will create a gomote instance for the authenticated user. +func (s *Server) CreateInstance(req *protos.CreateInstanceRequest, stream protos.GomoteService_CreateInstanceServer) error { + ctx, cancel := context.WithTimeout(stream.Context(), 5*time.Minute) + defer cancel() + + creds, err := access.IAPFromContext(ctx) + if err != nil { + log.Printf("CreateInstance access.IAPFromContext(ctx) = nil, %s", err) + return status.Errorf(codes.Unauthenticated, "request does not contain the required authentication") + } + if req.GetBuilderType() == "" { + return status.Errorf(codes.InvalidArgument, "invalid builder type") + } + bconf, ok := dashboard.Builders[req.GetBuilderType()] + if !ok { + return status.Errorf(codes.InvalidArgument, "unknown builder type") + } + if bconf.IsRestricted() && !isPrivilegedUser(creds.Email) { + return status.Errorf(codes.PermissionDenied, "user is unable to create gomote of that builder type") + } + si := &schedule.SchedItem{ + HostType: bconf.HostType, + IsGomote: true, + } + type result struct { + buildletClient buildlet.Client + err error + } + rc := make(chan result, 1) + go func() { + bc, err := s.scheduler.GetBuildlet(ctx, si) + rc <- result{bc, err} + }() + ticker := time.NewTicker(5 * time.Second) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return status.Errorf(codes.DeadlineExceeded, "timed out waiting for gomote instance to be created") + case <-ticker.C: + st := s.scheduler.WaiterState(si) + err := stream.Send(&protos.CreateInstanceResponse{ + Status: protos.CreateInstanceResponse_WAITING, + WaitersAhead: int64(st.Ahead), + }) + if err != nil { + return status.Errorf(codes.Internal, "unable to stream result: %s", err) + } + case r := <-rc: + if r.err != nil { + log.Printf("error creating gomote buildlet: %v", err) + + return status.Errorf(codes.Unknown, "gomote creation failed: %s", err) + } + userName, err := emailToUser(creds.Email) + if err != nil { + status.Errorf(codes.Internal, "invalid user email format") + } + gomoteID := s.buildlets.AddSession(creds.ID, userName, req.GetBuilderType(), bconf.HostType, r.buildletClient) + log.Printf("created buildlet %v for %v (%s)", gomoteID, userName, r.buildletClient.String()) + session, err := s.buildlets.Session(gomoteID) + if err != nil { + return status.Errorf(codes.Internal, "unable to query for gomote timeout") // this should never happen + } + err = stream.Send(&protos.CreateInstanceResponse{ + Instance: &protos.Instance{ + GomoteId: gomoteID, + BuilderType: req.GetBuilderType(), + HostType: bconf.HostType, + Expires: session.Expires.Unix(), + }, + Status: protos.CreateInstanceResponse_COMPLETE, + WaitersAhead: 0, + }) + if err != nil { + return status.Errorf(codes.Internal, "unable to stream result: %s", err) + } + return nil + } + } +} + +// isPrivilegedUser returns true if the user is using a Google account. +// The user has to be a part of the appropriate IAM group. +func isPrivilegedUser(email string) bool { + if strings.HasSuffix(email, "@google.com") { + return true + } + return false +} + +// iapEmailRE matches the email string returned by Identity Aware Proxy for sessions where +// the authority is Google. +var iapEmailRE = regexp.MustCompile(`^accounts\.google\.com:.+@.+\..+$`) + +// emailToUser returns the displayed user for the IAP email string passed in. +// For example, "accounts.google.com:example@gmail.com" -> "example" +func emailToUser(email string) (string, error) { + if match := iapEmailRE.MatchString(email); !match { + return "", errors.New("invalid email format") + } + return email[strings.Index(email, ":")+1 : strings.LastIndex(email, "@")], nil +}
diff --git a/internal/gomote/gomote_test.go b/internal/gomote/gomote_test.go new file mode 100644 index 0000000..a6eee82 --- /dev/null +++ b/internal/gomote/gomote_test.go
@@ -0,0 +1,239 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux || darwin +// +build linux darwin + +package gomote + +import ( + "context" + "fmt" + "io" + "testing" + "time" + + "golang.org/x/build/internal/access" + "golang.org/x/build/internal/coordinator/remote" + "golang.org/x/build/internal/coordinator/schedule" + "golang.org/x/build/internal/gomote/protos" + "golang.org/x/net/nettest" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func fakeGomoteServer(ctx context.Context) protos.GomoteServiceServer { + return &Server{ + buildlets: remote.NewSessionPool(ctx), + scheduler: schedule.NewFake(), + } +} + +func setupGomoteTest(t *testing.T, ctx context.Context) protos.GomoteServiceClient { + lis, err := nettest.NewLocalListener("tcp") + if err != nil { + t.Fatalf("unable to create net listener: %s", err) + } + sopts := access.FakeIAPAuthInterceptorOptions() + s := grpc.NewServer(sopts...) + protos.RegisterGomoteServiceServer(s, fakeGomoteServer(ctx)) + go s.Serve(lis) + + // create GRPC client + copts := []grpc.DialOption{ + grpc.WithInsecure(), + grpc.WithBlock(), + grpc.WithTimeout(time.Second), + } + conn, err := grpc.Dial(lis.Addr().String(), copts...) + if err != nil { + lis.Close() + t.Fatalf("unable to create GRPC client: %s", err) + } + gc := protos.NewGomoteServiceClient(conn) + t.Cleanup(func() { + conn.Close() + s.Stop() + lis.Close() + }) + return gc +} + +func TestCreateInstance(t *testing.T) { + ctx := access.FakeContextWithOutgoingIAPAuth(context.Background(), fakeIAP()) + req := &protos.CreateInstanceRequest{BuilderType: "linux-amd64"} + client := setupGomoteTest(t, context.Background()) + stream, err := client.CreateInstance(ctx, req) + if err != nil { + t.Fatalf("client.CreateInstance(ctx, %v) = %v, %s; want no error", req, stream, err) + } + var updateComplete bool + for { + update, err := stream.Recv() + if err == io.EOF && !updateComplete { + t.Fatal("stream.Recv = stream, io.EOF; want no EOF") + } + if err == io.EOF { + break + } + if err != nil { + t.Fatalf("stream.Recv() = nil, %s; want no error", err) + } + if update.GetStatus() == protos.CreateInstanceResponse_COMPLETE { + updateComplete = true + } + } +} + +func TestCreateInstanceError(t *testing.T) { + testCases := []struct { + desc string + ctx context.Context + request *protos.CreateInstanceRequest + wantCode codes.Code + }{ + { + desc: "unauthenticated request", + ctx: context.Background(), + request: &protos.CreateInstanceRequest{}, + wantCode: codes.Unauthenticated, + }, + { + desc: "missing builder type", + ctx: access.FakeContextWithOutgoingIAPAuth(context.Background(), fakeIAP()), + request: &protos.CreateInstanceRequest{}, + wantCode: codes.InvalidArgument, + }, + { + desc: "invalid builder type", + ctx: access.FakeContextWithOutgoingIAPAuth(context.Background(), fakeIAP()), + request: &protos.CreateInstanceRequest{ + BuilderType: "funky-time-builder", + }, + wantCode: codes.InvalidArgument, + }, + } + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + client := setupGomoteTest(t, context.Background()) + + stream, err := client.CreateInstance(tc.ctx, tc.request) + if err != nil { + t.Fatalf("client.CreateInstance(ctx, %v) = %v, %s; want no error", tc.request, stream, err) + } + for { + _, got := stream.Recv() + if got == io.EOF { + t.Fatal("stream.Recv = stream, io.EOF; want no EOF") + } + if got != nil && status.Code(got) != tc.wantCode { + t.Fatalf("unexpected error: %s", err) + } + return + } + }) + } +} + +func TestIsPrivilegedUser(t *testing.T) { + in := "accounts.google.com:example@google.com" + if !isPrivilegedUser(in) { + t.Errorf("isPrivilagedUser(%q) = false; want true", in) + } +} + +func TestEmailToUser(t *testing.T) { + testCases := []struct { + desc string + email string + want string + }{ + {"valid email", "accounts.google.com:example@gmail.com", "example"}, + {"valid email", "accounts.google.com:mary@google.com", "mary"}, + {"valid email", "accounts.google.com:george@funky.com", "george"}, + {"single digit local", "accounts.google.com:g@funky.com", "g"}, + {"single digit domain", "accounts.google.com:g@funky.com", "g"}, + {"multiple colon", "accounts.google.com:example@gmail.com:more-info", "example"}, // while not desired, wont lead to a panic + {"multiple at", "accounts.google.com:example@gmail.com:example@gmail.com", "example@gmail.com:example"}, // while not desired, wont lead to a panic + } + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + if got, err := emailToUser(tc.email); got != tc.want || err != nil { + t.Errorf("emailToUser(%q) = %q, %s; want %q, no error", tc.email, got, err, tc.want) + } + }) + } +} + +func TestEmailToUserError(t *testing.T) { + testCases := []struct { + desc string + email string + }{ + {"no local", "accounts.google.com:@funky.com"}, + {"incorrect authority", "accountsxgoogleycom:george@funky.com"}, + {"hyphens authority", "accounts-google-com:george@funky.com"}, + {"no domain", "accounts.google.com:george@"}, + {"missing colon", "accounts.google.comxgeorge@a.b"}, + } + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + if got, err := emailToUser(tc.email); err == nil { + t.Errorf("emailToUser(%q) = %q, no error; want error", tc.email, got) + } + }) + } +} + +func fakeAuthContext(ctx context.Context, privileged bool) context.Context { + iap := access.IAPFields{ + Email: "accounts.google.com:example@gmail.com", + ID: "accounts.google.com:randomuuidstuff", + } + if privileged { + iap.Email = "accounts.google.com:test@google.com" + } + return access.ContextWithIAP(ctx, iap) +} + +func fakeIAP() access.IAPFields { + return fakeIAPWithUser("example", "randomuuidstuff") +} + +func fakeIAPWithUser(user string, id string) access.IAPFields { + return access.IAPFields{ + Email: fmt.Sprintf("accounts.google.com:%s@gmail.com", user), + ID: fmt.Sprintf("accounts.google.com:%s", id), + } +} + +func mustCreateInstance(t *testing.T, client protos.GomoteServiceClient, iap access.IAPFields) string { + req := &protos.CreateInstanceRequest{ + BuilderType: "linux-amd64", + } + stream, err := client.CreateInstance(access.FakeContextWithOutgoingIAPAuth(context.Background(), iap), req) + if err != nil { + t.Fatalf("client.CreateInstance(ctx, %v) = %v, %s; want no error", req, stream, err) + } + var updateComplete bool + var gomoteID string + for { + update, err := stream.Recv() + if err == io.EOF && !updateComplete { + t.Fatal("stream.Recv = stream, io.EOF; want no EOF") + } + if err == io.EOF { + break + } + if err != nil { + t.Fatalf("stream.Recv() = nil, %s; want no error", err) + } + if update.GetStatus() == protos.CreateInstanceResponse_COMPLETE { + gomoteID = update.Instance.GetGomoteId() + updateComplete = true + } + } + return gomoteID +}
diff --git a/internal/gomote/protos/gomote.pb.go b/internal/gomote/protos/gomote.pb.go index a47a836..3b8211f 100644 --- a/internal/gomote/protos/gomote.pb.go +++ b/internal/gomote/protos/gomote.pb.go
@@ -24,6 +24,55 @@ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateInstanceResponse_Status int32 + +const ( + CreateInstanceResponse_UNKNOWN CreateInstanceResponse_Status = 0 + CreateInstanceResponse_WAITING CreateInstanceResponse_Status = 1 + CreateInstanceResponse_COMPLETE CreateInstanceResponse_Status = 2 +) + +// Enum value maps for CreateInstanceResponse_Status. +var ( + CreateInstanceResponse_Status_name = map[int32]string{ + 0: "UNKNOWN", + 1: "WAITING", + 2: "COMPLETE", + } + CreateInstanceResponse_Status_value = map[string]int32{ + "UNKNOWN": 0, + "WAITING": 1, + "COMPLETE": 2, + } +) + +func (x CreateInstanceResponse_Status) Enum() *CreateInstanceResponse_Status { + p := new(CreateInstanceResponse_Status) + *p = x + return p +} + +func (x CreateInstanceResponse_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CreateInstanceResponse_Status) Descriptor() protoreflect.EnumDescriptor { + return file_gomote_proto_enumTypes[0].Descriptor() +} + +func (CreateInstanceResponse_Status) Type() protoreflect.EnumType { + return &file_gomote_proto_enumTypes[0] +} + +func (x CreateInstanceResponse_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CreateInstanceResponse_Status.Descriptor instead. +func (CreateInstanceResponse_Status) EnumDescriptor() ([]byte, []int) { + return file_gomote_proto_rawDescGZIP(), []int{3, 0} +} + // AuthenticateRequest specifies the data needed for an authentication request. type AuthenticateRequest struct { state protoimpl.MessageState @@ -107,6 +156,8 @@ state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + BuilderType string `protobuf:"bytes,1,opt,name=builder_type,json=builderType,proto3" json:"builder_type,omitempty"` } func (x *CreateInstanceRequest) Reset() { @@ -141,11 +192,26 @@ return file_gomote_proto_rawDescGZIP(), []int{2} } +func (x *CreateInstanceRequest) GetBuilderType() string { + if x != nil { + return x.BuilderType + } + return "" +} + // CreateInstanceResponse contains data about a created gomote instance. type CreateInstanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Instance information for the requested instance. + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // The status for the requested create. + Status CreateInstanceResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=protos.CreateInstanceResponse_Status" json:"status,omitempty"` + // Waiters ahead is the count of how many instances are being scheduled for + // creation before the current instance creation request. + WaitersAhead int64 `protobuf:"varint,3,opt,name=waiters_ahead,json=waitersAhead,proto3" json:"waiters_ahead,omitempty"` } func (x *CreateInstanceResponse) Reset() { @@ -180,6 +246,27 @@ return file_gomote_proto_rawDescGZIP(), []int{3} } +func (x *CreateInstanceResponse) GetInstance() *Instance { + if x != nil { + return x.Instance + } + return nil +} + +func (x *CreateInstanceResponse) GetStatus() CreateInstanceResponse_Status { + if x != nil { + return x.Status + } + return CreateInstanceResponse_UNKNOWN +} + +func (x *CreateInstanceResponse) GetWaitersAhead() int64 { + if x != nil { + return x.WaitersAhead + } + return 0 +} + // DestroyInstanceRequest specifies the data needed to destroy a gomote instance. type DestroyInstanceRequest struct { state protoimpl.MessageState @@ -336,7 +423,84 @@ return file_gomote_proto_rawDescGZIP(), []int{7} } -// InstanceAliveRequest specifies the data neede to check the liveness of a gomote instance. +// Instance contains descriptive information about a gomote instance. +type Instance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier for a gomote instance. + GomoteId string `protobuf:"bytes,1,opt,name=gomote_id,json=gomoteId,proto3" json:"gomote_id,omitempty"` + // Builder type for the gomote instance. + BuilderType string `protobuf:"bytes,2,opt,name=builder_type,json=builderType,proto3" json:"builder_type,omitempty"` + // Host type for the gomote instance. + HostType string `protobuf:"bytes,3,opt,name=host_type,json=hostType,proto3" json:"host_type,omitempty"` + // The timestamp for when the builder instance will expire. It is + // reprsented in Unix epoch time format. + Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires,omitempty"` +} + +func (x *Instance) Reset() { + *x = Instance{} + if protoimpl.UnsafeEnabled { + mi := &file_gomote_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Instance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Instance) ProtoMessage() {} + +func (x *Instance) ProtoReflect() protoreflect.Message { + mi := &file_gomote_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 Instance.ProtoReflect.Descriptor instead. +func (*Instance) Descriptor() ([]byte, []int) { + return file_gomote_proto_rawDescGZIP(), []int{8} +} + +func (x *Instance) GetGomoteId() string { + if x != nil { + return x.GomoteId + } + return "" +} + +func (x *Instance) GetBuilderType() string { + if x != nil { + return x.BuilderType + } + return "" +} + +func (x *Instance) GetHostType() string { + if x != nil { + return x.HostType + } + return "" +} + +func (x *Instance) GetExpires() int64 { + if x != nil { + return x.Expires + } + return 0 +} + +// InstanceAliveRequest specifies the data needed to check the liveness of a gomote instance. type InstanceAliveRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -346,7 +510,7 @@ func (x *InstanceAliveRequest) Reset() { *x = InstanceAliveRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[8] + mi := &file_gomote_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -359,7 +523,7 @@ func (*InstanceAliveRequest) ProtoMessage() {} func (x *InstanceAliveRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[8] + mi := &file_gomote_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -372,7 +536,7 @@ // Deprecated: Use InstanceAliveRequest.ProtoReflect.Descriptor instead. func (*InstanceAliveRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{8} + return file_gomote_proto_rawDescGZIP(), []int{9} } // InstanceAliveResponse contains instance liveness state. @@ -385,7 +549,7 @@ func (x *InstanceAliveResponse) Reset() { *x = InstanceAliveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[9] + mi := &file_gomote_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -398,7 +562,7 @@ func (*InstanceAliveResponse) ProtoMessage() {} func (x *InstanceAliveResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[9] + mi := &file_gomote_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -411,7 +575,7 @@ // Deprecated: Use InstanceAliveResponse.ProtoReflect.Descriptor instead. func (*InstanceAliveResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{9} + return file_gomote_proto_rawDescGZIP(), []int{10} } // ListDirectoryRequest specifies the data needed to list contents of a directory from a gomote instance. @@ -424,7 +588,7 @@ func (x *ListDirectoryRequest) Reset() { *x = ListDirectoryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[10] + mi := &file_gomote_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -437,7 +601,7 @@ func (*ListDirectoryRequest) ProtoMessage() {} func (x *ListDirectoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[10] + mi := &file_gomote_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -450,7 +614,7 @@ // Deprecated: Use ListDirectoryRequest.ProtoReflect.Descriptor instead. func (*ListDirectoryRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{10} + return file_gomote_proto_rawDescGZIP(), []int{11} } // ListDirectoryResponse contains the directory listing of a gomote instance. @@ -463,7 +627,7 @@ func (x *ListDirectoryResponse) Reset() { *x = ListDirectoryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[11] + mi := &file_gomote_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -476,7 +640,7 @@ func (*ListDirectoryResponse) ProtoMessage() {} func (x *ListDirectoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[11] + mi := &file_gomote_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -489,7 +653,7 @@ // Deprecated: Use ListDirectoryResponse.ProtoReflect.Descriptor instead. func (*ListDirectoryResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{11} + return file_gomote_proto_rawDescGZIP(), []int{12} } // ListInstancesRequest specifies the data needed to list the live gomote instances owned by the caller. @@ -502,7 +666,7 @@ func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[12] + mi := &file_gomote_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -515,7 +679,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[12] + mi := &file_gomote_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -528,7 +692,7 @@ // Deprecated: Use ListInstancesRequest.ProtoReflect.Descriptor instead. func (*ListInstancesRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{12} + return file_gomote_proto_rawDescGZIP(), []int{13} } // ListInstancesResponse contains the list of live gomote instances owned by the caller. @@ -541,7 +705,7 @@ func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[13] + mi := &file_gomote_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -554,7 +718,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[13] + mi := &file_gomote_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -567,7 +731,7 @@ // Deprecated: Use ListInstancesResponse.ProtoReflect.Descriptor instead. func (*ListInstancesResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{13} + return file_gomote_proto_rawDescGZIP(), []int{14} } // ReadTGZRequest specifies the data needed to retrieve a tar and zipped directory from a gomote instance. @@ -580,7 +744,7 @@ func (x *ReadTGZRequest) Reset() { *x = ReadTGZRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[14] + mi := &file_gomote_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -593,7 +757,7 @@ func (*ReadTGZRequest) ProtoMessage() {} func (x *ReadTGZRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[14] + mi := &file_gomote_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -606,7 +770,7 @@ // Deprecated: Use ReadTGZRequest.ProtoReflect.Descriptor instead. func (*ReadTGZRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{14} + return file_gomote_proto_rawDescGZIP(), []int{15} } // ReadTGZResponse contains a tar and zipped directory from a gomote instance. @@ -619,7 +783,7 @@ func (x *ReadTGZResponse) Reset() { *x = ReadTGZResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[15] + mi := &file_gomote_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -632,7 +796,7 @@ func (*ReadTGZResponse) ProtoMessage() {} func (x *ReadTGZResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[15] + mi := &file_gomote_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -645,7 +809,7 @@ // Deprecated: Use ReadTGZResponse.ProtoReflect.Descriptor instead. func (*ReadTGZResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{15} + return file_gomote_proto_rawDescGZIP(), []int{16} } // RemoveDirectoryRequest specifies the data needed to remove a directory from a gomote instance. @@ -658,7 +822,7 @@ func (x *RemoveDirectoryRequest) Reset() { *x = RemoveDirectoryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[16] + mi := &file_gomote_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -671,7 +835,7 @@ func (*RemoveDirectoryRequest) ProtoMessage() {} func (x *RemoveDirectoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[16] + mi := &file_gomote_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -684,7 +848,7 @@ // Deprecated: Use RemoveDirectoryRequest.ProtoReflect.Descriptor instead. func (*RemoveDirectoryRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{16} + return file_gomote_proto_rawDescGZIP(), []int{17} } // RemoveDirectoryResponse contains the results from removing a directory from a gomote instance. @@ -697,7 +861,7 @@ func (x *RemoveDirectoryResponse) Reset() { *x = RemoveDirectoryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[17] + mi := &file_gomote_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -710,7 +874,7 @@ func (*RemoveDirectoryResponse) ProtoMessage() {} func (x *RemoveDirectoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[17] + mi := &file_gomote_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -723,10 +887,10 @@ // Deprecated: Use RemoveDirectoryResponse.ProtoReflect.Descriptor instead. func (*RemoveDirectoryResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{17} + return file_gomote_proto_rawDescGZIP(), []int{18} } -// RetrieveSSHCredentialsRequest specifies the data neede to retrieve SSH credentials for a gomote instance. +// RetrieveSSHCredentialsRequest specifies the data needed to retrieve SSH credentials for a gomote instance. type RetrieveSSHCredentialsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -736,7 +900,7 @@ func (x *RetrieveSSHCredentialsRequest) Reset() { *x = RetrieveSSHCredentialsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[18] + mi := &file_gomote_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -749,7 +913,7 @@ func (*RetrieveSSHCredentialsRequest) ProtoMessage() {} func (x *RetrieveSSHCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[18] + mi := &file_gomote_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -762,7 +926,7 @@ // Deprecated: Use RetrieveSSHCredentialsRequest.ProtoReflect.Descriptor instead. func (*RetrieveSSHCredentialsRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{18} + return file_gomote_proto_rawDescGZIP(), []int{19} } // RetrieveSSHCredentialsResponse contains SSH credentials for a gomote instance. @@ -775,7 +939,7 @@ func (x *RetrieveSSHCredentialsResponse) Reset() { *x = RetrieveSSHCredentialsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[19] + mi := &file_gomote_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -788,7 +952,7 @@ func (*RetrieveSSHCredentialsResponse) ProtoMessage() {} func (x *RetrieveSSHCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[19] + mi := &file_gomote_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -801,7 +965,7 @@ // Deprecated: Use RetrieveSSHCredentialsResponse.ProtoReflect.Descriptor instead. func (*RetrieveSSHCredentialsResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{19} + return file_gomote_proto_rawDescGZIP(), []int{20} } // WriteTGZRequest specifies the data needed to expand a tar and zipped file onto the file system of a gomote instance. @@ -814,7 +978,7 @@ func (x *WriteTGZRequest) Reset() { *x = WriteTGZRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[20] + mi := &file_gomote_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -827,7 +991,7 @@ func (*WriteTGZRequest) ProtoMessage() {} func (x *WriteTGZRequest) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[20] + mi := &file_gomote_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -840,7 +1004,7 @@ // Deprecated: Use WriteTGZRequest.ProtoReflect.Descriptor instead. func (*WriteTGZRequest) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{20} + return file_gomote_proto_rawDescGZIP(), []int{21} } // WriteTGZResponse contains the results from expanding a tar and zipped file onto the file system of a gomote instance. @@ -853,7 +1017,7 @@ func (x *WriteTGZResponse) Reset() { *x = WriteTGZResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gomote_proto_msgTypes[21] + mi := &file_gomote_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -866,7 +1030,7 @@ func (*WriteTGZResponse) ProtoMessage() {} func (x *WriteTGZResponse) ProtoReflect() protoreflect.Message { - mi := &file_gomote_proto_msgTypes[21] + mi := &file_gomote_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -879,7 +1043,7 @@ // Deprecated: Use WriteTGZResponse.ProtoReflect.Descriptor instead. func (*WriteTGZResponse) Descriptor() ([]byte, []int) { - return file_gomote_proto_rawDescGZIP(), []int{21} + return file_gomote_proto_rawDescGZIP(), []int{22} } var File_gomote_proto protoreflect.FileDescriptor @@ -889,98 +1053,121 @@ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x18, - 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x74, - 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, - 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x16, 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, - 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, - 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x0a, - 0x1d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x20, - 0x0a, 0x1e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8e, 0x07, 0x0a, 0x0d, 0x47, 0x6f, 0x6d, 0x6f, - 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x41, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0f, 0x44, 0x65, 0x73, - 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x53, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x30, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x41, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x12, - 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x30, 0x01, 0x12, 0x54, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x16, 0x52, 0x65, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, + 0x74, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x68, 0x65, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x65, 0x72, 0x73, 0x41, 0x68, 0x65, 0x61, 0x64, 0x22, 0x30, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, + 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, + 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x18, + 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x6f, 0x6d, 0x6f, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, + 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, + 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, + 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x52, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x1e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x08, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, - 0x5a, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x54, 0x47, 0x5a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x6f, 0x6c, 0x61, - 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x12, 0x0a, 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0x90, 0x07, 0x0a, 0x0d, 0x47, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x54, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x74, 0x72, + 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, + 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x30, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, + 0x69, 0x76, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x12, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x30, 0x01, 0x12, 0x54, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x53, 0x53, 0x48, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x08, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x12, + 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, + 0x5a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x47, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -995,59 +1182,64 @@ return file_gomote_proto_rawDescData } -var file_gomote_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_gomote_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gomote_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_gomote_proto_goTypes = []interface{}{ - (*AuthenticateRequest)(nil), // 0: protos.AuthenticateRequest - (*AuthenticateResponse)(nil), // 1: protos.AuthenticateResponse - (*CreateInstanceRequest)(nil), // 2: protos.CreateInstanceRequest - (*CreateInstanceResponse)(nil), // 3: protos.CreateInstanceResponse - (*DestroyInstanceRequest)(nil), // 4: protos.DestroyInstanceRequest - (*DestroyInstanceResponse)(nil), // 5: protos.DestroyInstanceResponse - (*ExecuteCommandRequest)(nil), // 6: protos.ExecuteCommandRequest - (*ExecuteCommandResponse)(nil), // 7: protos.ExecuteCommandResponse - (*InstanceAliveRequest)(nil), // 8: protos.InstanceAliveRequest - (*InstanceAliveResponse)(nil), // 9: protos.InstanceAliveResponse - (*ListDirectoryRequest)(nil), // 10: protos.ListDirectoryRequest - (*ListDirectoryResponse)(nil), // 11: protos.ListDirectoryResponse - (*ListInstancesRequest)(nil), // 12: protos.ListInstancesRequest - (*ListInstancesResponse)(nil), // 13: protos.ListInstancesResponse - (*ReadTGZRequest)(nil), // 14: protos.ReadTGZRequest - (*ReadTGZResponse)(nil), // 15: protos.ReadTGZResponse - (*RemoveDirectoryRequest)(nil), // 16: protos.RemoveDirectoryRequest - (*RemoveDirectoryResponse)(nil), // 17: protos.RemoveDirectoryResponse - (*RetrieveSSHCredentialsRequest)(nil), // 18: protos.RetrieveSSHCredentialsRequest - (*RetrieveSSHCredentialsResponse)(nil), // 19: protos.RetrieveSSHCredentialsResponse - (*WriteTGZRequest)(nil), // 20: protos.WriteTGZRequest - (*WriteTGZResponse)(nil), // 21: protos.WriteTGZResponse + (CreateInstanceResponse_Status)(0), // 0: protos.CreateInstanceResponse.Status + (*AuthenticateRequest)(nil), // 1: protos.AuthenticateRequest + (*AuthenticateResponse)(nil), // 2: protos.AuthenticateResponse + (*CreateInstanceRequest)(nil), // 3: protos.CreateInstanceRequest + (*CreateInstanceResponse)(nil), // 4: protos.CreateInstanceResponse + (*DestroyInstanceRequest)(nil), // 5: protos.DestroyInstanceRequest + (*DestroyInstanceResponse)(nil), // 6: protos.DestroyInstanceResponse + (*ExecuteCommandRequest)(nil), // 7: protos.ExecuteCommandRequest + (*ExecuteCommandResponse)(nil), // 8: protos.ExecuteCommandResponse + (*Instance)(nil), // 9: protos.Instance + (*InstanceAliveRequest)(nil), // 10: protos.InstanceAliveRequest + (*InstanceAliveResponse)(nil), // 11: protos.InstanceAliveResponse + (*ListDirectoryRequest)(nil), // 12: protos.ListDirectoryRequest + (*ListDirectoryResponse)(nil), // 13: protos.ListDirectoryResponse + (*ListInstancesRequest)(nil), // 14: protos.ListInstancesRequest + (*ListInstancesResponse)(nil), // 15: protos.ListInstancesResponse + (*ReadTGZRequest)(nil), // 16: protos.ReadTGZRequest + (*ReadTGZResponse)(nil), // 17: protos.ReadTGZResponse + (*RemoveDirectoryRequest)(nil), // 18: protos.RemoveDirectoryRequest + (*RemoveDirectoryResponse)(nil), // 19: protos.RemoveDirectoryResponse + (*RetrieveSSHCredentialsRequest)(nil), // 20: protos.RetrieveSSHCredentialsRequest + (*RetrieveSSHCredentialsResponse)(nil), // 21: protos.RetrieveSSHCredentialsResponse + (*WriteTGZRequest)(nil), // 22: protos.WriteTGZRequest + (*WriteTGZResponse)(nil), // 23: protos.WriteTGZResponse } var file_gomote_proto_depIdxs = []int32{ - 0, // 0: protos.GomoteService.Authenticate:input_type -> protos.AuthenticateRequest - 2, // 1: protos.GomoteService.CreateInstance:input_type -> protos.CreateInstanceRequest - 4, // 2: protos.GomoteService.DestroyInstance:input_type -> protos.DestroyInstanceRequest - 6, // 3: protos.GomoteService.ExecuteCommand:input_type -> protos.ExecuteCommandRequest - 8, // 4: protos.GomoteService.InstanceAlive:input_type -> protos.InstanceAliveRequest - 10, // 5: protos.GomoteService.ListDirectory:input_type -> protos.ListDirectoryRequest - 12, // 6: protos.GomoteService.ListInstances:input_type -> protos.ListInstancesRequest - 14, // 7: protos.GomoteService.ReadTGZ:input_type -> protos.ReadTGZRequest - 16, // 8: protos.GomoteService.RemoveDirectory:input_type -> protos.RemoveDirectoryRequest - 18, // 9: protos.GomoteService.RetrieveSSHCredentials:input_type -> protos.RetrieveSSHCredentialsRequest - 20, // 10: protos.GomoteService.WriteTGZ:input_type -> protos.WriteTGZRequest - 1, // 11: protos.GomoteService.Authenticate:output_type -> protos.AuthenticateResponse - 3, // 12: protos.GomoteService.CreateInstance:output_type -> protos.CreateInstanceResponse - 5, // 13: protos.GomoteService.DestroyInstance:output_type -> protos.DestroyInstanceResponse - 7, // 14: protos.GomoteService.ExecuteCommand:output_type -> protos.ExecuteCommandResponse - 9, // 15: protos.GomoteService.InstanceAlive:output_type -> protos.InstanceAliveResponse - 11, // 16: protos.GomoteService.ListDirectory:output_type -> protos.ListDirectoryResponse - 13, // 17: protos.GomoteService.ListInstances:output_type -> protos.ListInstancesResponse - 15, // 18: protos.GomoteService.ReadTGZ:output_type -> protos.ReadTGZResponse - 17, // 19: protos.GomoteService.RemoveDirectory:output_type -> protos.RemoveDirectoryResponse - 19, // 20: protos.GomoteService.RetrieveSSHCredentials:output_type -> protos.RetrieveSSHCredentialsResponse - 21, // 21: protos.GomoteService.WriteTGZ:output_type -> protos.WriteTGZResponse - 11, // [11:22] is the sub-list for method output_type - 0, // [0:11] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 9, // 0: protos.CreateInstanceResponse.instance:type_name -> protos.Instance + 0, // 1: protos.CreateInstanceResponse.status:type_name -> protos.CreateInstanceResponse.Status + 1, // 2: protos.GomoteService.Authenticate:input_type -> protos.AuthenticateRequest + 3, // 3: protos.GomoteService.CreateInstance:input_type -> protos.CreateInstanceRequest + 5, // 4: protos.GomoteService.DestroyInstance:input_type -> protos.DestroyInstanceRequest + 7, // 5: protos.GomoteService.ExecuteCommand:input_type -> protos.ExecuteCommandRequest + 10, // 6: protos.GomoteService.InstanceAlive:input_type -> protos.InstanceAliveRequest + 12, // 7: protos.GomoteService.ListDirectory:input_type -> protos.ListDirectoryRequest + 14, // 8: protos.GomoteService.ListInstances:input_type -> protos.ListInstancesRequest + 16, // 9: protos.GomoteService.ReadTGZ:input_type -> protos.ReadTGZRequest + 18, // 10: protos.GomoteService.RemoveDirectory:input_type -> protos.RemoveDirectoryRequest + 20, // 11: protos.GomoteService.RetrieveSSHCredentials:input_type -> protos.RetrieveSSHCredentialsRequest + 22, // 12: protos.GomoteService.WriteTGZ:input_type -> protos.WriteTGZRequest + 2, // 13: protos.GomoteService.Authenticate:output_type -> protos.AuthenticateResponse + 4, // 14: protos.GomoteService.CreateInstance:output_type -> protos.CreateInstanceResponse + 6, // 15: protos.GomoteService.DestroyInstance:output_type -> protos.DestroyInstanceResponse + 8, // 16: protos.GomoteService.ExecuteCommand:output_type -> protos.ExecuteCommandResponse + 11, // 17: protos.GomoteService.InstanceAlive:output_type -> protos.InstanceAliveResponse + 13, // 18: protos.GomoteService.ListDirectory:output_type -> protos.ListDirectoryResponse + 15, // 19: protos.GomoteService.ListInstances:output_type -> protos.ListInstancesResponse + 17, // 20: protos.GomoteService.ReadTGZ:output_type -> protos.ReadTGZResponse + 19, // 21: protos.GomoteService.RemoveDirectory:output_type -> protos.RemoveDirectoryResponse + 21, // 22: protos.GomoteService.RetrieveSSHCredentials:output_type -> protos.RetrieveSSHCredentialsResponse + 23, // 23: protos.GomoteService.WriteTGZ:output_type -> protos.WriteTGZResponse + 13, // [13:24] is the sub-list for method output_type + 2, // [2:13] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_gomote_proto_init() } @@ -1153,7 +1345,7 @@ } } file_gomote_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstanceAliveRequest); i { + switch v := v.(*Instance); i { case 0: return &v.state case 1: @@ -1165,7 +1357,7 @@ } } file_gomote_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstanceAliveResponse); i { + switch v := v.(*InstanceAliveRequest); i { case 0: return &v.state case 1: @@ -1177,7 +1369,7 @@ } } file_gomote_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDirectoryRequest); i { + switch v := v.(*InstanceAliveResponse); i { case 0: return &v.state case 1: @@ -1189,7 +1381,7 @@ } } file_gomote_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDirectoryResponse); i { + switch v := v.(*ListDirectoryRequest); i { case 0: return &v.state case 1: @@ -1201,7 +1393,7 @@ } } file_gomote_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListInstancesRequest); i { + switch v := v.(*ListDirectoryResponse); i { case 0: return &v.state case 1: @@ -1213,7 +1405,7 @@ } } file_gomote_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListInstancesResponse); i { + switch v := v.(*ListInstancesRequest); i { case 0: return &v.state case 1: @@ -1225,7 +1417,7 @@ } } file_gomote_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadTGZRequest); i { + switch v := v.(*ListInstancesResponse); i { case 0: return &v.state case 1: @@ -1237,7 +1429,7 @@ } } file_gomote_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadTGZResponse); i { + switch v := v.(*ReadTGZRequest); i { case 0: return &v.state case 1: @@ -1249,7 +1441,7 @@ } } file_gomote_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDirectoryRequest); i { + switch v := v.(*ReadTGZResponse); i { case 0: return &v.state case 1: @@ -1261,7 +1453,7 @@ } } file_gomote_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDirectoryResponse); i { + switch v := v.(*RemoveDirectoryRequest); i { case 0: return &v.state case 1: @@ -1273,7 +1465,7 @@ } } file_gomote_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetrieveSSHCredentialsRequest); i { + switch v := v.(*RemoveDirectoryResponse); i { case 0: return &v.state case 1: @@ -1285,7 +1477,7 @@ } } file_gomote_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetrieveSSHCredentialsResponse); i { + switch v := v.(*RetrieveSSHCredentialsRequest); i { case 0: return &v.state case 1: @@ -1297,7 +1489,7 @@ } } file_gomote_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WriteTGZRequest); i { + switch v := v.(*RetrieveSSHCredentialsResponse); i { case 0: return &v.state case 1: @@ -1309,6 +1501,18 @@ } } file_gomote_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteTGZRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gomote_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteTGZResponse); i { case 0: return &v.state @@ -1326,13 +1530,14 @@ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gomote_proto_rawDesc, - NumEnums: 0, - NumMessages: 22, + NumEnums: 1, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, GoTypes: file_gomote_proto_goTypes, DependencyIndexes: file_gomote_proto_depIdxs, + EnumInfos: file_gomote_proto_enumTypes, MessageInfos: file_gomote_proto_msgTypes, }.Build() File_gomote_proto = out.File
diff --git a/internal/gomote/protos/gomote.proto b/internal/gomote/protos/gomote.proto index 266ba8d..48fa387 100644 --- a/internal/gomote/protos/gomote.proto +++ b/internal/gomote/protos/gomote.proto
@@ -13,7 +13,7 @@ // Authenticate provides authentication information without any additonal action. rpc Authenticate (AuthenticateRequest) returns (AuthenticateResponse) {} // CreateInstance creates a gomote instance. - rpc CreateInstance (CreateInstanceRequest) returns (CreateInstanceResponse) {} + rpc CreateInstance (CreateInstanceRequest) returns (stream CreateInstanceResponse) {} // DestroyInstance destroys a gomote instance. rpc DestroyInstance (DestroyInstanceRequest) returns (DestroyInstanceResponse) {} // ExecuteCommand executes a command on the gomote instance. @@ -41,10 +41,25 @@ message AuthenticateResponse {} // CreateInstanceRequest specifies the data needed to create a gomote instance. -message CreateInstanceRequest {} +message CreateInstanceRequest { + string builder_type = 1; +} // CreateInstanceResponse contains data about a created gomote instance. -message CreateInstanceResponse {} +message CreateInstanceResponse { + // Instance information for the requested instance. + Instance instance = 1; + enum Status { + UNKNOWN = 0; + WAITING = 1; + COMPLETE = 2; + } + // The status for the requested create. + Status status = 2; + // Waiters ahead is the count of how many instances are being scheduled for + // creation before the current instance creation request. + int64 waiters_ahead = 3; +} // DestroyInstanceRequest specifies the data needed to destroy a gomote instance. message DestroyInstanceRequest {} @@ -58,6 +73,19 @@ // ExecuteCommandResponse contains data about the executed command. message ExecuteCommandResponse {} +// Instance contains descriptive information about a gomote instance. +message Instance { + // The unique identifier for a gomote instance. + string gomote_id = 1; + // Builder type for the gomote instance. + string builder_type = 2; + // Host type for the gomote instance. + string host_type = 3; + // The timestamp for when the builder instance will expire. It is + // reprsented in Unix epoch time format. + int64 expires = 4; +} + // InstanceAliveRequest specifies the data needed to check the liveness of a gomote instance. message InstanceAliveRequest {}
diff --git a/internal/gomote/protos/gomote_grpc.pb.go b/internal/gomote/protos/gomote_grpc.pb.go index 6e74382..df51596 100644 --- a/internal/gomote/protos/gomote_grpc.pb.go +++ b/internal/gomote/protos/gomote_grpc.pb.go
@@ -21,7 +21,7 @@ // Authenticate provides authentication information without any additonal action. Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) // CreateInstance creates a gomote instance. - CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*CreateInstanceResponse, error) + CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (GomoteService_CreateInstanceClient, error) // DestroyInstance destroys a gomote instance. DestroyInstance(ctx context.Context, in *DestroyInstanceRequest, opts ...grpc.CallOption) (*DestroyInstanceResponse, error) // ExecuteCommand executes a command on the gomote instance. @@ -59,13 +59,36 @@ return out, nil } -func (c *gomoteServiceClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*CreateInstanceResponse, error) { - out := new(CreateInstanceResponse) - err := c.cc.Invoke(ctx, "/protos.GomoteService/CreateInstance", in, out, opts...) +func (c *gomoteServiceClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (GomoteService_CreateInstanceClient, error) { + stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[0], "/protos.GomoteService/CreateInstance", opts...) if err != nil { return nil, err } - return out, nil + x := &gomoteServiceCreateInstanceClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type GomoteService_CreateInstanceClient interface { + Recv() (*CreateInstanceResponse, error) + grpc.ClientStream +} + +type gomoteServiceCreateInstanceClient struct { + grpc.ClientStream +} + +func (x *gomoteServiceCreateInstanceClient) Recv() (*CreateInstanceResponse, error) { + m := new(CreateInstanceResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } func (c *gomoteServiceClient) DestroyInstance(ctx context.Context, in *DestroyInstanceRequest, opts ...grpc.CallOption) (*DestroyInstanceResponse, error) { @@ -78,7 +101,7 @@ } func (c *gomoteServiceClient) ExecuteCommand(ctx context.Context, in *ExecuteCommandRequest, opts ...grpc.CallOption) (GomoteService_ExecuteCommandClient, error) { - stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[0], "/protos.GomoteService/ExecuteCommand", opts...) + stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[1], "/protos.GomoteService/ExecuteCommand", opts...) if err != nil { return nil, err } @@ -137,7 +160,7 @@ } func (c *gomoteServiceClient) ReadTGZ(ctx context.Context, in *ReadTGZRequest, opts ...grpc.CallOption) (GomoteService_ReadTGZClient, error) { - stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[1], "/protos.GomoteService/ReadTGZ", opts...) + stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[2], "/protos.GomoteService/ReadTGZ", opts...) if err != nil { return nil, err } @@ -187,7 +210,7 @@ } func (c *gomoteServiceClient) WriteTGZ(ctx context.Context, opts ...grpc.CallOption) (GomoteService_WriteTGZClient, error) { - stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[2], "/protos.GomoteService/WriteTGZ", opts...) + stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[3], "/protos.GomoteService/WriteTGZ", opts...) if err != nil { return nil, err } @@ -227,7 +250,7 @@ // Authenticate provides authentication information without any additonal action. Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) // CreateInstance creates a gomote instance. - CreateInstance(context.Context, *CreateInstanceRequest) (*CreateInstanceResponse, error) + CreateInstance(*CreateInstanceRequest, GomoteService_CreateInstanceServer) error // DestroyInstance destroys a gomote instance. DestroyInstance(context.Context, *DestroyInstanceRequest) (*DestroyInstanceResponse, error) // ExecuteCommand executes a command on the gomote instance. @@ -256,8 +279,8 @@ func (UnimplementedGomoteServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") } -func (UnimplementedGomoteServiceServer) CreateInstance(context.Context, *CreateInstanceRequest) (*CreateInstanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateInstance not implemented") +func (UnimplementedGomoteServiceServer) CreateInstance(*CreateInstanceRequest, GomoteService_CreateInstanceServer) error { + return status.Errorf(codes.Unimplemented, "method CreateInstance not implemented") } func (UnimplementedGomoteServiceServer) DestroyInstance(context.Context, *DestroyInstanceRequest) (*DestroyInstanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DestroyInstance not implemented") @@ -317,22 +340,25 @@ return interceptor(ctx, in, info, handler) } -func _GomoteService_CreateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateInstanceRequest) - if err := dec(in); err != nil { - return nil, err +func _GomoteService_CreateInstance_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(CreateInstanceRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - if interceptor == nil { - return srv.(GomoteServiceServer).CreateInstance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protos.GomoteService/CreateInstance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GomoteServiceServer).CreateInstance(ctx, req.(*CreateInstanceRequest)) - } - return interceptor(ctx, in, info, handler) + return srv.(GomoteServiceServer).CreateInstance(m, &gomoteServiceCreateInstanceServer{stream}) +} + +type GomoteService_CreateInstanceServer interface { + Send(*CreateInstanceResponse) error + grpc.ServerStream +} + +type gomoteServiceCreateInstanceServer struct { + grpc.ServerStream +} + +func (x *gomoteServiceCreateInstanceServer) Send(m *CreateInstanceResponse) error { + return x.ServerStream.SendMsg(m) } func _GomoteService_DestroyInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -523,10 +549,6 @@ Handler: _GomoteService_Authenticate_Handler, }, { - MethodName: "CreateInstance", - Handler: _GomoteService_CreateInstance_Handler, - }, - { MethodName: "DestroyInstance", Handler: _GomoteService_DestroyInstance_Handler, }, @@ -553,6 +575,11 @@ }, Streams: []grpc.StreamDesc{ { + StreamName: "CreateInstance", + Handler: _GomoteService_CreateInstance_Handler, + ServerStreams: true, + }, + { StreamName: "ExecuteCommand", Handler: _GomoteService_ExecuteCommand_Handler, ServerStreams: true,