diff --git a/backend/controller/console.go b/backend/controller/console.go index a96c13c206..86dd5e1926 100644 --- a/backend/controller/console.go +++ b/backend/controller/console.go @@ -94,11 +94,11 @@ func (c *ConsoleService) GetModules(ctx context.Context, req *connect.Request[pb } modules = append(modules, &pbconsole.Module{ - Name: deployment.Module, - DeploymentName: deployment.Name.String(), - Language: deployment.Language, - Verbs: verbs, - Data: data, + Name: deployment.Module, + DeploymentKey: deployment.Key.String(), + Language: deployment.Language, + Verbs: verbs, + Data: data, }) } @@ -197,15 +197,15 @@ func eventsQueryProtoToDAL(pb *pbconsole.EventsQuery) ([]dal.EventFilter, error) for _, filter := range pb.Filters { switch filter := filter.Filter.(type) { case *pbconsole.EventsQuery_Filter_Deployments: - deploymentNames := make([]model.DeploymentName, 0, len(filter.Deployments.Deployments)) + deploymentKeys := make([]model.DeploymentKey, 0, len(filter.Deployments.Deployments)) for _, deployment := range filter.Deployments.Deployments { - deploymentName, err := model.ParseDeploymentName(deployment) + deploymentKey, err := model.ParseDeploymentKey(deployment) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, err) } - deploymentNames = append(deploymentNames, deploymentName) + deploymentKeys = append(deploymentKeys, deploymentKey) } - query = append(query, dal.FilterDeployments(deploymentNames...)) + query = append(query, dal.FilterDeployments(deploymentKeys...)) case *pbconsole.EventsQuery_Filter_Requests: requestNames := make([]model.RequestName, 0, len(filter.Requests.Requests)) @@ -297,10 +297,10 @@ func eventDALToProto(event dal.Event) *pbconsole.Event { Id: event.ID, Entry: &pbconsole.Event_Call{ Call: &pbconsole.CallEvent{ - RequestName: requestName, - DeploymentName: event.DeploymentName.String(), - TimeStamp: timestamppb.New(event.Time), - SourceVerbRef: sourceVerbRef, + RequestName: requestName, + DeploymentKey: event.DeploymentKey.String(), + TimeStamp: timestamppb.New(event.Time), + SourceVerbRef: sourceVerbRef, DestinationVerbRef: &schemapb.Ref{ Module: event.DestVerb.Module, Name: event.DestVerb.Name, @@ -325,14 +325,14 @@ func eventDALToProto(event dal.Event) *pbconsole.Event { Id: event.ID, Entry: &pbconsole.Event_Log{ Log: &pbconsole.LogEvent{ - DeploymentName: event.DeploymentName.String(), - RequestName: requestName, - TimeStamp: timestamppb.New(event.Time), - LogLevel: event.Level, - Attributes: event.Attributes, - Message: event.Message, - Error: event.Error.Ptr(), - Stack: event.Stack.Ptr(), + DeploymentKey: event.DeploymentKey.String(), + RequestName: requestName, + TimeStamp: timestamppb.New(event.Time), + LogLevel: event.Level, + Attributes: event.Attributes, + Message: event.Message, + Error: event.Error.Ptr(), + Stack: event.Stack.Ptr(), }, }, } @@ -348,7 +348,7 @@ func eventDALToProto(event dal.Event) *pbconsole.Event { Id: event.ID, Entry: &pbconsole.Event_DeploymentCreated{ DeploymentCreated: &pbconsole.DeploymentCreatedEvent{ - Name: event.DeploymentName.String(), + Key: event.DeploymentKey.String(), Language: event.Language, ModuleName: event.ModuleName, MinReplicas: int32(event.MinReplicas), @@ -362,7 +362,7 @@ func eventDALToProto(event dal.Event) *pbconsole.Event { Id: event.ID, Entry: &pbconsole.Event_DeploymentUpdated{ DeploymentUpdated: &pbconsole.DeploymentUpdatedEvent{ - Name: event.DeploymentName.String(), + Key: event.DeploymentKey.String(), MinReplicas: int32(event.MinReplicas), PrevMinReplicas: int32(event.PrevMinReplicas), }, diff --git a/backend/controller/controller.go b/backend/controller/controller.go index 86a1d8e825..9fdcaf1083 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -285,14 +285,14 @@ func (s *Service) Status(ctx context.Context, req *connect.Request[ftlv1.StatusR deployments, err := slices.MapErr(status.Deployments, func(d dal.Deployment) (*ftlv1.StatusResponse_Deployment, error) { labels, err := structpb.NewStruct(d.Labels) if err != nil { - return nil, fmt.Errorf("could not marshal attributes for deployment %s: %w", d.Name, err) + return nil, fmt.Errorf("could not marshal attributes for deployment %s: %w", d.Key.String(), err) } return &ftlv1.StatusResponse_Deployment{ - Key: d.Name.String(), + Key: d.Key.String(), Language: d.Language, Name: d.Module, MinReplicas: int32(d.MinReplicas), - Replicas: replicas[d.Name.String()], + Replicas: replicas[d.Key.String()], Schema: d.Schema.ToProto().(*schemapb.Module), //nolint:forcetypeassert Labels: labels, }, nil @@ -312,10 +312,10 @@ func (s *Service) Status(ctx context.Context, req *connect.Request[ftlv1.StatusR Deployments: deployments, IngressRoutes: slices.Map(status.IngressRoutes, func(r dal.IngressRouteEntry) *ftlv1.StatusResponse_IngressRoute { return &ftlv1.StatusResponse_IngressRoute{ - DeploymentName: r.Deployment.String(), - Verb: &schemapb.Ref{Module: r.Module, Name: r.Verb}, - Method: r.Method, - Path: r.Path, + DeploymentKey: r.Deployment.String(), + Verb: &schemapb.Ref{Module: r.Module, Name: r.Verb}, + Method: r.Method, + Path: r.Path, } }), Routes: routes, @@ -326,7 +326,7 @@ func (s *Service) Status(ctx context.Context, req *connect.Request[ftlv1.StatusR func (s *Service) StreamDeploymentLogs(ctx context.Context, stream *connect.ClientStream[ftlv1.StreamDeploymentLogsRequest]) (*connect.Response[ftlv1.StreamDeploymentLogsResponse], error) { for stream.Receive() { msg := stream.Msg() - deploymentName, err := model.ParseDeploymentName(msg.DeploymentName) + deploymentKey, err := model.ParseDeploymentKey(msg.DeploymentKey) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s: %w", "invalid deployment key", err)) } @@ -340,13 +340,13 @@ func (s *Service) StreamDeploymentLogs(ctx context.Context, stream *connect.Clie } err = s.dal.InsertLogEvent(ctx, &dal.LogEvent{ - RequestName: requestName, - DeploymentName: deploymentName, - Time: msg.TimeStamp.AsTime(), - Level: msg.LogLevel, - Attributes: msg.Attributes, - Message: msg.Message, - Error: optional.Ptr(msg.Error), + RequestName: requestName, + DeploymentKey: deploymentKey, + Time: msg.TimeStamp.AsTime(), + Level: msg.LogLevel, + Attributes: msg.Attributes, + Message: msg.Message, + Error: optional.Ptr(msg.Error), }) if err != nil { return nil, err @@ -379,21 +379,21 @@ func (s *Service) PullSchema(ctx context.Context, req *connect.Request[ftlv1.Pul } func (s *Service) UpdateDeploy(ctx context.Context, req *connect.Request[ftlv1.UpdateDeployRequest]) (response *connect.Response[ftlv1.UpdateDeployResponse], err error) { - deploymentName, err := model.ParseDeploymentName(req.Msg.DeploymentName) + deploymentKey, err := model.ParseDeploymentKey(req.Msg.DeploymentKey) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s: %w", "invalid deployment key", err)) } - logger := s.getDeploymentLogger(ctx, deploymentName) - logger.Debugf("Update deployment for: %s", deploymentName) + logger := s.getDeploymentLogger(ctx, deploymentKey) + logger.Debugf("Update deployment for: %s", deploymentKey) - err = s.dal.SetDeploymentReplicas(ctx, deploymentName, int(req.Msg.MinReplicas)) + err = s.dal.SetDeploymentReplicas(ctx, deploymentKey, int(req.Msg.MinReplicas)) if err != nil { if errors.Is(err, dal.ErrNotFound) { - logger.Errorf(err, "Deployment not found: %s", deploymentName) + logger.Errorf(err, "Deployment not found: %s", deploymentKey) return nil, connect.NewError(connect.CodeNotFound, errors.New("deployment not found")) } - logger.Errorf(err, "Could not set deployment replicas: %s", deploymentName) + logger.Errorf(err, "Could not set deployment replicas: %s", deploymentKey) return nil, fmt.Errorf("%s: %w", "could not set deployment replicas", err) } @@ -401,23 +401,23 @@ func (s *Service) UpdateDeploy(ctx context.Context, req *connect.Request[ftlv1.U } func (s *Service) ReplaceDeploy(ctx context.Context, c *connect.Request[ftlv1.ReplaceDeployRequest]) (*connect.Response[ftlv1.ReplaceDeployResponse], error) { - newDeploymentName, err := model.ParseDeploymentName(c.Msg.DeploymentName) + newDeploymentKey, err := model.ParseDeploymentKey(c.Msg.DeploymentKey) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, err) } - logger := s.getDeploymentLogger(ctx, newDeploymentName) - logger.Debugf("Replace deployment for: %s", newDeploymentName) + logger := s.getDeploymentLogger(ctx, newDeploymentKey) + logger.Debugf("Replace deployment for: %s", newDeploymentKey) - err = s.dal.ReplaceDeployment(ctx, newDeploymentName, int(c.Msg.MinReplicas)) + err = s.dal.ReplaceDeployment(ctx, newDeploymentKey, int(c.Msg.MinReplicas)) if err != nil { if errors.Is(err, dal.ErrNotFound) { - logger.Errorf(err, "Deployment not found: %s", newDeploymentName) + logger.Errorf(err, "Deployment not found: %s", newDeploymentKey) return nil, connect.NewError(connect.CodeNotFound, errors.New("deployment not found")) } else if errors.Is(err, dal.ErrConflict) { - logger.Debugf("Deployment already exists: %s", newDeploymentName) + logger.Debugf("Deployment already exists: %s", newDeploymentKey) } else { - logger.Errorf(err, "Could not replace deployment: %s", newDeploymentName) + logger.Errorf(err, "Could not replace deployment: %s", newDeploymentKey) return nil, fmt.Errorf("%s: %w", "could not replace deployment", err) } } @@ -507,13 +507,13 @@ func (s *Service) pingRunner(ctx context.Context, endpoint *url.URL) error { } func (s *Service) GetDeployment(ctx context.Context, req *connect.Request[ftlv1.GetDeploymentRequest]) (*connect.Response[ftlv1.GetDeploymentResponse], error) { - deployment, err := s.getDeployment(ctx, req.Msg.DeploymentName) + deployment, err := s.getDeployment(ctx, req.Msg.DeploymentKey) if err != nil { return nil, err } - logger := s.getDeploymentLogger(ctx, deployment.Name) - logger.Debugf("Get deployment for: %s", deployment.Name) + logger := s.getDeploymentLogger(ctx, deployment.Key) + logger.Debugf("Get deployment for: %s", deployment.Key.String()) return connect.NewResponse(&ftlv1.GetDeploymentResponse{ Schema: deployment.Schema.ToProto().(*schemapb.Module), //nolint:forcetypeassert @@ -522,14 +522,14 @@ func (s *Service) GetDeployment(ctx context.Context, req *connect.Request[ftlv1. } func (s *Service) GetDeploymentArtefacts(ctx context.Context, req *connect.Request[ftlv1.GetDeploymentArtefactsRequest], resp *connect.ServerStream[ftlv1.GetDeploymentArtefactsResponse]) error { - deployment, err := s.getDeployment(ctx, req.Msg.DeploymentName) + deployment, err := s.getDeployment(ctx, req.Msg.DeploymentKey) if err != nil { return err } defer deployment.Close() - logger := s.getDeploymentLogger(ctx, deployment.Name) - logger.Debugf("Get deployment artefacts for: %s", deployment.Name) + logger := s.getDeploymentLogger(ctx, deployment.Key) + logger.Debugf("Get deployment artefacts for: %s", deployment.Key.String()) chunk := make([]byte, s.config.ArtefactChunkSize) nextArtefact: @@ -620,14 +620,14 @@ func (s *Service) Call(ctx context.Context, req *connect.Request[ftlv1.CallReque maybeResponse = optional.Some(resp.Msg) } s.recordCall(ctx, &Call{ - deploymentName: route.Deployment, - requestName: requestName, - startTime: start, - destVerb: verbRef, - callers: callers, - callError: optional.Nil(err), - request: req.Msg, - response: maybeResponse, + deploymentKey: route.Deployment, + requestName: requestName, + startTime: start, + destVerb: verbRef, + callers: callers, + callError: optional.Nil(err), + request: req.Msg, + response: maybeResponse, }) return resp, err } @@ -698,7 +698,7 @@ func (s *Service) CreateDeployment(ctx context.Context, req *connect.Request[ftl } deploymentLogger := s.getDeploymentLogger(ctx, dname) deploymentLogger.Debugf("Created deployment %s", dname) - return connect.NewResponse(&ftlv1.CreateDeploymentResponse{DeploymentName: dname.String()}), nil + return connect.NewResponse(&ftlv1.CreateDeploymentResponse{DeploymentKey: dname.String()}), nil } // Load schemas for existing modules, combine with our new one, and validate as a whole. @@ -717,10 +717,10 @@ func (s *Service) validateWholeSchema(ctx context.Context, module *schema.Module return schema.Module(module.Name).MustGet(), nil } -func (s *Service) getDeployment(ctx context.Context, name string) (*model.Deployment, error) { - dkey, err := model.ParseDeploymentName(name) +func (s *Service) getDeployment(ctx context.Context, key string) (*model.Deployment, error) { + dkey, err := model.ParseDeploymentKey(key) if err != nil { - return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s: %w", "invalid deployment name", err)) + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s: %w", "invalid deployment key", err)) } deployment, err := s.dal.GetDeployment(ctx, dkey) if errors.Is(err, pgx.ErrNoRows) { @@ -790,7 +790,7 @@ func (s *Service) reconcileDeployments(ctx context.Context) (time.Duration, erro deployment := model.Deployment{ Module: reconcile.Module, Language: reconcile.Language, - Name: reconcile.Deployment, + Key: reconcile.Deployment, } delete(oldFailures, reconcile.Deployment.String()) @@ -801,8 +801,8 @@ func (s *Service) reconcileDeployments(ctx context.Context) (time.Duration, erro wg.Go(func(ctx context.Context) error { if err := s.deploy(ctx, deployment); err != nil { lock.Lock() - failureCount := s.increaseReplicaFailures[deployment.Name.String()] + 1 - s.increaseReplicaFailures[deployment.Name.String()] = failureCount + failureCount := s.increaseReplicaFailures[deployment.Key.String()] + 1 + s.increaseReplicaFailures[deployment.Key.String()] = failureCount lock.Unlock() if failureCount >= 5 { @@ -812,7 +812,7 @@ func (s *Service) reconcileDeployments(ctx context.Context) (time.Duration, erro } } else { lock.Lock() - delete(s.increaseReplicaFailures, deployment.Name.String()) + delete(s.increaseReplicaFailures, deployment.Key.String()) lock.Unlock() deploymentLogger.Debugf("Reconciled %s to %d/%d replicas", reconcile.Deployment, reconcile.AssignedReplicas+1, reconcile.RequiredReplicas) @@ -825,7 +825,7 @@ func (s *Service) reconcileDeployments(ctx context.Context) (time.Duration, erro } else if require < 0 { deploymentLogger.Debugf("Need %d less runners for %s", -require, reconcile.Deployment) wg.Go(func(ctx context.Context) error { - ok, err := s.terminateRandomRunner(ctx, deployment.Name) + ok, err := s.terminateRandomRunner(ctx, deployment.Key) if err != nil { deploymentLogger.Warnf("Failed to terminate runner: %s", err) } else if ok { @@ -883,7 +883,7 @@ func (s *Service) reconcileRunners(ctx context.Context) (time.Duration, error) { return time.Second, nil } -func (s *Service) terminateRandomRunner(ctx context.Context, key model.DeploymentName) (bool, error) { +func (s *Service) terminateRandomRunner(ctx context.Context, key model.DeploymentKey) (bool, error) { runners, err := s.dal.GetRunnersForDeployment(ctx, key) if err != nil { return false, fmt.Errorf("failed to get runner for %s: %w", key, err) @@ -893,7 +893,7 @@ func (s *Service) terminateRandomRunner(ctx context.Context, key model.Deploymen } runner := runners[rand.Intn(len(runners))] //nolint:gosec client := s.clientsForEndpoint(runner.Endpoint) - resp, err := client.runner.Terminate(ctx, connect.NewRequest(&ftlv1.TerminateRequest{DeploymentName: key.String()})) + resp, err := client.runner.Terminate(ctx, connect.NewRequest(&ftlv1.TerminateRequest{DeploymentKey: key.String()})) if err != nil { return false, err } @@ -912,7 +912,7 @@ func (s *Service) deploy(ctx context.Context, reconcile model.Deployment) error return err } - _, err = client.runner.Deploy(ctx, connect.NewRequest(&ftlv1.DeployRequest{DeploymentName: reconcile.Name.String()})) + _, err = client.runner.Deploy(ctx, connect.NewRequest(&ftlv1.DeployRequest{DeploymentKey: reconcile.Key.String()})) if err != nil { return err } @@ -923,16 +923,16 @@ func (s *Service) reserveRunner(ctx context.Context, reconcile model.Deployment) // A timeout context applied to the transaction and the Runner.Reserve() Call. reservationCtx, cancel := context.WithTimeout(ctx, s.config.DeploymentReservationTimeout) defer cancel() - claim, err := s.dal.ReserveRunnerForDeployment(reservationCtx, reconcile.Name, s.config.DeploymentReservationTimeout, model.Labels{ + claim, err := s.dal.ReserveRunnerForDeployment(reservationCtx, reconcile.Key, s.config.DeploymentReservationTimeout, model.Labels{ "languages": []string{reconcile.Language}, }) if err != nil { - return clients{}, fmt.Errorf("failed to claim runners for %s: %w", reconcile.Name, err) + return clients{}, fmt.Errorf("failed to claim runners for %s: %w", reconcile.Key, err) } err = dal.WithReservation(reservationCtx, claim, func() error { client = s.clientsForEndpoint(claim.Runner().Endpoint) - _, err = client.runner.Reserve(reservationCtx, connect.NewRequest(&ftlv1.ReserveRequest{DeploymentName: reconcile.Name.String()})) + _, err = client.runner.Reserve(reservationCtx, connect.NewRequest(&ftlv1.ReserveRequest{DeploymentKey: reconcile.Key.String()})) return err }) return @@ -967,7 +967,7 @@ func (s *Service) watchModuleChanges(ctx context.Context, sendChange func(respon minReplicas int } moduleState := map[string]moduleStateEntry{} - moduleByDeploymentName := map[model.DeploymentName]string{} + moduleByDeploymentKey := map[model.DeploymentKey]string{} // Seed the notification channel with the current deployments. seedDeployments, err := s.dal.GetActiveDeployments(ctx) @@ -1007,14 +1007,14 @@ func (s *Service) watchModuleChanges(ctx context.Context, sendChange func(respon var response *ftlv1.PullSchemaResponse // Deleted key if deletion, ok := notification.Deleted.Get(); ok { - name := moduleByDeploymentName[deletion] + name := moduleByDeploymentKey[deletion] response = &ftlv1.PullSchemaResponse{ - ModuleName: name, - DeploymentName: deletion.String(), - ChangeType: ftlv1.DeploymentChangeType_DEPLOYMENT_REMOVED, + ModuleName: name, + DeploymentKey: deletion.String(), + ChangeType: ftlv1.DeploymentChangeType_DEPLOYMENT_REMOVED, } delete(moduleState, name) - delete(moduleByDeploymentName, deletion) + delete(moduleByDeploymentKey, deletion) } else if message, ok := notification.Message.Get(); ok { moduleSchema := message.Schema.ToProto().(*schemapb.Module) //nolint:forcetypeassert moduleSchema.Runtime = &schemapb.ModuleRuntime{ @@ -1038,27 +1038,27 @@ func (s *Service) watchModuleChanges(ctx context.Context, sendChange func(respon changeType = ftlv1.DeploymentChangeType_DEPLOYMENT_REMOVED } response = &ftlv1.PullSchemaResponse{ - ModuleName: moduleSchema.Name, - DeploymentName: message.Name.String(), - Schema: moduleSchema, - ChangeType: changeType, + ModuleName: moduleSchema.Name, + DeploymentKey: message.Key.String(), + Schema: moduleSchema, + ChangeType: changeType, } } } else { response = &ftlv1.PullSchemaResponse{ - ModuleName: moduleSchema.Name, - DeploymentName: message.Name.String(), - Schema: moduleSchema, - ChangeType: ftlv1.DeploymentChangeType_DEPLOYMENT_ADDED, - More: initialCount > 1, + ModuleName: moduleSchema.Name, + DeploymentKey: message.Key.String(), + Schema: moduleSchema, + ChangeType: ftlv1.DeploymentChangeType_DEPLOYMENT_ADDED, + More: initialCount > 1, } if initialCount > 0 { initialCount-- } } moduleState[message.Schema.Name] = newState - delete(moduleByDeploymentName, message.Name) // The deployment may have changed. - moduleByDeploymentName[message.Name] = message.Schema.Name + delete(moduleByDeploymentKey, message.Key) // The deployment may have changed. + moduleByDeploymentKey[message.Key] = message.Schema.Name } if response != nil { @@ -1074,8 +1074,8 @@ func (s *Service) watchModuleChanges(ctx context.Context, sendChange func(respon } } -func (s *Service) getDeploymentLogger(ctx context.Context, deploymentName model.DeploymentName) *log.Logger { - attrs := map[string]string{"deployment": deploymentName.String()} +func (s *Service) getDeploymentLogger(ctx context.Context, deploymentKey model.DeploymentKey) *log.Logger { + attrs := map[string]string{"deployment": deploymentKey.String()} if requestName, ok, _ := rpc.RequestNameFromContext(ctx); ok { attrs["request"] = requestName.String() } diff --git a/backend/controller/dal/dal.go b/backend/controller/dal/dal.go index 9372f030ac..76ded8d7c6 100644 --- a/backend/controller/dal/dal.go +++ b/backend/controller/dal/dal.go @@ -41,7 +41,7 @@ var ( type IngressRoute struct { Runner model.RunnerKey - Deployment model.DeploymentName + Deployment model.DeploymentKey Endpoint string Path string Module string @@ -49,7 +49,7 @@ type IngressRoute struct { } type IngressRouteEntry struct { - Deployment model.DeploymentName + Deployment model.DeploymentKey Module string Verb string Method string @@ -83,9 +83,9 @@ func DeploymentArtefactFromProto(in *ftlv1.DeploymentArtefact) (DeploymentArtefa } func runnerFromDB(row sql.GetRunnerRow) Runner { - var deployment optional.Option[model.DeploymentName] - if name, ok := row.DeploymentName.Get(); ok { - parsed, err := model.ParseDeploymentName(name) + var deployment optional.Option[model.DeploymentKey] + if name, ok := row.DeploymentKey.Get(); ok { + parsed, err := model.ParseDeploymentKey(name) if err != nil { return Runner{} } @@ -112,14 +112,14 @@ type Runner struct { ReservationTimeout optional.Option[time.Duration] Module optional.Option[string] // Assigned deployment key, if any. - Deployment optional.Option[model.DeploymentName] + Deployment optional.Option[model.DeploymentKey] Labels model.Labels } func (r Runner) notification() {} type Reconciliation struct { - Deployment model.DeploymentName + Deployment model.DeploymentKey Module string Language string @@ -170,7 +170,7 @@ const ( ) type Deployment struct { - Name model.DeploymentName + Key model.DeploymentKey Language string Module string MinReplicas int @@ -179,7 +179,7 @@ type Deployment struct { Labels model.Labels } -func (d Deployment) String() string { return d.Name.String() } +func (d Deployment) String() string { return d.Key.String() } func (d Deployment) notification() {} @@ -207,7 +207,7 @@ type Reservation interface { type Route struct { Module string Runner model.RunnerKey - Deployment model.DeploymentName + Deployment model.DeploymentKey Endpoint string } @@ -293,7 +293,7 @@ func (d *DAL) GetStatus( return Deployment{}, fmt.Errorf("%q: invalid labels in database: %w", in.ModuleName, err) } return Deployment{ - Name: in.Deployment.Name, + Key: in.Deployment.Key, Module: in.ModuleName, Language: in.Language, MinReplicas: int(in.Deployment.MinReplicas), @@ -305,13 +305,13 @@ func (d *DAL) GetStatus( return Status{}, err } domainRunners, err := slices.MapErr(runners, func(in sql.GetActiveRunnersRow) (Runner, error) { - var deployment optional.Option[model.DeploymentName] - if name, ok := in.DeploymentName.Get(); ok { - parsed, err := model.ParseDeploymentName(name) + var deployment optional.Option[model.DeploymentKey] + if keyStr, ok := in.DeploymentKey.Get(); ok { + key, err := model.ParseDeploymentKey(keyStr) if err != nil { - return Runner{}, fmt.Errorf("invalid deployment name %q: %w", name, err) + return Runner{}, fmt.Errorf("invalid deployment key %q: %w", keyStr, err) } - deployment = optional.Some(parsed) + deployment = optional.Some(key) } attrs := model.Labels{} if err := json.Unmarshal(in.Labels, &attrs); err != nil { @@ -335,7 +335,7 @@ func (d *DAL) GetStatus( Runners: domainRunners, IngressRoutes: slices.Map(ingressRoutes, func(in sql.GetAllIngressRoutesRow) IngressRouteEntry { return IngressRouteEntry{ - Deployment: in.DeploymentName, + Deployment: in.DeploymentKey, Module: in.Module, Verb: in.Verb, Method: in.Method, @@ -346,14 +346,14 @@ func (d *DAL) GetStatus( return Route{ Module: row.ModuleName.MustGet(), Runner: row.RunnerKey, - Deployment: row.DeploymentName, + Deployment: row.DeploymentKey.MustGet(), Endpoint: row.Endpoint, } }), }, nil } -func (d *DAL) GetRunnersForDeployment(ctx context.Context, deployment model.DeploymentName) ([]Runner, error) { +func (d *DAL) GetRunnersForDeployment(ctx context.Context, deployment model.DeploymentKey) ([]Runner, error) { runners := []Runner{} rows, err := d.db.GetRunnersForDeployment(ctx, deployment) if err != nil { @@ -410,21 +410,21 @@ type IngressRoutingEntry struct { // previously created artefacts with it. // // If an existing deployment with identical artefacts exists, it is returned. -func (d *DAL) CreateDeployment(ctx context.Context, language string, moduleSchema *schema.Module, artefacts []DeploymentArtefact, ingressRoutes []IngressRoutingEntry) (key model.DeploymentName, err error) { +func (d *DAL) CreateDeployment(ctx context.Context, language string, moduleSchema *schema.Module, artefacts []DeploymentArtefact, ingressRoutes []IngressRoutingEntry) (key model.DeploymentKey, err error) { logger := log.FromContext(ctx) // Start the transaction tx, err := d.db.Begin(ctx) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "could not start transaction", err) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "could not start transaction", err) } defer tx.CommitOrRollback(ctx, &err) existingDeployment, err := d.checkForExistingDeployments(ctx, tx, moduleSchema, artefacts) - var zero model.DeploymentName + var zero model.DeploymentKey if err != nil { - return model.DeploymentName{}, err + return model.DeploymentKey{}, err } else if existingDeployment != zero { logger.Tracef("Returning existing deployment %s", existingDeployment) return existingDeployment, nil @@ -436,65 +436,65 @@ func (d *DAL) CreateDeployment(ctx context.Context, language string, moduleSchem schemaBytes, err := proto.Marshal(moduleSchema.ToProto()) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "failed to marshal schema", err) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "failed to marshal schema", err) } // TODO(aat): "schema" containing language? _, err = tx.UpsertModule(ctx, language, moduleSchema.Name) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "failed to upsert module", translatePGError(err)) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "failed to upsert module", translatePGError(err)) } - deploymentName := model.NewDeploymentName(moduleSchema.Name) + deploymentKey := model.NewDeploymentKey(moduleSchema.Name) // Create the deployment - err = tx.CreateDeployment(ctx, moduleSchema.Name, schemaBytes, deploymentName) + err = tx.CreateDeployment(ctx, moduleSchema.Name, schemaBytes, deploymentKey) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "failed to create deployment", translatePGError(err)) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "failed to create deployment", translatePGError(err)) } uploadedDigests := slices.Map(artefacts, func(in DeploymentArtefact) []byte { return in.Digest[:] }) artefactDigests, err := tx.GetArtefactDigests(ctx, uploadedDigests) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "failed to get artefact digests", err) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "failed to get artefact digests", err) } if len(artefactDigests) != len(artefacts) { missingDigests := strings.Join(slices.Map(artefacts, func(in DeploymentArtefact) string { return in.Digest.String() }), ", ") - return model.DeploymentName{}, fmt.Errorf("missing %d artefacts: %s", len(artefacts)-len(artefactDigests), missingDigests) + return model.DeploymentKey{}, fmt.Errorf("missing %d artefacts: %s", len(artefacts)-len(artefactDigests), missingDigests) } // Associate the artefacts with the deployment for _, row := range artefactDigests { artefact := artefactsByDigest[sha256.FromBytes(row.Digest)] err = tx.AssociateArtefactWithDeployment(ctx, sql.AssociateArtefactWithDeploymentParams{ - Name: deploymentName, + Key: deploymentKey, ArtefactID: row.ID, Executable: artefact.Executable, Path: artefact.Path, }) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "failed to associate artefact with deployment", translatePGError(err)) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "failed to associate artefact with deployment", translatePGError(err)) } } for _, ingressRoute := range ingressRoutes { err = tx.CreateIngressRoute(ctx, sql.CreateIngressRouteParams{ - Name: deploymentName, + Key: deploymentKey, Method: ingressRoute.Method, Path: ingressRoute.Path, Module: moduleSchema.Name, Verb: ingressRoute.Verb, }) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "failed to create ingress route", translatePGError(err)) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "failed to create ingress route", translatePGError(err)) } } - return deploymentName, nil + return deploymentKey, nil } -func (d *DAL) GetDeployment(ctx context.Context, name model.DeploymentName) (*model.Deployment, error) { - deployment, err := d.db.GetDeployment(ctx, name) +func (d *DAL) GetDeployment(ctx context.Context, key model.DeploymentKey) (*model.Deployment, error) { + deployment, err := d.db.GetDeployment(ctx, key) if err != nil { return nil, translatePGError(err) } @@ -511,11 +511,11 @@ func (d *DAL) UpsertRunner(ctx context.Context, runner Runner) error { return fmt.Errorf("%s: %w", "failed to JSON encode runner labels", err) } deploymentID, err := d.db.UpsertRunner(ctx, sql.UpsertRunnerParams{ - Key: runner.Key, - Endpoint: runner.Endpoint, - State: sql.RunnerState(runner.State), - DeploymentName: runner.Deployment, - Labels: attrBytes, + Key: runner.Key, + Endpoint: runner.Endpoint, + State: sql.RunnerState(runner.State), + DeploymentKey: runner.Deployment, + Labels: attrBytes, }) if err != nil { return translatePGError(err) @@ -553,7 +553,7 @@ func (d *DAL) DeregisterRunner(ctx context.Context, key model.RunnerKey) error { // ReserveRunnerForDeployment reserves a runner for the given deployment. // // It returns a Reservation that must be committed or rolled back. -func (d *DAL) ReserveRunnerForDeployment(ctx context.Context, deployment model.DeploymentName, reservationTimeout time.Duration, labels model.Labels) (Reservation, error) { +func (d *DAL) ReserveRunnerForDeployment(ctx context.Context, deployment model.DeploymentKey, reservationTimeout time.Duration, labels model.Labels) (Reservation, error) { jsonLabels, err := json.Marshal(labels) if err != nil { return nil, fmt.Errorf("%s: %w", "failed to JSON encode labels", err) @@ -615,7 +615,7 @@ func (p *postgresClaim) Rollback(ctx context.Context) error { func (p *postgresClaim) Runner() Runner { return p.runner } // SetDeploymentReplicas activates the given deployment. -func (d *DAL) SetDeploymentReplicas(ctx context.Context, name model.DeploymentName, minReplicas int) error { +func (d *DAL) SetDeploymentReplicas(ctx context.Context, key model.DeploymentKey, minReplicas int) error { // Start the transaction tx, err := d.db.Begin(ctx) if err != nil { @@ -624,18 +624,18 @@ func (d *DAL) SetDeploymentReplicas(ctx context.Context, name model.DeploymentNa defer tx.CommitOrRollback(ctx, &err) - deployment, err := d.db.GetDeployment(ctx, name) + deployment, err := d.db.GetDeployment(ctx, key) if err != nil { return translatePGError(err) } - err = d.db.SetDeploymentDesiredReplicas(ctx, name, int32(minReplicas)) + err = d.db.SetDeploymentDesiredReplicas(ctx, key, int32(minReplicas)) if err != nil { return translatePGError(err) } err = tx.InsertDeploymentUpdatedEvent(ctx, sql.InsertDeploymentUpdatedEventParams{ - DeploymentName: name, + DeploymentKey: key, MinReplicas: int32(minReplicas), PrevMinReplicas: deployment.MinReplicas, }) @@ -647,7 +647,7 @@ func (d *DAL) SetDeploymentReplicas(ctx context.Context, name model.DeploymentNa } // ReplaceDeployment replaces an old deployment of a module with a new deployment. -func (d *DAL) ReplaceDeployment(ctx context.Context, newDeploymentName model.DeploymentName, minReplicas int) (err error) { +func (d *DAL) ReplaceDeployment(ctx context.Context, newDeploymentKey model.DeploymentKey, minReplicas int) (err error) { // Start the transaction tx, err := d.db.Begin(ctx) if err != nil { @@ -655,40 +655,40 @@ func (d *DAL) ReplaceDeployment(ctx context.Context, newDeploymentName model.Dep } defer tx.CommitOrRollback(ctx, &err) - newDeployment, err := tx.GetDeployment(ctx, newDeploymentName) + newDeployment, err := tx.GetDeployment(ctx, newDeploymentKey) if err != nil { return translatePGError(err) } - var replacedDeployment optional.Option[string] + var replacedDeploymentKey optional.Option[model.DeploymentKey] // If there's an existing deployment, set its desired replicas to 0 oldDeployment, err := tx.GetExistingDeploymentForModule(ctx, newDeployment.ModuleName) if err == nil { - count, err := tx.ReplaceDeployment(ctx, oldDeployment.Name.String(), newDeploymentName.String(), int32(minReplicas)) + count, err := tx.ReplaceDeployment(ctx, oldDeployment.Key, newDeploymentKey, int32(minReplicas)) if err != nil { return translatePGError(err) } if count == 1 { return fmt.Errorf("%s: %w", "deployment already exists", ErrConflict) } - replacedDeployment = optional.Some(oldDeployment.Name.String()) + replacedDeploymentKey = optional.Some(oldDeployment.Key) } else if !isNotFound(err) { return translatePGError(err) } else { // Set the desired replicas for the new deployment - err = tx.SetDeploymentDesiredReplicas(ctx, newDeploymentName, int32(minReplicas)) + err = tx.SetDeploymentDesiredReplicas(ctx, newDeploymentKey, int32(minReplicas)) if err != nil { return translatePGError(err) } } err = tx.InsertDeploymentCreatedEvent(ctx, sql.InsertDeploymentCreatedEventParams{ - DeploymentName: newDeploymentName, - Language: newDeployment.Language, - ModuleName: newDeployment.ModuleName, - MinReplicas: int32(minReplicas), - Replaced: replacedDeployment, + DeploymentKey: newDeploymentKey, + Language: newDeployment.Language, + ModuleName: newDeployment.ModuleName, + MinReplicas: int32(minReplicas), + Replaced: replacedDeploymentKey, }) if err != nil { return translatePGError(err) @@ -709,7 +709,7 @@ func (d *DAL) GetDeploymentsNeedingReconciliation(ctx context.Context) ([]Reconc } return slices.Map(counts, func(t sql.GetDeploymentsNeedingReconciliationRow) Reconciliation { return Reconciliation{ - Deployment: t.DeploymentName, + Deployment: t.DeploymentKey, Module: t.ModuleName, Language: t.Language, AssignedReplicas: int(t.AssignedRunnersCount), @@ -729,7 +729,7 @@ func (d *DAL) GetActiveDeployments(ctx context.Context) ([]Deployment, error) { } return slices.MapErr(rows, func(in sql.GetActiveDeploymentsRow) (Deployment, error) { return Deployment{ - Name: in.Deployment.Name, + Key: in.Deployment.Key, Module: in.ModuleName, Language: in.Language, MinReplicas: int(in.Deployment.MinReplicas), @@ -754,7 +754,7 @@ type ProcessRunner struct { } type Process struct { - Deployment model.DeploymentName + Deployment model.DeploymentKey MinReplicas int Labels model.Labels Runner optional.Option[ProcessRunner] @@ -782,10 +782,10 @@ func (d *DAL) GetProcessList(ctx context.Context) ([]Process, error) { } var labels model.Labels if err := json.Unmarshal(row.DeploymentLabels, &labels); err != nil { - return Process{}, fmt.Errorf("invalid labels JSON for deployment %s: %w", row.DeploymentName, err) + return Process{}, fmt.Errorf("invalid labels JSON for deployment %s: %w", row.DeploymentKey, err) } return Process{ - Deployment: row.DeploymentName, + Deployment: row.DeploymentKey, Labels: labels, MinReplicas: int(row.MinReplicas), Runner: runner, @@ -846,9 +846,10 @@ func (d *DAL) GetRoutingTable(ctx context.Context, modules []string) (map[string for _, route := range routes { // This is guaranteed to be non-nil by the query, but sqlc doesn't quite understand that. moduleName := route.ModuleName.MustGet() + deploymentKey := route.DeploymentKey.MustGet() out[moduleName] = append(out[moduleName], Route{ Module: moduleName, - Deployment: route.DeploymentName, + Deployment: deploymentKey, Runner: route.RunnerKey, Endpoint: route.Endpoint, }) @@ -887,14 +888,14 @@ func (d *DAL) InsertLogEvent(ctx context.Context, log *LogEvent) error { requestName = optional.Some(string(name)) } return translatePGError(d.db.InsertLogEvent(ctx, sql.InsertLogEventParams{ - DeploymentName: log.DeploymentName, - RequestName: requestName, - TimeStamp: log.Time, - Level: log.Level, - Attributes: attributes, - Message: log.Message, - Error: log.Error, - Stack: log.Stack, + DeploymentKey: log.DeploymentKey, + RequestName: requestName, + TimeStamp: log.Time, + Level: log.Level, + Attributes: attributes, + Message: log.Message, + Error: log.Error, + Stack: log.Stack, })) } @@ -902,7 +903,7 @@ func (d *DAL) loadDeployment(ctx context.Context, deployment sql.GetDeploymentRo out := &model.Deployment{ Module: deployment.ModuleName, Language: deployment.Language, - Name: deployment.Deployment.Name, + Key: deployment.Deployment.Key, Schema: deployment.Deployment.Schema, } artefacts, err := d.db.GetDeploymentArtefacts(ctx, deployment.Deployment.ID) @@ -937,7 +938,7 @@ func (d *DAL) GetIngressRoutes(ctx context.Context, method string) ([]IngressRou return slices.Map(routes, func(row sql.GetIngressRoutesRow) IngressRoute { return IngressRoute{ Runner: row.RunnerKey, - Deployment: row.DeploymentName, + Deployment: row.DeploymentKey, Endpoint: row.Endpoint, Path: row.Path, Module: row.Module, @@ -961,18 +962,18 @@ func (d *DAL) InsertCallEvent(ctx context.Context, call *CallEvent) error { requestName = optional.Some(string(rn)) } return translatePGError(d.db.InsertCallEvent(ctx, sql.InsertCallEventParams{ - DeploymentName: call.DeploymentName, - RequestName: requestName, - TimeStamp: call.Time, - SourceModule: sourceModule, - SourceVerb: sourceVerb, - DestModule: call.DestVerb.Module, - DestVerb: call.DestVerb.Name, - DurationMs: call.Duration.Milliseconds(), - Request: call.Request, - Response: call.Response, - Error: call.Error, - Stack: call.Stack, + DeploymentKey: call.DeploymentKey, + RequestName: requestName, + TimeStamp: call.Time, + SourceModule: sourceModule, + SourceVerb: sourceVerb, + DestModule: call.DestVerb.Module, + DestVerb: call.DestVerb.Name, + DurationMs: call.Duration.Milliseconds(), + Request: call.Request, + Response: call.Response, + Error: call.Error, + Stack: call.Stack, })) } @@ -987,10 +988,10 @@ func (d *DAL) GetActiveRunners(ctx context.Context) ([]Runner, error) { } // Check if a deployment exists that exactly matches the given artefacts and schema. -func (*DAL) checkForExistingDeployments(ctx context.Context, tx *sql.Tx, moduleSchema *schema.Module, artefacts []DeploymentArtefact) (model.DeploymentName, error) { +func (*DAL) checkForExistingDeployments(ctx context.Context, tx *sql.Tx, moduleSchema *schema.Module, artefacts []DeploymentArtefact) (model.DeploymentKey, error) { schemaBytes, err := schema.ModuleToBytes(moduleSchema) if err != nil { - return model.DeploymentName{}, fmt.Errorf("failed to marshal schema: %w", err) + return model.DeploymentKey{}, fmt.Errorf("failed to marshal schema: %w", err) } existing, err := tx.GetDeploymentsWithArtefacts(ctx, sha256esToBytes(slices.Map(artefacts, func(in DeploymentArtefact) sha256.SHA256 { return in.Digest })), @@ -998,12 +999,12 @@ func (*DAL) checkForExistingDeployments(ctx context.Context, tx *sql.Tx, moduleS int64(len(artefacts)), ) if err != nil { - return model.DeploymentName{}, fmt.Errorf("%s: %w", "couldn't check for existing deployment", err) + return model.DeploymentKey{}, fmt.Errorf("%s: %w", "couldn't check for existing deployment", err) } if len(existing) > 0 { - return existing[0].DeploymentName, nil + return existing[0].DeploymentKey, nil } - return model.DeploymentName{}, nil + return model.DeploymentKey{}, nil } func sha256esToBytes(digests []sha256.SHA256) [][]byte { diff --git a/backend/controller/dal/dal_test.go b/backend/controller/dal/dal_test.go index 1853c52e7f..4b37222e55 100644 --- a/backend/controller/dal/dal_test.go +++ b/backend/controller/dal/dal_test.go @@ -42,9 +42,9 @@ func TestDAL(t *testing.T) { }) module := &schema.Module{Name: "test"} - var deploymentName model.DeploymentName + var deploymentKey model.DeploymentKey t.Run("CreateDeployment", func(t *testing.T) { - deploymentName, err = dal.CreateDeployment(ctx, "go", module, []DeploymentArtefact{{ + deploymentKey, err = dal.CreateDeployment(ctx, "go", module, []DeploymentArtefact{{ Digest: testSha, Executable: true, Path: "dir/filename", @@ -56,7 +56,7 @@ func TestDAL(t *testing.T) { Module: "test", Language: "go", Schema: module, - Name: deploymentName, + Key: deploymentKey, Artefacts: []*model.Artefact{ {Path: "dir/filename", Executable: true, @@ -67,7 +67,7 @@ func TestDAL(t *testing.T) { expectedContent := artefactContent(t, deployment.Artefacts) t.Run("GetDeployment", func(t *testing.T) { - actual, err := dal.GetDeployment(ctx, deploymentName) + actual, err := dal.GetDeployment(ctx, deploymentKey) assert.NoError(t, err) actualContent := artefactContent(t, actual.Artefacts) assert.Equal(t, expectedContent, actualContent) @@ -75,7 +75,7 @@ func TestDAL(t *testing.T) { }) t.Run("GetMissingDeployment", func(t *testing.T) { - _, err := dal.GetDeployment(ctx, model.NewDeploymentName("test")) + _, err := dal.GetDeployment(ctx, model.NewDeploymentKey("test")) assert.IsError(t, err, ErrNotFound) }) @@ -127,7 +127,7 @@ func TestDAL(t *testing.T) { Labels: labels, Endpoint: "http://localhost:8080", State: RunnerStateReserved, - Deployment: optional.Some(deploymentName), + Deployment: optional.Some(deploymentKey), } t.Run("GetDeploymentsNeedingReconciliation", func(t *testing.T) { @@ -137,7 +137,7 @@ func TestDAL(t *testing.T) { }) t.Run("SetDeploymentReplicas", func(t *testing.T) { - err := dal.SetDeploymentReplicas(ctx, deploymentName, 1) + err := dal.SetDeploymentReplicas(ctx, deploymentKey, 1) assert.NoError(t, err) }) @@ -145,7 +145,7 @@ func TestDAL(t *testing.T) { reconcile, err := dal.GetDeploymentsNeedingReconciliation(ctx) assert.NoError(t, err) assert.Equal(t, []Reconciliation{{ - Deployment: deploymentName, + Deployment: deploymentKey, Module: deployment.Module, Language: deployment.Language, AssignedReplicas: 0, @@ -154,14 +154,14 @@ func TestDAL(t *testing.T) { }) t.Run("ReserveRunnerForInvalidDeployment", func(t *testing.T) { - _, err := dal.ReserveRunnerForDeployment(ctx, model.NewDeploymentName("test"), time.Second, labels) + _, err := dal.ReserveRunnerForDeployment(ctx, model.NewDeploymentKey("test"), time.Second, labels) assert.Error(t, err) assert.IsError(t, err, ErrNotFound) assert.EqualError(t, err, "deployment: not found") }) t.Run("ReserveRunnerForDeployment", func(t *testing.T) { - claim, err := dal.ReserveRunnerForDeployment(ctx, deploymentName, time.Millisecond*100, labels) + claim, err := dal.ReserveRunnerForDeployment(ctx, deploymentKey, time.Millisecond*100, labels) assert.NoError(t, err) err = claim.Commit(context.Background()) assert.NoError(t, err) @@ -179,7 +179,7 @@ func TestDAL(t *testing.T) { }) t.Run("ReserveRunnerForDeploymentFailsOnInvalidDeployment", func(t *testing.T) { - _, err = dal.ReserveRunnerForDeployment(ctx, model.NewDeploymentName("test"), time.Second, labels) + _, err = dal.ReserveRunnerForDeployment(ctx, model.NewDeploymentKey("test"), time.Second, labels) assert.IsError(t, err, ErrNotFound) }) @@ -189,7 +189,7 @@ func TestDAL(t *testing.T) { Labels: labels, Endpoint: "http://localhost:8080", State: RunnerStateAssigned, - Deployment: optional.Some(deploymentName), + Deployment: optional.Some(deploymentKey), }) assert.NoError(t, err) }) @@ -201,14 +201,14 @@ func TestDAL(t *testing.T) { }) t.Run("GetRunnersForDeployment", func(t *testing.T) { - runners, err := dal.GetRunnersForDeployment(ctx, deploymentName) + runners, err := dal.GetRunnersForDeployment(ctx, deploymentKey) assert.NoError(t, err) assert.Equal(t, []Runner{{ Key: runnerID, Labels: labels, Endpoint: "http://localhost:8080", State: RunnerStateAssigned, - Deployment: optional.Some(deploymentName), + Deployment: optional.Some(deploymentKey), }}, runners) }) @@ -219,12 +219,12 @@ func TestDAL(t *testing.T) { }) callEvent := &CallEvent{ - Time: time.Now().Round(time.Millisecond), - DeploymentName: deploymentName, - RequestName: optional.Some(requestName), - Request: []byte("{}"), - Response: []byte(`{"time": "now"}`), - DestVerb: schema.Ref{Module: "time", Name: "time"}, + Time: time.Now().Round(time.Millisecond), + DeploymentKey: deploymentKey, + RequestName: optional.Some(requestName), + Request: []byte("{}"), + Response: []byte(`{"time": "now"}`), + DestVerb: schema.Ref{Module: "time", Name: "time"}, } t.Run("InsertCallEvent", func(t *testing.T) { err = dal.InsertCallEvent(ctx, callEvent) @@ -232,12 +232,12 @@ func TestDAL(t *testing.T) { }) logEvent := &LogEvent{ - Time: time.Now().Round(time.Millisecond), - DeploymentName: deploymentName, - RequestName: optional.Some(requestName), - Level: int32(log.Warn), - Attributes: map[string]string{"attr": "value"}, - Message: "A log entry", + Time: time.Now().Round(time.Millisecond), + DeploymentKey: deploymentKey, + RequestName: optional.Some(requestName), + Level: int32(log.Warn), + Attributes: map[string]string{"attr": "value"}, + Message: "A log entry", } t.Run("InsertLogEntry", func(t *testing.T) { err = dal.InsertLogEvent(ctx, logEvent) @@ -245,8 +245,8 @@ func TestDAL(t *testing.T) { }) expectedDeploymentUpdatedEvent := &DeploymentUpdatedEvent{ - DeploymentName: deploymentName, - MinReplicas: 1, + DeploymentKey: deploymentKey, + MinReplicas: 1, } t.Run("QueryEvents", func(t *testing.T) { @@ -263,7 +263,7 @@ func TestDAL(t *testing.T) { }) t.Run("ByDeployment", func(t *testing.T) { - events, err := dal.QueryEvents(ctx, 1000, FilterDeployments(deploymentName)) + events, err := dal.QueryEvents(ctx, 1000, FilterDeployments(deploymentKey)) assert.NoError(t, err) assertEventsEqual(t, []Event{expectedDeploymentUpdatedEvent, callEvent, logEvent}, events) }) @@ -287,7 +287,7 @@ func TestDAL(t *testing.T) { assert.Equal(t, []Route{{ Module: "test", Runner: expectedRunner.Key, - Deployment: deploymentName, + Deployment: deploymentKey, Endpoint: expectedRunner.Endpoint, }}, routes[deployment.Module]) }) @@ -298,7 +298,7 @@ func TestDAL(t *testing.T) { Labels: labels, Endpoint: "http://localhost:8080", State: RunnerStateAssigned, - Deployment: optional.Some(model.NewDeploymentName("test")), + Deployment: optional.Some(model.NewDeploymentKey("test")), }) assert.Error(t, err) assert.IsError(t, err, ErrNotFound) @@ -315,7 +315,7 @@ func TestDAL(t *testing.T) { }) t.Run("ReserveRunnerForDeploymentAfterRelease", func(t *testing.T) { - claim, err := dal.ReserveRunnerForDeployment(ctx, deploymentName, time.Second, labels) + claim, err := dal.ReserveRunnerForDeployment(ctx, deploymentKey, time.Second, labels) assert.NoError(t, err) err = claim.Commit(context.Background()) assert.NoError(t, err) diff --git a/backend/controller/dal/events.go b/backend/controller/dal/events.go index b8ec66dbe3..8f818eb94f 100644 --- a/backend/controller/dal/events.go +++ b/backend/controller/dal/events.go @@ -35,32 +35,32 @@ type Event interface { } type LogEvent struct { - ID int64 - DeploymentName model.DeploymentName - RequestName optional.Option[model.RequestName] - Time time.Time - Level int32 - Attributes map[string]string - Message string - Error optional.Option[string] - Stack optional.Option[string] + ID int64 + DeploymentKey model.DeploymentKey + RequestName optional.Option[model.RequestName] + Time time.Time + Level int32 + Attributes map[string]string + Message string + Error optional.Option[string] + Stack optional.Option[string] } func (e *LogEvent) GetID() int64 { return e.ID } func (e *LogEvent) event() {} type CallEvent struct { - ID int64 - DeploymentName model.DeploymentName - RequestName optional.Option[model.RequestName] - Time time.Time - SourceVerb optional.Option[schema.Ref] - DestVerb schema.Ref - Duration time.Duration - Request []byte - Response []byte - Error optional.Option[string] - Stack optional.Option[string] + ID int64 + DeploymentKey model.DeploymentKey + RequestName optional.Option[model.RequestName] + Time time.Time + SourceVerb optional.Option[schema.Ref] + DestVerb schema.Ref + Duration time.Duration + Request []byte + Response []byte + Error optional.Option[string] + Stack optional.Option[string] } func (e *CallEvent) GetID() int64 { return e.ID } @@ -68,12 +68,12 @@ func (e *CallEvent) event() {} type DeploymentCreatedEvent struct { ID int64 - DeploymentName model.DeploymentName + DeploymentKey model.DeploymentKey Time time.Time Language string ModuleName string MinReplicas int - ReplacedDeployment optional.Option[model.DeploymentName] + ReplacedDeployment optional.Option[model.DeploymentKey] } func (e *DeploymentCreatedEvent) GetID() int64 { return e.ID } @@ -81,7 +81,7 @@ func (e *DeploymentCreatedEvent) event() {} type DeploymentUpdatedEvent struct { ID int64 - DeploymentName model.DeploymentName + DeploymentKey model.DeploymentKey Time time.Time MinReplicas int PrevMinReplicas int @@ -100,7 +100,7 @@ type eventFilter struct { level *log.Level calls []*eventFilterCall types []EventType - deployments []model.DeploymentName + deployments []model.DeploymentKey requests []string newerThan time.Time olderThan time.Time @@ -126,9 +126,9 @@ func FilterCall(sourceModule optional.Option[string], destModule string, destVer } } -func FilterDeployments(deploymentNames ...model.DeploymentName) EventFilter { +func FilterDeployments(deploymentKeys ...model.DeploymentKey) EventFilter { return func(query *eventFilter) { - query.deployments = append(query.deployments, deploymentNames...) + query.deployments = append(query.deployments, deploymentKeys...) } } @@ -188,8 +188,8 @@ type eventLogJSON struct { } type eventDeploymentCreatedJSON struct { - MinReplicas int `json:"min_replicas"` - ReplacedDeployment optional.Option[model.DeploymentName] `json:"replaced,omitempty"` + MinReplicas int `json:"min_replicas"` + ReplacedDeployment optional.Option[model.DeploymentKey] `json:"replaced,omitempty"` } type eventDeploymentUpdatedJSON struct { @@ -199,8 +199,8 @@ type eventDeploymentUpdatedJSON struct { type eventRow struct { sql.Event - DeploymentName model.DeploymentName - RequestName optional.Option[model.RequestName] + DeploymentKey model.DeploymentKey + RequestName optional.Option[model.RequestName] } func (d *DAL) QueryEvents(ctx context.Context, limit int, filters ...EventFilter) ([]Event, error) { @@ -247,15 +247,15 @@ func (d *DAL) QueryEvents(ctx context.Context, limit int, filters ...EventFilter if filter.idLowerThan != 0 { q += fmt.Sprintf(" AND e.id <= $%d::BIGINT", param(filter.idLowerThan)) } - deploymentNames := map[int64]model.DeploymentName{} + deploymentKeys := map[int64]model.DeploymentKey{} // TODO: We should probably make it mandatory to provide at least one deployment. - deploymentQuery := `SELECT id, name FROM deployments` + deploymentQuery := `SELECT id, key FROM deployments` deploymentArgs := []any{} if len(filter.deployments) != 0 { // Unfortunately, if we use a join here, PG will do a sequential scan on // events and deployments, making a 7ms query into a 700ms query. // https://www.pgexplain.dev/plan/ecd44488-6060-4ad1-a9b4-49d092c3de81 - deploymentQuery += ` WHERE name = ANY($1::TEXT[])` + deploymentQuery += ` WHERE key = ANY($1::TEXT[])` deploymentArgs = append(deploymentArgs, filter.deployments) } rows, err := d.db.Conn().Query(ctx, deploymentQuery, deploymentArgs...) @@ -265,14 +265,13 @@ func (d *DAL) QueryEvents(ctx context.Context, limit int, filters ...EventFilter deploymentIDs := []int64{} for rows.Next() { var id int64 - var name string - if err := rows.Scan(&id, &name); err != nil { + var key model.DeploymentKey + if err := rows.Scan(&id, &key); err != nil { return nil, err } - deploymentName, _ := model.ParseDeploymentName(name) deploymentIDs = append(deploymentIDs, id) - deploymentNames[id] = deploymentName + deploymentKeys[id] = key } q += fmt.Sprintf(` AND e.deployment_id = ANY($%d::BIGINT[])`, param(deploymentIDs)) @@ -320,14 +319,14 @@ func (d *DAL) QueryEvents(ctx context.Context, limit int, filters ...EventFilter } defer rows.Close() - events, err := transformRowsToEvents(deploymentNames, rows) + events, err := transformRowsToEvents(deploymentKeys, rows) if err != nil { return nil, err } return events, nil } -func transformRowsToEvents(deploymentNames map[int64]model.DeploymentName, rows pgx.Rows) ([]Event, error) { +func transformRowsToEvents(deploymentKeys map[int64]model.DeploymentKey, rows pgx.Rows) ([]Event, error) { var out []Event for rows.Next() { row := eventRow{} @@ -341,7 +340,7 @@ func transformRowsToEvents(deploymentNames map[int64]model.DeploymentName, rows return nil, err } - row.DeploymentName = deploymentNames[deploymentID] + row.DeploymentKey = deploymentKeys[deploymentID] var requestName optional.Option[model.RequestName] if key, ok := row.RequestName.Get(); ok { @@ -358,15 +357,15 @@ func transformRowsToEvents(deploymentNames map[int64]model.DeploymentName, rows return nil, fmt.Errorf("invalid log level: %q: %w", row.CustomKey1.MustGet(), err) } out = append(out, &LogEvent{ - ID: row.ID, - DeploymentName: row.DeploymentName, - RequestName: requestName, - Time: row.TimeStamp, - Level: int32(level), - Attributes: jsonPayload.Attributes, - Message: jsonPayload.Message, - Error: jsonPayload.Error, - Stack: jsonPayload.Stack, + ID: row.ID, + DeploymentKey: row.DeploymentKey, + RequestName: requestName, + Time: row.TimeStamp, + Level: int32(level), + Attributes: jsonPayload.Attributes, + Message: jsonPayload.Message, + Error: jsonPayload.Error, + Stack: jsonPayload.Stack, }) case sql.EventTypeCall: @@ -381,17 +380,17 @@ func transformRowsToEvents(deploymentNames map[int64]model.DeploymentName, rows sourceVerb = optional.Some(schema.Ref{Module: sourceModule, Name: sourceName}) } out = append(out, &CallEvent{ - ID: row.ID, - DeploymentName: row.DeploymentName, - RequestName: requestName, - Time: row.TimeStamp, - SourceVerb: sourceVerb, - DestVerb: schema.Ref{Module: row.CustomKey3.MustGet(), Name: row.CustomKey4.MustGet()}, - Duration: time.Duration(jsonPayload.DurationMS) * time.Millisecond, - Request: jsonPayload.Request, - Response: jsonPayload.Response, - Error: jsonPayload.Error, - Stack: jsonPayload.Stack, + ID: row.ID, + DeploymentKey: row.DeploymentKey, + RequestName: requestName, + Time: row.TimeStamp, + SourceVerb: sourceVerb, + DestVerb: schema.Ref{Module: row.CustomKey3.MustGet(), Name: row.CustomKey4.MustGet()}, + Duration: time.Duration(jsonPayload.DurationMS) * time.Millisecond, + Request: jsonPayload.Request, + Response: jsonPayload.Response, + Error: jsonPayload.Error, + Stack: jsonPayload.Stack, }) case sql.EventTypeDeploymentCreated: @@ -401,7 +400,7 @@ func transformRowsToEvents(deploymentNames map[int64]model.DeploymentName, rows } out = append(out, &DeploymentCreatedEvent{ ID: row.ID, - DeploymentName: row.DeploymentName, + DeploymentKey: row.DeploymentKey, Time: row.TimeStamp, Language: row.CustomKey1.MustGet(), ModuleName: row.CustomKey2.MustGet(), @@ -416,7 +415,7 @@ func transformRowsToEvents(deploymentNames map[int64]model.DeploymentName, rows } out = append(out, &DeploymentUpdatedEvent{ ID: row.ID, - DeploymentName: row.DeploymentName, + DeploymentKey: row.DeploymentKey, Time: row.TimeStamp, MinReplicas: jsonPayload.MinReplicas, PrevMinReplicas: jsonPayload.PrevMinReplicas, diff --git a/backend/controller/dal/notify.go b/backend/controller/dal/notify.go index dff0d759de..c604e99879 100644 --- a/backend/controller/dal/notify.go +++ b/backend/controller/dal/notify.go @@ -38,7 +38,7 @@ func (n Notification[T, Key, KeyP]) String() string { } // DeploymentNotification is a notification from the database when a deployment changes. -type DeploymentNotification = Notification[Deployment, model.DeploymentName, *model.DeploymentName] +type DeploymentNotification = Notification[Deployment, model.DeploymentKey, *model.DeploymentKey] // See JSON structure in SQL schema type event struct { @@ -94,19 +94,19 @@ func (d *DAL) runListener(ctx context.Context, conn *pgx.Conn) { func (d *DAL) publishNotification(ctx context.Context, notification event, logger *log.Logger) error { switch notification.Table { case "deployments": - deployment, err := decodeNotification(notification, func(key model.DeploymentName) (Deployment, optional.Option[model.DeploymentName], error) { + deployment, err := decodeNotification(notification, func(key model.DeploymentKey) (Deployment, optional.Option[model.DeploymentKey], error) { row, err := d.db.GetDeployment(ctx, key) if err != nil { - return Deployment{}, optional.None[model.DeploymentName](), translatePGError(err) + return Deployment{}, optional.None[model.DeploymentKey](), translatePGError(err) } return Deployment{ CreatedAt: row.Deployment.CreatedAt, - Name: row.Deployment.Name, + Key: row.Deployment.Key, Module: row.ModuleName, Schema: row.Deployment.Schema, MinReplicas: int(row.Deployment.MinReplicas), Language: row.Language, - }, optional.None[model.DeploymentName](), nil + }, optional.None[model.DeploymentKey](), nil }) if err != nil { return err diff --git a/backend/controller/deployment_logs.go b/backend/controller/deployment_logs.go index 8a246a943f..a5e4043faf 100644 --- a/backend/controller/deployment_logs.go +++ b/backend/controller/deployment_logs.go @@ -46,13 +46,13 @@ func (d *deploymentLogsSink) processLogs(ctx context.Context) { for { select { case entry := <-d.logQueue: - var deployment model.DeploymentName + var deployment model.DeploymentKey depStr, ok := entry.Attributes["deployment"] if !ok { continue } - dep, err := model.ParseDeploymentName(depStr) + dep, err := model.ParseDeploymentKey(depStr) if err != nil { continue } @@ -72,13 +72,13 @@ func (d *deploymentLogsSink) processLogs(ctx context.Context) { } err = d.dal.InsertLogEvent(ctx, &dal.LogEvent{ - RequestName: request, - DeploymentName: deployment, - Time: entry.Time, - Level: int32(entry.Level.Severity()), - Attributes: entry.Attributes, - Message: entry.Message, - Error: errorStr, + RequestName: request, + DeploymentKey: deployment, + Time: entry.Time, + Level: int32(entry.Level.Severity()), + Attributes: entry.Attributes, + Message: entry.Message, + Error: errorStr, }) if err != nil { fmt.Printf("failed to insert log entry: %v :: error: %v\n", entry, err) diff --git a/backend/controller/observability.go b/backend/controller/observability.go index 74197412c3..6d25dd82cf 100644 --- a/backend/controller/observability.go +++ b/backend/controller/observability.go @@ -14,14 +14,14 @@ import ( ) type Call struct { - deploymentName model.DeploymentName - requestName model.RequestName - startTime time.Time - destVerb *schema.Ref - callers []*schema.Ref - request *ftlv1.CallRequest - response optional.Option[*ftlv1.CallResponse] - callError optional.Option[error] + deploymentKey model.DeploymentKey + requestName model.RequestName + startTime time.Time + destVerb *schema.Ref + callers []*schema.Ref + request *ftlv1.CallRequest + response optional.Option[*ftlv1.CallResponse] + callError optional.Option[error] } func (s *Service) recordCall(ctx context.Context, call *Call) { @@ -46,16 +46,16 @@ func (s *Service) recordCall(ctx context.Context, call *Call) { } err := s.dal.InsertCallEvent(ctx, &dal.CallEvent{ - Time: call.startTime, - DeploymentName: call.deploymentName, - RequestName: optional.Some(call.requestName), - Duration: time.Since(call.startTime), - SourceVerb: sourceVerb, - DestVerb: *call.destVerb, - Request: call.request.GetBody(), - Response: responseBody, - Error: errorStr, - Stack: stack, + Time: call.startTime, + DeploymentKey: call.deploymentKey, + RequestName: optional.Some(call.requestName), + Duration: time.Since(call.startTime), + SourceVerb: sourceVerb, + DestVerb: *call.destVerb, + Request: call.request.GetBody(), + Response: responseBody, + Error: errorStr, + Stack: stack, }) if err != nil { logger.Errorf(err, "failed to record call") diff --git a/backend/controller/sql/models.go b/backend/controller/sql/models.go index b9ab06e1de..c9531cec7e 100644 --- a/backend/controller/sql/models.go +++ b/backend/controller/sql/models.go @@ -208,7 +208,7 @@ type Deployment struct { ID int64 CreatedAt time.Time ModuleID int64 - Name model.DeploymentName + Key model.DeploymentKey Schema *schema.Module Labels []byte MinReplicas int32 diff --git a/backend/controller/sql/querier.go b/backend/controller/sql/querier.go index a0e940e6f1..bdb9dd1dd9 100644 --- a/backend/controller/sql/querier.go +++ b/backend/controller/sql/querier.go @@ -16,7 +16,7 @@ type Querier interface { AssociateArtefactWithDeployment(ctx context.Context, arg AssociateArtefactWithDeploymentParams) error // Create a new artefact and return the artefact ID. CreateArtefact(ctx context.Context, digest []byte, content []byte) (int64, error) - CreateDeployment(ctx context.Context, moduleName string, schema []byte, name model.DeploymentName) error + CreateDeployment(ctx context.Context, moduleName string, schema []byte, key model.DeploymentKey) error CreateIngressRequest(ctx context.Context, origin Origin, name string, sourceAddr string) error CreateIngressRoute(ctx context.Context, arg CreateIngressRouteParams) error DeregisterRunner(ctx context.Context, key model.RunnerKey) (int64, error) @@ -29,7 +29,7 @@ type Querier interface { // Return the digests that exist in the database. GetArtefactDigests(ctx context.Context, digests [][]byte) ([]GetArtefactDigestsRow, error) GetControllers(ctx context.Context, all bool) ([]Controller, error) - GetDeployment(ctx context.Context, name model.DeploymentName) (GetDeploymentRow, error) + GetDeployment(ctx context.Context, key model.DeploymentKey) (GetDeploymentRow, error) // Get all artefacts matching the given digests. GetDeploymentArtefacts(ctx context.Context, deploymentID int64) ([]GetDeploymentArtefactsRow, error) GetDeploymentsByID(ctx context.Context, ids []int64) ([]Deployment, error) @@ -48,7 +48,7 @@ type Querier interface { GetRoutingTable(ctx context.Context, modules []string) ([]GetRoutingTableRow, error) GetRunner(ctx context.Context, key model.RunnerKey) (GetRunnerRow, error) GetRunnerState(ctx context.Context, key model.RunnerKey) (RunnerState, error) - GetRunnersForDeployment(ctx context.Context, name model.DeploymentName) ([]GetRunnersForDeploymentRow, error) + GetRunnersForDeployment(ctx context.Context, key model.DeploymentKey) ([]GetRunnersForDeploymentRow, error) InsertCallEvent(ctx context.Context, arg InsertCallEventParams) error InsertDeploymentCreatedEvent(ctx context.Context, arg InsertDeploymentCreatedEventParams) error InsertDeploymentUpdatedEvent(ctx context.Context, arg InsertDeploymentUpdatedEventParams) error @@ -57,14 +57,14 @@ type Querier interface { // Mark any controller entries that haven't been updated recently as dead. KillStaleControllers(ctx context.Context, timeout time.Duration) (int64, error) KillStaleRunners(ctx context.Context, timeout time.Duration) (int64, error) - ReplaceDeployment(ctx context.Context, oldDeployment string, newDeployment string, minReplicas int32) (int64, error) + ReplaceDeployment(ctx context.Context, oldDeployment model.DeploymentKey, newDeployment model.DeploymentKey, minReplicas int32) (int64, error) // Find an idle runner and reserve it for the given deployment. - ReserveRunner(ctx context.Context, reservationTimeout time.Time, deploymentName model.DeploymentName, labels []byte) (Runner, error) - SetDeploymentDesiredReplicas(ctx context.Context, name model.DeploymentName, minReplicas int32) error + ReserveRunner(ctx context.Context, reservationTimeout time.Time, deploymentKey model.DeploymentKey, labels []byte) (Runner, error) + SetDeploymentDesiredReplicas(ctx context.Context, key model.DeploymentKey, minReplicas int32) error UpsertController(ctx context.Context, key model.ControllerKey, endpoint string) (int64, error) UpsertModule(ctx context.Context, language string, name string) (int64, error) // Upsert a runner and return the deployment ID that it is assigned to, if any. - // If the deployment name is null, then deployment_rel.id will be null, + // If the deployment key is null, then deployment_rel.id will be null, // otherwise we try to retrieve the deployments.id using the key. If // there is no corresponding deployment, then the deployment ID is -1 // and the parent statement will fail due to a foreign key constraint. diff --git a/backend/controller/sql/queries.sql b/backend/controller/sql/queries.sql index 98adc503d2..db773f63ab 100644 --- a/backend/controller/sql/queries.sql +++ b/backend/controller/sql/queries.sql @@ -15,8 +15,8 @@ FROM modules WHERE id = ANY (@ids::BIGINT[]); -- name: CreateDeployment :exec -INSERT INTO deployments (module_id, "schema", "name") -VALUES ((SELECT id FROM modules WHERE name = @module_name::TEXT LIMIT 1), @schema::BYTEA, sqlc.arg('name')); +INSERT INTO deployments (module_id, "schema", "key") +VALUES ((SELECT id FROM modules WHERE name = @module_name::TEXT LIMIT 1), @schema::BYTEA, sqlc.arg('key')::deployment_key); -- name: GetArtefactDigests :many -- Return the digests that exist in the database. @@ -39,16 +39,16 @@ RETURNING id; -- name: AssociateArtefactWithDeployment :exec INSERT INTO deployment_artefacts (deployment_id, artefact_id, executable, path) -VALUES ((SELECT id FROM deployments WHERE name = $1), $2, $3, $4); +VALUES ((SELECT id FROM deployments WHERE key = sqlc.arg('key')::deployment_key), $2, $3, $4); -- name: ReplaceDeployment :one WITH update_container AS ( UPDATE deployments AS d SET min_replicas = update_deployments.min_replicas - FROM (VALUES (sqlc.arg('old_deployment')::TEXT, 0), - (sqlc.arg('new_deployment')::TEXT, sqlc.arg('min_replicas')::INT)) - AS update_deployments(name, min_replicas) - WHERE d.name = update_deployments.name + FROM (VALUES (sqlc.arg('old_deployment')::deployment_key, 0), + (sqlc.arg('new_deployment')::deployment_key, sqlc.arg('min_replicas')::INT)) + AS update_deployments(key, min_replicas) + WHERE d.key = update_deployments.key RETURNING 1) SELECT COUNT(*) FROM update_container; @@ -57,11 +57,11 @@ FROM update_container; SELECT sqlc.embed(d), m.language, m.name AS module_name, d.min_replicas FROM deployments d INNER JOIN modules m ON m.id = d.module_id -WHERE d.name = $1; +WHERE d.key = sqlc.arg('key')::deployment_key; -- name: GetDeploymentsWithArtefacts :many -- Get all deployments that have artefacts matching the given digests. -SELECT d.id, d.created_at, d.name as deployment_name, d.schema, m.name AS module_name +SELECT d.id, d.created_at, d.key as deployment_key, d.schema, m.name AS module_name FROM deployments d INNER JOIN modules m ON d.module_id = m.id WHERE EXISTS (SELECT 1 @@ -81,16 +81,16 @@ WHERE a.id = @id; -- name: UpsertRunner :one -- Upsert a runner and return the deployment ID that it is assigned to, if any. WITH deployment_rel AS ( --- If the deployment name is null, then deployment_rel.id will be null, +-- If the deployment key is null, then deployment_rel.id will be null, -- otherwise we try to retrieve the deployments.id using the key. If -- there is no corresponding deployment, then the deployment ID is -1 -- and the parent statement will fail due to a foreign key constraint. SELECT CASE - WHEN sqlc.narg('deployment_name')::deployment_name IS NULL + WHEN sqlc.narg('deployment_key')::deployment_key IS NULL THEN NULL ELSE COALESCE((SELECT id FROM deployments d - WHERE d.name = sqlc.narg('deployment_name')::deployment_name + WHERE d.key = sqlc.narg('deployment_key')::deployment_key LIMIT 1), -1) END AS id) INSERT INTO runners (key, endpoint, state, labels, deployment_id, last_seen) @@ -136,7 +136,7 @@ SELECT DISTINCT ON (r.key) r.key AS runner_key r.module_name, COALESCE(CASE WHEN r.deployment_id IS NOT NULL - THEN d.name END, NULL) AS deployment_name + THEN d.key END, NULL) AS deployment_key FROM runners r LEFT JOIN deployments d on d.id = r.deployment_id WHERE sqlc.arg('all')::bool = true @@ -149,14 +149,14 @@ FROM deployments d INNER JOIN modules m on d.module_id = m.id WHERE sqlc.arg('all')::bool = true OR min_replicas > 0 -ORDER BY d.name; +ORDER BY d.key; -- name: GetActiveDeploymentSchemas :many -SELECT name, schema FROM deployments WHERE min_replicas > 0; +SELECT key, schema FROM deployments WHERE min_replicas > 0; -- name: GetProcessList :many SELECT d.min_replicas, - d.name AS deployment_name, + d.key AS deployment_key, d.labels deployment_labels, r.key AS runner_key, r.endpoint, @@ -164,7 +164,7 @@ SELECT d.min_replicas, FROM deployments d LEFT JOIN runners r on d.id = r.deployment_id AND r.state != 'dead' WHERE d.min_replicas > 0 -ORDER BY d.name; +ORDER BY d.key; -- name: GetIdleRunners :many SELECT * @@ -176,7 +176,7 @@ LIMIT sqlc.arg('limit'); -- name: SetDeploymentDesiredReplicas :exec UPDATE deployments SET min_replicas = $2 -WHERE name = $1 +WHERE key = sqlc.arg('key')::deployment_key RETURNING 1; -- name: GetExistingDeploymentForModule :one @@ -189,7 +189,7 @@ LIMIT 1; -- name: GetDeploymentsNeedingReconciliation :many -- Get deployments that have a mismatch between the number of assigned and required replicas. -SELECT d.name AS deployment_name, +SELECT d.key AS deployment_key, m.name AS module_name, m.language AS language, COUNT(r.id) AS assigned_runners_count, @@ -197,7 +197,7 @@ SELECT d.name AS deployment_name, FROM deployments d LEFT JOIN runners r ON d.id = r.deployment_id AND r.state <> 'dead' JOIN modules m ON d.module_id = m.id -GROUP BY d.name, d.min_replicas, m.name, m.language +GROUP BY d.key, d.min_replicas, m.name, m.language HAVING COUNT(r.id) <> d.min_replicas; @@ -210,7 +210,7 @@ SET state = 'reserved', -- and the update will fail due to a FK constraint. deployment_id = COALESCE((SELECT id FROM deployments d - WHERE d.name = sqlc.arg('deployment_name')::deployment_name + WHERE d.key = sqlc.arg('deployment_key')::deployment_key LIMIT 1), -1) WHERE id = (SELECT id FROM runners r @@ -233,13 +233,13 @@ SELECT DISTINCT ON (r.key) r.key AS runner_key r.module_name, COALESCE(CASE WHEN r.deployment_id IS NOT NULL - THEN d.name END, NULL) AS deployment_name + THEN d.key END, NULL) AS deployment_key FROM runners r LEFT JOIN deployments d on d.id = r.deployment_id OR r.deployment_id IS NULL WHERE r.key = sqlc.arg('key')::runner_key; -- name: GetRoutingTable :many -SELECT endpoint, r.key AS runner_key, r.module_name, d.name deployment_name +SELECT endpoint, r.key AS runner_key, r.module_name, d.key deployment_key FROM runners r LEFT JOIN deployments d on r.deployment_id = d.id WHERE state = 'assigned' @@ -248,7 +248,7 @@ WHERE state = 'assigned' -- name: GetRouteForRunner :one -- Retrieve routing information for a runner. -SELECT endpoint, r.key AS runner_key, r.module_name, d.name deployment_name, r.state +SELECT endpoint, r.key AS runner_key, r.module_name, d.key deployment_key, r.state FROM runners r LEFT JOIN deployments d on r.deployment_id = d.id WHERE r.key = sqlc.arg('key')::runner_key; @@ -258,7 +258,7 @@ SELECT * FROM runners r INNER JOIN deployments d on r.deployment_id = d.id WHERE state = 'assigned' - AND d.name = $1; + AND d.key = sqlc.arg('key')::deployment_key; -- name: ExpireRunnerReservations :one WITH rows AS ( @@ -274,7 +274,7 @@ FROM rows; -- name: InsertLogEvent :exec INSERT INTO events (deployment_id, request_id, time_stamp, custom_key_1, type, payload) -VALUES ((SELECT id FROM deployments d WHERE d.name = sqlc.arg('deployment_name')::deployment_name LIMIT 1), +VALUES ((SELECT id FROM deployments d WHERE d.key = sqlc.arg('deployment_key')::deployment_key LIMIT 1), (CASE WHEN sqlc.narg('request_name')::TEXT IS NULL THEN NULL ELSE (SELECT id FROM requests ir WHERE ir.name = sqlc.narg('request_name')::TEXT LIMIT 1) @@ -293,20 +293,20 @@ VALUES ((SELECT id FROM deployments d WHERE d.name = sqlc.arg('deployment_name') INSERT INTO events (deployment_id, type, custom_key_1, custom_key_2, payload) VALUES ((SELECT id FROM deployments - WHERE deployments.name = sqlc.arg('deployment_name')::deployment_name), + WHERE deployments.key = sqlc.arg('deployment_key')::deployment_key), 'deployment_created', sqlc.arg('language')::TEXT, sqlc.arg('module_name')::TEXT, jsonb_build_object( 'min_replicas', sqlc.arg('min_replicas')::INT, - 'replaced', sqlc.narg('replaced')::TEXT + 'replaced', sqlc.narg('replaced')::deployment_key )); -- name: InsertDeploymentUpdatedEvent :exec INSERT INTO events (deployment_id, type, custom_key_1, custom_key_2, payload) VALUES ((SELECT id FROM deployments - WHERE deployments.name = sqlc.arg('deployment_name')::deployment_name), + WHERE deployments.key = sqlc.arg('deployment_key')::deployment_key), 'deployment_updated', sqlc.arg('language')::TEXT, sqlc.arg('module_name')::TEXT, @@ -318,7 +318,7 @@ VALUES ((SELECT id -- name: InsertCallEvent :exec INSERT INTO events (deployment_id, request_id, time_stamp, type, custom_key_1, custom_key_2, custom_key_3, custom_key_4, payload) -VALUES ((SELECT id FROM deployments WHERE deployments.name = sqlc.arg('deployment_name')::deployment_name), +VALUES ((SELECT id FROM deployments WHERE deployments.key = sqlc.arg('deployment_key')::deployment_key), (CASE WHEN sqlc.narg('request_name')::TEXT IS NULL THEN NULL ELSE (SELECT id FROM requests ir WHERE ir.name = sqlc.narg('request_name')::TEXT) @@ -368,11 +368,11 @@ ORDER BY c.key; -- name: CreateIngressRoute :exec INSERT INTO ingress_routes (deployment_id, module, verb, method, path) -VALUES ((SELECT id FROM deployments WHERE name = $1 LIMIT 1), $2, $3, $4, $5); +VALUES ((SELECT id FROM deployments WHERE key = sqlc.arg('key')::deployment_key LIMIT 1), $2, $3, $4, $5); -- name: GetIngressRoutes :many -- Get the runner endpoints corresponding to the given ingress route. -SELECT r.key AS runner_key, d.name AS deployment_name, endpoint, ir.path, ir.module, ir.verb +SELECT r.key AS runner_key, d.key AS deployment_key, endpoint, ir.path, ir.module, ir.verb FROM ingress_routes ir INNER JOIN runners r ON ir.deployment_id = r.deployment_id INNER JOIN deployments d ON ir.deployment_id = d.id @@ -380,7 +380,7 @@ WHERE r.state = 'assigned' AND ir.method = $1; -- name: GetAllIngressRoutes :many -SELECT d.name AS deployment_name, ir.module, ir.verb, ir.method, ir.path +SELECT d.key AS deployment_key, ir.module, ir.verb, ir.method, ir.path FROM ingress_routes ir INNER JOIN deployments d ON ir.deployment_id = d.id WHERE sqlc.arg('all')::bool = true diff --git a/backend/controller/sql/queries.sql.go b/backend/controller/sql/queries.sql.go index faf0f037a8..71b4df7634 100644 --- a/backend/controller/sql/queries.sql.go +++ b/backend/controller/sql/queries.sql.go @@ -17,11 +17,11 @@ import ( const associateArtefactWithDeployment = `-- name: AssociateArtefactWithDeployment :exec INSERT INTO deployment_artefacts (deployment_id, artefact_id, executable, path) -VALUES ((SELECT id FROM deployments WHERE name = $1), $2, $3, $4) +VALUES ((SELECT id FROM deployments WHERE key = $1::deployment_key), $2, $3, $4) ` type AssociateArtefactWithDeploymentParams struct { - Name model.DeploymentName + Key model.DeploymentKey ArtefactID int64 Executable bool Path string @@ -29,7 +29,7 @@ type AssociateArtefactWithDeploymentParams struct { func (q *Queries) AssociateArtefactWithDeployment(ctx context.Context, arg AssociateArtefactWithDeploymentParams) error { _, err := q.db.Exec(ctx, associateArtefactWithDeployment, - arg.Name, + arg.Key, arg.ArtefactID, arg.Executable, arg.Path, @@ -52,12 +52,12 @@ func (q *Queries) CreateArtefact(ctx context.Context, digest []byte, content []b } const createDeployment = `-- name: CreateDeployment :exec -INSERT INTO deployments (module_id, "schema", "name") -VALUES ((SELECT id FROM modules WHERE name = $1::TEXT LIMIT 1), $2::BYTEA, $3) +INSERT INTO deployments (module_id, "schema", "key") +VALUES ((SELECT id FROM modules WHERE name = $1::TEXT LIMIT 1), $2::BYTEA, $3::deployment_key) ` -func (q *Queries) CreateDeployment(ctx context.Context, moduleName string, schema []byte, name model.DeploymentName) error { - _, err := q.db.Exec(ctx, createDeployment, moduleName, schema, name) +func (q *Queries) CreateDeployment(ctx context.Context, moduleName string, schema []byte, key model.DeploymentKey) error { + _, err := q.db.Exec(ctx, createDeployment, moduleName, schema, key) return err } @@ -73,11 +73,11 @@ func (q *Queries) CreateIngressRequest(ctx context.Context, origin Origin, name const createIngressRoute = `-- name: CreateIngressRoute :exec INSERT INTO ingress_routes (deployment_id, module, verb, method, path) -VALUES ((SELECT id FROM deployments WHERE name = $1 LIMIT 1), $2, $3, $4, $5) +VALUES ((SELECT id FROM deployments WHERE key = $1::deployment_key LIMIT 1), $2, $3, $4, $5) ` type CreateIngressRouteParams struct { - Name model.DeploymentName + Key model.DeploymentKey Module string Verb string Method string @@ -86,7 +86,7 @@ type CreateIngressRouteParams struct { func (q *Queries) CreateIngressRoute(ctx context.Context, arg CreateIngressRouteParams) error { _, err := q.db.Exec(ctx, createIngressRoute, - arg.Name, + arg.Key, arg.Module, arg.Verb, arg.Method, @@ -134,11 +134,11 @@ func (q *Queries) ExpireRunnerReservations(ctx context.Context) (int64, error) { } const getActiveDeploymentSchemas = `-- name: GetActiveDeploymentSchemas :many -SELECT name, schema FROM deployments WHERE min_replicas > 0 +SELECT key, schema FROM deployments WHERE min_replicas > 0 ` type GetActiveDeploymentSchemasRow struct { - Name model.DeploymentName + Key model.DeploymentKey Schema *schema.Module } @@ -151,7 +151,7 @@ func (q *Queries) GetActiveDeploymentSchemas(ctx context.Context) ([]GetActiveDe var items []GetActiveDeploymentSchemasRow for rows.Next() { var i GetActiveDeploymentSchemasRow - if err := rows.Scan(&i.Name, &i.Schema); err != nil { + if err := rows.Scan(&i.Key, &i.Schema); err != nil { return nil, err } items = append(items, i) @@ -163,12 +163,12 @@ func (q *Queries) GetActiveDeploymentSchemas(ctx context.Context) ([]GetActiveDe } const getActiveDeployments = `-- name: GetActiveDeployments :many -SELECT d.id, d.created_at, d.module_id, d.name, d.schema, d.labels, d.min_replicas, m.name AS module_name, m.language +SELECT d.id, d.created_at, d.module_id, d.key, d.schema, d.labels, d.min_replicas, m.name AS module_name, m.language FROM deployments d INNER JOIN modules m on d.module_id = m.id WHERE $1::bool = true OR min_replicas > 0 -ORDER BY d.name +ORDER BY d.key ` type GetActiveDeploymentsRow struct { @@ -190,7 +190,7 @@ func (q *Queries) GetActiveDeployments(ctx context.Context, all bool) ([]GetActi &i.Deployment.ID, &i.Deployment.CreatedAt, &i.Deployment.ModuleID, - &i.Deployment.Name, + &i.Deployment.Key, &i.Deployment.Schema, &i.Deployment.Labels, &i.Deployment.MinReplicas, @@ -216,7 +216,7 @@ SELECT DISTINCT ON (r.key) r.key AS runner_key r.module_name, COALESCE(CASE WHEN r.deployment_id IS NOT NULL - THEN d.name END, NULL) AS deployment_name + THEN d.key END, NULL) AS deployment_key FROM runners r LEFT JOIN deployments d on d.id = r.deployment_id WHERE $1::bool = true @@ -225,13 +225,13 @@ ORDER BY r.key ` type GetActiveRunnersRow struct { - RunnerKey model.RunnerKey - Endpoint string - State RunnerState - Labels []byte - LastSeen time.Time - ModuleName optional.Option[string] - DeploymentName optional.Option[string] + RunnerKey model.RunnerKey + Endpoint string + State RunnerState + Labels []byte + LastSeen time.Time + ModuleName optional.Option[string] + DeploymentKey optional.Option[string] } func (q *Queries) GetActiveRunners(ctx context.Context, all bool) ([]GetActiveRunnersRow, error) { @@ -250,7 +250,7 @@ func (q *Queries) GetActiveRunners(ctx context.Context, all bool) ([]GetActiveRu &i.Labels, &i.LastSeen, &i.ModuleName, - &i.DeploymentName, + &i.DeploymentKey, ); err != nil { return nil, err } @@ -263,7 +263,7 @@ func (q *Queries) GetActiveRunners(ctx context.Context, all bool) ([]GetActiveRu } const getAllIngressRoutes = `-- name: GetAllIngressRoutes :many -SELECT d.name AS deployment_name, ir.module, ir.verb, ir.method, ir.path +SELECT d.key AS deployment_key, ir.module, ir.verb, ir.method, ir.path FROM ingress_routes ir INNER JOIN deployments d ON ir.deployment_id = d.id WHERE $1::bool = true @@ -271,11 +271,11 @@ WHERE $1::bool = true ` type GetAllIngressRoutesRow struct { - DeploymentName model.DeploymentName - Module string - Verb string - Method string - Path string + DeploymentKey model.DeploymentKey + Module string + Verb string + Method string + Path string } func (q *Queries) GetAllIngressRoutes(ctx context.Context, all bool) ([]GetAllIngressRoutesRow, error) { @@ -288,7 +288,7 @@ func (q *Queries) GetAllIngressRoutes(ctx context.Context, all bool) ([]GetAllIn for rows.Next() { var i GetAllIngressRoutesRow if err := rows.Scan( - &i.DeploymentName, + &i.DeploymentKey, &i.Module, &i.Verb, &i.Method, @@ -385,10 +385,10 @@ func (q *Queries) GetControllers(ctx context.Context, all bool) ([]Controller, e } const getDeployment = `-- name: GetDeployment :one -SELECT d.id, d.created_at, d.module_id, d.name, d.schema, d.labels, d.min_replicas, m.language, m.name AS module_name, d.min_replicas +SELECT d.id, d.created_at, d.module_id, d.key, d.schema, d.labels, d.min_replicas, m.language, m.name AS module_name, d.min_replicas FROM deployments d INNER JOIN modules m ON m.id = d.module_id -WHERE d.name = $1 +WHERE d.key = $1::deployment_key ` type GetDeploymentRow struct { @@ -398,14 +398,14 @@ type GetDeploymentRow struct { MinReplicas int32 } -func (q *Queries) GetDeployment(ctx context.Context, name model.DeploymentName) (GetDeploymentRow, error) { - row := q.db.QueryRow(ctx, getDeployment, name) +func (q *Queries) GetDeployment(ctx context.Context, key model.DeploymentKey) (GetDeploymentRow, error) { + row := q.db.QueryRow(ctx, getDeployment, key) var i GetDeploymentRow err := row.Scan( &i.Deployment.ID, &i.Deployment.CreatedAt, &i.Deployment.ModuleID, - &i.Deployment.Name, + &i.Deployment.Key, &i.Deployment.Schema, &i.Deployment.Labels, &i.Deployment.MinReplicas, @@ -461,7 +461,7 @@ func (q *Queries) GetDeploymentArtefacts(ctx context.Context, deploymentID int64 } const getDeploymentsByID = `-- name: GetDeploymentsByID :many -SELECT id, created_at, module_id, name, schema, labels, min_replicas +SELECT id, created_at, module_id, key, schema, labels, min_replicas FROM deployments WHERE id = ANY ($1::BIGINT[]) ` @@ -479,7 +479,7 @@ func (q *Queries) GetDeploymentsByID(ctx context.Context, ids []int64) ([]Deploy &i.ID, &i.CreatedAt, &i.ModuleID, - &i.Name, + &i.Key, &i.Schema, &i.Labels, &i.MinReplicas, @@ -495,7 +495,7 @@ func (q *Queries) GetDeploymentsByID(ctx context.Context, ids []int64) ([]Deploy } const getDeploymentsNeedingReconciliation = `-- name: GetDeploymentsNeedingReconciliation :many -SELECT d.name AS deployment_name, +SELECT d.key AS deployment_key, m.name AS module_name, m.language AS language, COUNT(r.id) AS assigned_runners_count, @@ -503,12 +503,12 @@ SELECT d.name AS deployment_name, FROM deployments d LEFT JOIN runners r ON d.id = r.deployment_id AND r.state <> 'dead' JOIN modules m ON d.module_id = m.id -GROUP BY d.name, d.min_replicas, m.name, m.language +GROUP BY d.key, d.min_replicas, m.name, m.language HAVING COUNT(r.id) <> d.min_replicas ` type GetDeploymentsNeedingReconciliationRow struct { - DeploymentName model.DeploymentName + DeploymentKey model.DeploymentKey ModuleName string Language string AssignedRunnersCount int64 @@ -526,7 +526,7 @@ func (q *Queries) GetDeploymentsNeedingReconciliation(ctx context.Context) ([]Ge for rows.Next() { var i GetDeploymentsNeedingReconciliationRow if err := rows.Scan( - &i.DeploymentName, + &i.DeploymentKey, &i.ModuleName, &i.Language, &i.AssignedRunnersCount, @@ -543,7 +543,7 @@ func (q *Queries) GetDeploymentsNeedingReconciliation(ctx context.Context) ([]Ge } const getDeploymentsWithArtefacts = `-- name: GetDeploymentsWithArtefacts :many -SELECT d.id, d.created_at, d.name as deployment_name, d.schema, m.name AS module_name +SELECT d.id, d.created_at, d.key as deployment_key, d.schema, m.name AS module_name FROM deployments d INNER JOIN modules m ON d.module_id = m.id WHERE EXISTS (SELECT 1 @@ -557,11 +557,11 @@ WHERE EXISTS (SELECT 1 ` type GetDeploymentsWithArtefactsRow struct { - ID int64 - CreatedAt time.Time - DeploymentName model.DeploymentName - Schema *schema.Module - ModuleName string + ID int64 + CreatedAt time.Time + DeploymentKey model.DeploymentKey + Schema *schema.Module + ModuleName string } // Get all deployments that have artefacts matching the given digests. @@ -577,7 +577,7 @@ func (q *Queries) GetDeploymentsWithArtefacts(ctx context.Context, digests [][]b if err := rows.Scan( &i.ID, &i.CreatedAt, - &i.DeploymentName, + &i.DeploymentKey, &i.Schema, &i.ModuleName, ); err != nil { @@ -592,7 +592,7 @@ func (q *Queries) GetDeploymentsWithArtefacts(ctx context.Context, digests [][]b } const getExistingDeploymentForModule = `-- name: GetExistingDeploymentForModule :one -SELECT d.id, created_at, module_id, d.name, schema, labels, min_replicas, m.id, language, m.name +SELECT d.id, created_at, module_id, key, schema, labels, min_replicas, m.id, language, name FROM deployments d INNER JOIN modules m on d.module_id = m.id WHERE m.name = $1 @@ -604,13 +604,13 @@ type GetExistingDeploymentForModuleRow struct { ID int64 CreatedAt time.Time ModuleID int64 - Name model.DeploymentName + Key model.DeploymentKey Schema *schema.Module Labels []byte MinReplicas int32 ID_2 int64 Language string - Name_2 string + Name string } func (q *Queries) GetExistingDeploymentForModule(ctx context.Context, name string) (GetExistingDeploymentForModuleRow, error) { @@ -620,13 +620,13 @@ func (q *Queries) GetExistingDeploymentForModule(ctx context.Context, name strin &i.ID, &i.CreatedAt, &i.ModuleID, - &i.Name, + &i.Key, &i.Schema, &i.Labels, &i.MinReplicas, &i.ID_2, &i.Language, - &i.Name_2, + &i.Name, ) return i, err } @@ -671,7 +671,7 @@ func (q *Queries) GetIdleRunners(ctx context.Context, labels []byte, limit int64 } const getIngressRoutes = `-- name: GetIngressRoutes :many -SELECT r.key AS runner_key, d.name AS deployment_name, endpoint, ir.path, ir.module, ir.verb +SELECT r.key AS runner_key, d.key AS deployment_key, endpoint, ir.path, ir.module, ir.verb FROM ingress_routes ir INNER JOIN runners r ON ir.deployment_id = r.deployment_id INNER JOIN deployments d ON ir.deployment_id = d.id @@ -680,12 +680,12 @@ WHERE r.state = 'assigned' ` type GetIngressRoutesRow struct { - RunnerKey model.RunnerKey - DeploymentName model.DeploymentName - Endpoint string - Path string - Module string - Verb string + RunnerKey model.RunnerKey + DeploymentKey model.DeploymentKey + Endpoint string + Path string + Module string + Verb string } // Get the runner endpoints corresponding to the given ingress route. @@ -700,7 +700,7 @@ func (q *Queries) GetIngressRoutes(ctx context.Context, method string) ([]GetIng var i GetIngressRoutesRow if err := rows.Scan( &i.RunnerKey, - &i.DeploymentName, + &i.DeploymentKey, &i.Endpoint, &i.Path, &i.Module, @@ -744,7 +744,7 @@ func (q *Queries) GetModulesByID(ctx context.Context, ids []int64) ([]Module, er const getProcessList = `-- name: GetProcessList :many SELECT d.min_replicas, - d.name AS deployment_name, + d.key AS deployment_key, d.labels deployment_labels, r.key AS runner_key, r.endpoint, @@ -752,12 +752,12 @@ SELECT d.min_replicas, FROM deployments d LEFT JOIN runners r on d.id = r.deployment_id AND r.state != 'dead' WHERE d.min_replicas > 0 -ORDER BY d.name +ORDER BY d.key ` type GetProcessListRow struct { MinReplicas int32 - DeploymentName model.DeploymentName + DeploymentKey model.DeploymentKey DeploymentLabels []byte RunnerKey NullRunnerKey Endpoint optional.Option[string] @@ -775,7 +775,7 @@ func (q *Queries) GetProcessList(ctx context.Context) ([]GetProcessListRow, erro var i GetProcessListRow if err := rows.Scan( &i.MinReplicas, - &i.DeploymentName, + &i.DeploymentKey, &i.DeploymentLabels, &i.RunnerKey, &i.Endpoint, @@ -792,18 +792,18 @@ func (q *Queries) GetProcessList(ctx context.Context) ([]GetProcessListRow, erro } const getRouteForRunner = `-- name: GetRouteForRunner :one -SELECT endpoint, r.key AS runner_key, r.module_name, d.name deployment_name, r.state +SELECT endpoint, r.key AS runner_key, r.module_name, d.key deployment_key, r.state FROM runners r LEFT JOIN deployments d on r.deployment_id = d.id WHERE r.key = $1::runner_key ` type GetRouteForRunnerRow struct { - Endpoint string - RunnerKey model.RunnerKey - ModuleName optional.Option[string] - DeploymentName model.DeploymentName - State RunnerState + Endpoint string + RunnerKey model.RunnerKey + ModuleName optional.Option[string] + DeploymentKey NullDeploymentKey + State RunnerState } // Retrieve routing information for a runner. @@ -814,14 +814,14 @@ func (q *Queries) GetRouteForRunner(ctx context.Context, key model.RunnerKey) (G &i.Endpoint, &i.RunnerKey, &i.ModuleName, - &i.DeploymentName, + &i.DeploymentKey, &i.State, ) return i, err } const getRoutingTable = `-- name: GetRoutingTable :many -SELECT endpoint, r.key AS runner_key, r.module_name, d.name deployment_name +SELECT endpoint, r.key AS runner_key, r.module_name, d.key deployment_key FROM runners r LEFT JOIN deployments d on r.deployment_id = d.id WHERE state = 'assigned' @@ -830,10 +830,10 @@ WHERE state = 'assigned' ` type GetRoutingTableRow struct { - Endpoint string - RunnerKey model.RunnerKey - ModuleName optional.Option[string] - DeploymentName model.DeploymentName + Endpoint string + RunnerKey model.RunnerKey + ModuleName optional.Option[string] + DeploymentKey NullDeploymentKey } func (q *Queries) GetRoutingTable(ctx context.Context, modules []string) ([]GetRoutingTableRow, error) { @@ -849,7 +849,7 @@ func (q *Queries) GetRoutingTable(ctx context.Context, modules []string) ([]GetR &i.Endpoint, &i.RunnerKey, &i.ModuleName, - &i.DeploymentName, + &i.DeploymentKey, ); err != nil { return nil, err } @@ -870,20 +870,20 @@ SELECT DISTINCT ON (r.key) r.key AS runner_key r.module_name, COALESCE(CASE WHEN r.deployment_id IS NOT NULL - THEN d.name END, NULL) AS deployment_name + THEN d.key END, NULL) AS deployment_key FROM runners r LEFT JOIN deployments d on d.id = r.deployment_id OR r.deployment_id IS NULL WHERE r.key = $1::runner_key ` type GetRunnerRow struct { - RunnerKey model.RunnerKey - Endpoint string - State RunnerState - Labels []byte - LastSeen time.Time - ModuleName optional.Option[string] - DeploymentName optional.Option[string] + RunnerKey model.RunnerKey + Endpoint string + State RunnerState + Labels []byte + LastSeen time.Time + ModuleName optional.Option[string] + DeploymentKey optional.Option[string] } func (q *Queries) GetRunner(ctx context.Context, key model.RunnerKey) (GetRunnerRow, error) { @@ -896,7 +896,7 @@ func (q *Queries) GetRunner(ctx context.Context, key model.RunnerKey) (GetRunner &i.Labels, &i.LastSeen, &i.ModuleName, - &i.DeploymentName, + &i.DeploymentKey, ) return i, err } @@ -915,11 +915,11 @@ func (q *Queries) GetRunnerState(ctx context.Context, key model.RunnerKey) (Runn } const getRunnersForDeployment = `-- name: GetRunnersForDeployment :many -SELECT r.id, key, created, last_seen, reservation_timeout, state, endpoint, module_name, deployment_id, r.labels, d.id, created_at, module_id, name, schema, d.labels, min_replicas +SELECT r.id, r.key, created, last_seen, reservation_timeout, state, endpoint, module_name, deployment_id, r.labels, d.id, created_at, module_id, d.key, schema, d.labels, min_replicas FROM runners r INNER JOIN deployments d on r.deployment_id = d.id WHERE state = 'assigned' - AND d.name = $1 + AND d.key = $1::deployment_key ` type GetRunnersForDeploymentRow struct { @@ -936,14 +936,14 @@ type GetRunnersForDeploymentRow struct { ID_2 int64 CreatedAt time.Time ModuleID int64 - Name model.DeploymentName + Key_2 model.DeploymentKey Schema *schema.Module Labels_2 []byte MinReplicas int32 } -func (q *Queries) GetRunnersForDeployment(ctx context.Context, name model.DeploymentName) ([]GetRunnersForDeploymentRow, error) { - rows, err := q.db.Query(ctx, getRunnersForDeployment, name) +func (q *Queries) GetRunnersForDeployment(ctx context.Context, key model.DeploymentKey) ([]GetRunnersForDeploymentRow, error) { + rows, err := q.db.Query(ctx, getRunnersForDeployment, key) if err != nil { return nil, err } @@ -965,7 +965,7 @@ func (q *Queries) GetRunnersForDeployment(ctx context.Context, name model.Deploy &i.ID_2, &i.CreatedAt, &i.ModuleID, - &i.Name, + &i.Key_2, &i.Schema, &i.Labels_2, &i.MinReplicas, @@ -983,7 +983,7 @@ func (q *Queries) GetRunnersForDeployment(ctx context.Context, name model.Deploy const insertCallEvent = `-- name: InsertCallEvent :exec INSERT INTO events (deployment_id, request_id, time_stamp, type, custom_key_1, custom_key_2, custom_key_3, custom_key_4, payload) -VALUES ((SELECT id FROM deployments WHERE deployments.name = $1::deployment_name), +VALUES ((SELECT id FROM deployments WHERE deployments.key = $1::deployment_key), (CASE WHEN $2::TEXT IS NULL THEN NULL ELSE (SELECT id FROM requests ir WHERE ir.name = $2::TEXT) @@ -1004,23 +1004,23 @@ VALUES ((SELECT id FROM deployments WHERE deployments.name = $1::deployment_name ` type InsertCallEventParams struct { - DeploymentName model.DeploymentName - RequestName optional.Option[string] - TimeStamp time.Time - SourceModule optional.Option[string] - SourceVerb optional.Option[string] - DestModule string - DestVerb string - DurationMs int64 - Request []byte - Response []byte - Error optional.Option[string] - Stack optional.Option[string] + DeploymentKey model.DeploymentKey + RequestName optional.Option[string] + TimeStamp time.Time + SourceModule optional.Option[string] + SourceVerb optional.Option[string] + DestModule string + DestVerb string + DurationMs int64 + Request []byte + Response []byte + Error optional.Option[string] + Stack optional.Option[string] } func (q *Queries) InsertCallEvent(ctx context.Context, arg InsertCallEventParams) error { _, err := q.db.Exec(ctx, insertCallEvent, - arg.DeploymentName, + arg.DeploymentKey, arg.RequestName, arg.TimeStamp, arg.SourceModule, @@ -1040,27 +1040,27 @@ const insertDeploymentCreatedEvent = `-- name: InsertDeploymentCreatedEvent :exe INSERT INTO events (deployment_id, type, custom_key_1, custom_key_2, payload) VALUES ((SELECT id FROM deployments - WHERE deployments.name = $1::deployment_name), + WHERE deployments.key = $1::deployment_key), 'deployment_created', $2::TEXT, $3::TEXT, jsonb_build_object( 'min_replicas', $4::INT, - 'replaced', $5::TEXT + 'replaced', $5::deployment_key )) ` type InsertDeploymentCreatedEventParams struct { - DeploymentName model.DeploymentName - Language string - ModuleName string - MinReplicas int32 - Replaced optional.Option[string] + DeploymentKey model.DeploymentKey + Language string + ModuleName string + MinReplicas int32 + Replaced NullDeploymentKey } func (q *Queries) InsertDeploymentCreatedEvent(ctx context.Context, arg InsertDeploymentCreatedEventParams) error { _, err := q.db.Exec(ctx, insertDeploymentCreatedEvent, - arg.DeploymentName, + arg.DeploymentKey, arg.Language, arg.ModuleName, arg.MinReplicas, @@ -1073,7 +1073,7 @@ const insertDeploymentUpdatedEvent = `-- name: InsertDeploymentUpdatedEvent :exe INSERT INTO events (deployment_id, type, custom_key_1, custom_key_2, payload) VALUES ((SELECT id FROM deployments - WHERE deployments.name = $1::deployment_name), + WHERE deployments.key = $1::deployment_key), 'deployment_updated', $2::TEXT, $3::TEXT, @@ -1084,7 +1084,7 @@ VALUES ((SELECT id ` type InsertDeploymentUpdatedEventParams struct { - DeploymentName model.DeploymentName + DeploymentKey model.DeploymentKey Language string ModuleName string PrevMinReplicas int32 @@ -1093,7 +1093,7 @@ type InsertDeploymentUpdatedEventParams struct { func (q *Queries) InsertDeploymentUpdatedEvent(ctx context.Context, arg InsertDeploymentUpdatedEventParams) error { _, err := q.db.Exec(ctx, insertDeploymentUpdatedEvent, - arg.DeploymentName, + arg.DeploymentKey, arg.Language, arg.ModuleName, arg.PrevMinReplicas, @@ -1137,7 +1137,7 @@ func (q *Queries) InsertEvent(ctx context.Context, arg InsertEventParams) error const insertLogEvent = `-- name: InsertLogEvent :exec INSERT INTO events (deployment_id, request_id, time_stamp, custom_key_1, type, payload) -VALUES ((SELECT id FROM deployments d WHERE d.name = $1::deployment_name LIMIT 1), +VALUES ((SELECT id FROM deployments d WHERE d.key = $1::deployment_key LIMIT 1), (CASE WHEN $2::TEXT IS NULL THEN NULL ELSE (SELECT id FROM requests ir WHERE ir.name = $2::TEXT LIMIT 1) @@ -1154,19 +1154,19 @@ VALUES ((SELECT id FROM deployments d WHERE d.name = $1::deployment_name LIMIT 1 ` type InsertLogEventParams struct { - DeploymentName model.DeploymentName - RequestName optional.Option[string] - TimeStamp time.Time - Level int32 - Message string - Attributes []byte - Error optional.Option[string] - Stack optional.Option[string] + DeploymentKey model.DeploymentKey + RequestName optional.Option[string] + TimeStamp time.Time + Level int32 + Message string + Attributes []byte + Error optional.Option[string] + Stack optional.Option[string] } func (q *Queries) InsertLogEvent(ctx context.Context, arg InsertLogEventParams) error { _, err := q.db.Exec(ctx, insertLogEvent, - arg.DeploymentName, + arg.DeploymentKey, arg.RequestName, arg.TimeStamp, arg.Level, @@ -1218,16 +1218,16 @@ const replaceDeployment = `-- name: ReplaceDeployment :one WITH update_container AS ( UPDATE deployments AS d SET min_replicas = update_deployments.min_replicas - FROM (VALUES ($1::TEXT, 0), - ($2::TEXT, $3::INT)) - AS update_deployments(name, min_replicas) - WHERE d.name = update_deployments.name + FROM (VALUES ($1::deployment_key, 0), + ($2::deployment_key, $3::INT)) + AS update_deployments(key, min_replicas) + WHERE d.key = update_deployments.key RETURNING 1) SELECT COUNT(*) FROM update_container ` -func (q *Queries) ReplaceDeployment(ctx context.Context, oldDeployment string, newDeployment string, minReplicas int32) (int64, error) { +func (q *Queries) ReplaceDeployment(ctx context.Context, oldDeployment model.DeploymentKey, newDeployment model.DeploymentKey, minReplicas int32) (int64, error) { row := q.db.QueryRow(ctx, replaceDeployment, oldDeployment, newDeployment, minReplicas) var count int64 err := row.Scan(&count) @@ -1242,7 +1242,7 @@ SET state = 'reserved', -- and the update will fail due to a FK constraint. deployment_id = COALESCE((SELECT id FROM deployments d - WHERE d.name = $2::deployment_name + WHERE d.key = $2::deployment_key LIMIT 1), -1) WHERE id = (SELECT id FROM runners r @@ -1253,8 +1253,8 @@ RETURNING runners.id, runners.key, runners.created, runners.last_seen, runners.r ` // Find an idle runner and reserve it for the given deployment. -func (q *Queries) ReserveRunner(ctx context.Context, reservationTimeout time.Time, deploymentName model.DeploymentName, labels []byte) (Runner, error) { - row := q.db.QueryRow(ctx, reserveRunner, reservationTimeout, deploymentName, labels) +func (q *Queries) ReserveRunner(ctx context.Context, reservationTimeout time.Time, deploymentKey model.DeploymentKey, labels []byte) (Runner, error) { + row := q.db.QueryRow(ctx, reserveRunner, reservationTimeout, deploymentKey, labels) var i Runner err := row.Scan( &i.ID, @@ -1274,12 +1274,12 @@ func (q *Queries) ReserveRunner(ctx context.Context, reservationTimeout time.Tim const setDeploymentDesiredReplicas = `-- name: SetDeploymentDesiredReplicas :exec UPDATE deployments SET min_replicas = $2 -WHERE name = $1 +WHERE key = $1::deployment_key RETURNING 1 ` -func (q *Queries) SetDeploymentDesiredReplicas(ctx context.Context, name model.DeploymentName, minReplicas int32) error { - _, err := q.db.Exec(ctx, setDeploymentDesiredReplicas, name, minReplicas) +func (q *Queries) SetDeploymentDesiredReplicas(ctx context.Context, key model.DeploymentKey, minReplicas int32) error { + _, err := q.db.Exec(ctx, setDeploymentDesiredReplicas, key, minReplicas) return err } @@ -1316,11 +1316,11 @@ func (q *Queries) UpsertModule(ctx context.Context, language string, name string const upsertRunner = `-- name: UpsertRunner :one WITH deployment_rel AS ( SELECT CASE - WHEN $5::deployment_name IS NULL + WHEN $5::deployment_key IS NULL THEN NULL ELSE COALESCE((SELECT id FROM deployments d - WHERE d.name = $5::deployment_name + WHERE d.key = $5::deployment_key LIMIT 1), -1) END AS id) INSERT INTO runners (key, endpoint, state, labels, deployment_id, last_seen) @@ -1339,15 +1339,15 @@ RETURNING deployment_id ` type UpsertRunnerParams struct { - Key model.RunnerKey - Endpoint string - State RunnerState - Labels []byte - DeploymentName NullDeploymentName + Key model.RunnerKey + Endpoint string + State RunnerState + Labels []byte + DeploymentKey NullDeploymentKey } // Upsert a runner and return the deployment ID that it is assigned to, if any. -// If the deployment name is null, then deployment_rel.id will be null, +// If the deployment key is null, then deployment_rel.id will be null, // otherwise we try to retrieve the deployments.id using the key. If // there is no corresponding deployment, then the deployment ID is -1 // and the parent statement will fail due to a foreign key constraint. @@ -1357,7 +1357,7 @@ func (q *Queries) UpsertRunner(ctx context.Context, arg UpsertRunnerParams) (opt arg.Endpoint, arg.State, arg.Labels, - arg.DeploymentName, + arg.DeploymentKey, ) var deployment_id optional.Option[int64] err := row.Scan(&deployment_id) diff --git a/backend/controller/sql/schema/001_init.sql b/backend/controller/sql/schema/001_init.sql index a0478ea463..ff5423068f 100644 --- a/backend/controller/sql/schema/001_init.sql +++ b/backend/controller/sql/schema/001_init.sql @@ -13,13 +13,13 @@ BEGIN payload = jsonb_build_object( 'table', TG_TABLE_NAME, 'action', TG_OP, - 'old', old.name + 'old', old.key ); ELSE payload = jsonb_build_object( 'table', TG_TABLE_NAME, 'action', TG_OP, - 'new', new.name + 'new', new.key ); END IF; PERFORM pg_notify('notify_events', payload::text); @@ -39,22 +39,22 @@ CREATE DOMAIN module_schema_pb AS BYTEA; CREATE DOMAIN runner_key AS varchar; CREATE DOMAIN controller_key AS varchar; -CREATE DOMAIN deployment_name AS varchar; +CREATE DOMAIN deployment_key AS varchar; CREATE TABLE deployments ( id BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, created_at TIMESTAMPTZ NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'), module_id BIGINT NOT NULL REFERENCES modules (id) ON DELETE CASCADE, - -- Unique name for this deployment in the form -. - "name" deployment_name UNIQUE NOT NULL, + -- Unique key for this deployment in the form -. + "key" deployment_key UNIQUE NOT NULL, "schema" module_schema_pb NOT NULL, -- Labels are used to match deployments to runners. "labels" JSONB NOT NULL DEFAULT '{}', min_replicas INT NOT NULL DEFAULT 0 ); -CREATE UNIQUE INDEX deployments_name_idx ON deployments (name); +CREATE UNIQUE INDEX deployments_key_idx ON deployments (key); CREATE INDEX deployments_module_id_idx ON deployments (module_id); -- Only allow one deployment per module. CREATE UNIQUE INDEX deployments_unique_idx ON deployments (module_id) diff --git a/backend/controller/sql/types.go b/backend/controller/sql/types.go index 11ef3812f2..e6ad4f8b12 100644 --- a/backend/controller/sql/types.go +++ b/backend/controller/sql/types.go @@ -13,10 +13,10 @@ import ( type NullTime = optional.Option[time.Time] type NullDuration = optional.Option[time.Duration] type NullRunnerKey = optional.Option[model.RunnerKey] -type NullDeploymentName = optional.Option[model.DeploymentName] +type NullDeploymentKey = optional.Option[model.DeploymentKey] var _ sql.Scanner = (*NullRunnerKey)(nil) var _ driver.Valuer = (*NullRunnerKey)(nil) -var _ sql.Scanner = (*NullDeploymentName)(nil) -var _ driver.Valuer = (*NullDeploymentName)(nil) +var _ sql.Scanner = (*NullDeploymentKey)(nil) +var _ driver.Valuer = (*NullDeploymentKey)(nil) diff --git a/backend/protos/xyz/block/ftl/v1/console/console.pb.go b/backend/protos/xyz/block/ftl/v1/console/console.pb.go index 0a8f693983..ec114cf596 100644 --- a/backend/protos/xyz/block/ftl/v1/console/console.pb.go +++ b/backend/protos/xyz/block/ftl/v1/console/console.pb.go @@ -188,14 +188,14 @@ type LogEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - RequestName *string `protobuf:"bytes,2,opt,name=request_name,json=requestName,proto3,oneof" json:"request_name,omitempty"` - TimeStamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` - LogLevel int32 `protobuf:"varint,4,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` - Attributes map[string]string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` - Error *string `protobuf:"bytes,7,opt,name=error,proto3,oneof" json:"error,omitempty"` - Stack *string `protobuf:"bytes,8,opt,name=stack,proto3,oneof" json:"stack,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + RequestName *string `protobuf:"bytes,2,opt,name=request_name,json=requestName,proto3,oneof" json:"request_name,omitempty"` + TimeStamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` + LogLevel int32 `protobuf:"varint,4,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + Attributes map[string]string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` + Error *string `protobuf:"bytes,7,opt,name=error,proto3,oneof" json:"error,omitempty"` + Stack *string `protobuf:"bytes,8,opt,name=stack,proto3,oneof" json:"stack,omitempty"` } func (x *LogEvent) Reset() { @@ -230,9 +230,9 @@ func (*LogEvent) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_console_console_proto_rawDescGZIP(), []int{0} } -func (x *LogEvent) GetDeploymentName() string { +func (x *LogEvent) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -292,7 +292,7 @@ type CallEvent struct { unknownFields protoimpl.UnknownFields RequestName *string `protobuf:"bytes,1,opt,name=request_name,json=requestName,proto3,oneof" json:"request_name,omitempty"` - DeploymentName string `protobuf:"bytes,2,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + DeploymentKey string `protobuf:"bytes,2,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` TimeStamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` SourceVerbRef *schema.Ref `protobuf:"bytes,11,opt,name=source_verb_ref,json=sourceVerbRef,proto3,oneof" json:"source_verb_ref,omitempty"` DestinationVerbRef *schema.Ref `protobuf:"bytes,12,opt,name=destination_verb_ref,json=destinationVerbRef,proto3" json:"destination_verb_ref,omitempty"` @@ -342,9 +342,9 @@ func (x *CallEvent) GetRequestName() string { return "" } -func (x *CallEvent) GetDeploymentName() string { +func (x *CallEvent) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -410,7 +410,7 @@ type DeploymentCreatedEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"` ModuleName string `protobuf:"bytes,3,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` MinReplicas int32 `protobuf:"varint,4,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` @@ -449,9 +449,9 @@ func (*DeploymentCreatedEvent) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_console_console_proto_rawDescGZIP(), []int{2} } -func (x *DeploymentCreatedEvent) GetName() string { +func (x *DeploymentCreatedEvent) GetKey() string { if x != nil { - return x.Name + return x.Key } return "" } @@ -489,7 +489,7 @@ type DeploymentUpdatedEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` MinReplicas int32 `protobuf:"varint,2,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` PrevMinReplicas int32 `protobuf:"varint,3,opt,name=prev_min_replicas,json=prevMinReplicas,proto3" json:"prev_min_replicas,omitempty"` } @@ -526,9 +526,9 @@ func (*DeploymentUpdatedEvent) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_console_console_proto_rawDescGZIP(), []int{3} } -func (x *DeploymentUpdatedEvent) GetName() string { +func (x *DeploymentUpdatedEvent) GetKey() string { if x != nil { - return x.Name + return x.Key } return "" } @@ -670,12 +670,12 @@ type Module struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - DeploymentName string `protobuf:"bytes,2,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"` - Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` - Verbs []*Verb `protobuf:"bytes,5,rep,name=verbs,proto3" json:"verbs,omitempty"` - Data []*Data `protobuf:"bytes,6,rep,name=data,proto3" json:"data,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + DeploymentKey string `protobuf:"bytes,2,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"` + Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + Verbs []*Verb `protobuf:"bytes,5,rep,name=verbs,proto3" json:"verbs,omitempty"` + Data []*Data `protobuf:"bytes,6,rep,name=data,proto3" json:"data,omitempty"` } func (x *Module) Reset() { @@ -717,9 +717,9 @@ func (x *Module) GetName() string { return "" } -func (x *Module) GetDeploymentName() string { +func (x *Module) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -1281,7 +1281,7 @@ func (x *EventsQuery_LogLevelFilter) GetLogLevel() LogLevel { return LogLevel_LOG_LEVEL_UNKNOWN } -// Filters events by deployment name. +// Filters events by deployment key. type EventsQuery_DeploymentFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1787,322 +1787,321 @@ var file_xyz_block_ftl_v1_console_console_proto_rawDesc = []byte{ 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x74, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x03, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, - 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x52, 0x0a, 0x0a, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x1a, - 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 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, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x22, 0x9a, 0x04, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x49, 0x0a, - 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x5f, 0x72, 0x65, 0x66, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x52, 0x65, 0x66, 0x48, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, - 0x72, 0x62, 0x52, 0x65, 0x66, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x5f, 0x72, 0x65, 0x66, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x52, 0x65, 0x66, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x65, 0x66, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x12, 0x0a, 0x10, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x5f, 0x72, 0x65, 0x66, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, - 0x22, 0xba, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, - 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x22, 0x7b, 0x0a, - 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, - 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x2a, - 0x0a, 0x11, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x4d, - 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x04, 0x56, - 0x65, 0x72, 0x62, 0x12, 0x31, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, 0x72, 0x62, - 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2e, - 0x0a, 0x13, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6a, 0x73, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x51, - 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x22, 0xe3, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x34, 0x0a, - 0x05, 0x76, 0x65, 0x72, 0x62, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x78, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x03, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x39, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x52, 0x0a, 0x0a, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, + 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 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, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x22, 0x98, 0x04, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x39, + 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x49, 0x0a, 0x0f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x66, + 0x48, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x62, 0x52, 0x65, + 0x66, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x66, + 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, + 0x62, 0x52, 0x65, 0x66, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x5f, 0x72, 0x65, 0x66, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xb8, 0x01, 0x0a, + 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, + 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x22, 0x79, 0x0a, 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6d, + 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x31, 0x0a, 0x04, 0x76, + 0x65, 0x72, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2e, 0x0a, 0x13, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x51, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x05, 0x76, 0x65, - 0x72, 0x62, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xcc, - 0x0c, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x46, - 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x41, 0x0a, 0x05, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x1a, - 0x23, 0x0a, 0x0b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x51, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xe1, 0x01, 0x0a, 0x06, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x65, 0x72, 0x62, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x56, 0x65, + 0x72, 0x62, 0x52, 0x05, 0x76, 0x65, 0x72, 0x62, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, + 0x6c, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x13, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x50, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, - 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x34, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x2b, 0x0a, - 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x57, 0x0a, 0x0f, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, - 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x1a, 0xaa, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, - 0x18, 0x01, 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, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, - 0x18, 0x02, 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, 0x48, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, 0x88, - 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, - 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, - 0x1a, 0x73, 0x0a, 0x08, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0a, - 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x24, 0x0a, 0x0b, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0a, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, 0x54, - 0x68, 0x61, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, - 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, - 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x1a, 0x99, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, - 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, - 0x56, 0x65, 0x72, 0x62, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x42, - 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x05, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x53, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x5a, 0x0a, 0x0b, - 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0xcc, 0x0c, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x41, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x51, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x0b, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x35, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x23, 0x0a, 0x0b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x51, 0x0a, 0x0e, 0x4c, 0x6f, + 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x34, 0x0a, + 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0x2b, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x1a, 0x57, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x1a, 0xaa, 0x01, 0x0a, 0x0a, 0x54, 0x69, + 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x65, + 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x18, 0x01, 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, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x65, + 0x72, 0x54, 0x68, 0x61, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x65, + 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x18, 0x02, 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, 0x48, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x65, + 0x72, 0x54, 0x68, 0x61, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6f, 0x6c, 0x64, + 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6e, 0x65, 0x77, 0x65, + 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x1a, 0x73, 0x0a, 0x08, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x54, + 0x68, 0x61, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, + 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0a, 0x68, + 0x69, 0x67, 0x68, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x1a, 0x99, 0x01, 0x0a, 0x0a, + 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x64, + 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x62, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, + 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x76, 0x65, 0x72, 0x62, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x49, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x53, 0x0a, + 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x12, 0x5a, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, + 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x51, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x12, 0x58, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, + 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x46, 0x0a, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x42, 0x08, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x1a, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x07, 0x0a, 0x03, 0x41, 0x53, 0x43, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x53, + 0x43, 0x10, 0x01, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, + 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x94, 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, + 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, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x03, 0x6c, + 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, + 0x6c, 0x6f, 0x67, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x61, + 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x61, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x74, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, + 0x73, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x47, 0x10, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x4c, 0x4c, + 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, + 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x88, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, + 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, + 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x44, + 0x45, 0x42, 0x55, 0x47, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, + 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, + 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x0d, 0x12, 0x13, + 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x11, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x22, 0x1a, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x53, - 0x43, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x53, 0x43, 0x10, 0x01, 0x22, 0xaf, 0x01, - 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x3b, - 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, + 0x02, 0x01, 0x12, 0x67, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, 0x0a, 0x10, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, - 0x4f, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, - 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x22, 0x94, 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 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, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, - 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x39, 0x0a, - 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0c, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x61, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, - 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x07, - 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x74, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, - 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x2a, 0x92, 0x01, - 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4c, 0x4f, 0x47, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, - 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, - 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, - 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, - 0x10, 0x04, 0x2a, 0x88, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x15, 0x0a, 0x11, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, - 0x56, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c, - 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x05, - 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, - 0x46, 0x4f, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, - 0x4c, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x11, 0x32, 0x97, 0x03, - 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x67, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, - 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x2b, 0x2e, 0x78, 0x79, 0x7a, + 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x50, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, - 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x3b, - 0x70, 0x62, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5f, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x1a, 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x50, 0x50, + 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, + 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, + 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x3b, 0x70, 0x62, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/protos/xyz/block/ftl/v1/console/console.proto b/backend/protos/xyz/block/ftl/v1/console/console.proto index 8917f78e5d..0f4f68568f 100644 --- a/backend/protos/xyz/block/ftl/v1/console/console.proto +++ b/backend/protos/xyz/block/ftl/v1/console/console.proto @@ -28,7 +28,7 @@ enum LogLevel { } message LogEvent { - string deployment_name = 1; + string deployment_key = 1; optional string request_name = 2; google.protobuf.Timestamp time_stamp = 3; int32 log_level = 4; @@ -40,7 +40,7 @@ message LogEvent { message CallEvent { optional string request_name = 1; - string deployment_name = 2; + string deployment_key = 2; google.protobuf.Timestamp time_stamp = 3; optional schema.Ref source_verb_ref = 11; schema.Ref destination_verb_ref = 12; @@ -54,7 +54,7 @@ message CallEvent { } message DeploymentCreatedEvent { - string name = 1; + string key = 1; string language = 2; string module_name = 3; int32 min_replicas = 4; @@ -62,7 +62,7 @@ message DeploymentCreatedEvent { } message DeploymentUpdatedEvent { - string name = 1; + string key = 1; int32 min_replicas = 2; int32 prev_min_replicas = 3; } @@ -80,7 +80,7 @@ message Data { message Module { string name = 1; - string deployment_name = 2; + string deployment_key = 2; string language = 3; string schema = 4; repeated Verb verbs = 5; @@ -102,7 +102,7 @@ message EventsQuery { message LogLevelFilter { LogLevel log_level = 1; } - // Filters events by deployment name. + // Filters events by deployment key. message DeploymentFilter { repeated string deployments = 1; } diff --git a/backend/protos/xyz/block/ftl/v1/ftl.pb.go b/backend/protos/xyz/block/ftl/v1/ftl.pb.go index e5b2aede98..5616184f24 100644 --- a/backend/protos/xyz/block/ftl/v1/ftl.pb.go +++ b/backend/protos/xyz/block/ftl/v1/ftl.pb.go @@ -580,8 +580,8 @@ type PullSchemaResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - ModuleName string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + ModuleName string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` // For deletes this will not be present. Schema *schema.Module `protobuf:"bytes,4,opt,name=schema,proto3,oneof" json:"schema,omitempty"` // If true there are more schema changes immediately following this one as part of the initial batch. @@ -622,9 +622,9 @@ func (*PullSchemaResponse) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{8} } -func (x *PullSchemaResponse) GetDeploymentName() string { +func (x *PullSchemaResponse) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -986,9 +986,9 @@ type CreateDeploymentResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` // Currently active deployment for this module, if any. - ActiveDeploymentName *string `protobuf:"bytes,2,opt,name=active_deployment_name,json=activeDeploymentName,proto3,oneof" json:"active_deployment_name,omitempty"` + ActiveDeploymentKey *string `protobuf:"bytes,2,opt,name=active_deployment_key,json=activeDeploymentKey,proto3,oneof" json:"active_deployment_key,omitempty"` } func (x *CreateDeploymentResponse) Reset() { @@ -1023,16 +1023,16 @@ func (*CreateDeploymentResponse) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{15} } -func (x *CreateDeploymentResponse) GetDeploymentName() string { +func (x *CreateDeploymentResponse) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } -func (x *CreateDeploymentResponse) GetActiveDeploymentName() string { - if x != nil && x.ActiveDeploymentName != nil { - return *x.ActiveDeploymentName +func (x *CreateDeploymentResponse) GetActiveDeploymentKey() string { + if x != nil && x.ActiveDeploymentKey != nil { + return *x.ActiveDeploymentKey } return "" } @@ -1042,8 +1042,8 @@ type GetDeploymentArtefactsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - HaveArtefacts []*DeploymentArtefact `protobuf:"bytes,2,rep,name=have_artefacts,json=haveArtefacts,proto3" json:"have_artefacts,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + HaveArtefacts []*DeploymentArtefact `protobuf:"bytes,2,rep,name=have_artefacts,json=haveArtefacts,proto3" json:"have_artefacts,omitempty"` } func (x *GetDeploymentArtefactsRequest) Reset() { @@ -1078,9 +1078,9 @@ func (*GetDeploymentArtefactsRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{16} } -func (x *GetDeploymentArtefactsRequest) GetDeploymentName() string { +func (x *GetDeploymentArtefactsRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -1152,7 +1152,7 @@ type GetDeploymentRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` } func (x *GetDeploymentRequest) Reset() { @@ -1187,9 +1187,9 @@ func (*GetDeploymentRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{18} } -func (x *GetDeploymentRequest) GetDeploymentName() string { +func (x *GetDeploymentRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -1380,8 +1380,8 @@ type UpdateDeployRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - MinReplicas int32 `protobuf:"varint,2,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + MinReplicas int32 `protobuf:"varint,2,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` } func (x *UpdateDeployRequest) Reset() { @@ -1416,9 +1416,9 @@ func (*UpdateDeployRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{22} } -func (x *UpdateDeployRequest) GetDeploymentName() string { +func (x *UpdateDeployRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -1473,8 +1473,8 @@ type ReplaceDeployRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - MinReplicas int32 `protobuf:"varint,2,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + MinReplicas int32 `protobuf:"varint,2,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` } func (x *ReplaceDeployRequest) Reset() { @@ -1509,9 +1509,9 @@ func (*ReplaceDeployRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{24} } -func (x *ReplaceDeployRequest) GetDeploymentName() string { +func (x *ReplaceDeployRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -1566,13 +1566,13 @@ type StreamDeploymentLogsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - RequestName *string `protobuf:"bytes,2,opt,name=request_name,json=requestName,proto3,oneof" json:"request_name,omitempty"` - TimeStamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` - LogLevel int32 `protobuf:"varint,4,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` - Attributes map[string]string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` - Error *string `protobuf:"bytes,7,opt,name=error,proto3,oneof" json:"error,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + RequestName *string `protobuf:"bytes,2,opt,name=request_name,json=requestName,proto3,oneof" json:"request_name,omitempty"` + TimeStamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` + LogLevel int32 `protobuf:"varint,4,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + Attributes map[string]string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` + Error *string `protobuf:"bytes,7,opt,name=error,proto3,oneof" json:"error,omitempty"` } func (x *StreamDeploymentLogsRequest) Reset() { @@ -1607,9 +1607,9 @@ func (*StreamDeploymentLogsRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{26} } -func (x *StreamDeploymentLogsRequest) GetDeploymentName() string { +func (x *StreamDeploymentLogsRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -1934,7 +1934,7 @@ type DeployRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` } func (x *DeployRequest) Reset() { @@ -1969,9 +1969,9 @@ func (*DeployRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{32} } -func (x *DeployRequest) GetDeploymentName() string { +func (x *DeployRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -2019,7 +2019,7 @@ type TerminateRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` } func (x *TerminateRequest) Reset() { @@ -2054,9 +2054,9 @@ func (*TerminateRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{34} } -func (x *TerminateRequest) GetDeploymentName() string { +func (x *TerminateRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -2066,7 +2066,7 @@ type ReserveRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` } func (x *ReserveRequest) Reset() { @@ -2101,9 +2101,9 @@ func (*ReserveRequest) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{35} } -func (x *ReserveRequest) GetDeploymentName() string { +func (x *ReserveRequest) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -2506,10 +2506,10 @@ type StatusResponse_IngressRoute struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeploymentName string `protobuf:"bytes,1,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` - Verb *schema.Ref `protobuf:"bytes,5,opt,name=verb,proto3" json:"verb,omitempty"` - Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` - Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` + DeploymentKey string `protobuf:"bytes,1,opt,name=deployment_key,json=deploymentKey,proto3" json:"deployment_key,omitempty"` + Verb *schema.Ref `protobuf:"bytes,5,opt,name=verb,proto3" json:"verb,omitempty"` + Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` } func (x *StatusResponse_IngressRoute) Reset() { @@ -2544,9 +2544,9 @@ func (*StatusResponse_IngressRoute) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_ftl_proto_rawDescGZIP(), []int{29, 3} } -func (x *StatusResponse_IngressRoute) GetDeploymentName() string { +func (x *StatusResponse_IngressRoute) GetDeploymentKey() string { if x != nil { - return x.DeploymentName + return x.DeploymentKey } return "" } @@ -2829,439 +2829,437 @@ var file_xyz_block_ftl_v1_ftl_proto_rawDesc = []byte{ 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x13, 0x0a, 0x11, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x12, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x82, 0x02, 0x0a, 0x12, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, + 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x72, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6d, 0x6f, 0x72, 0x65, 0x12, 0x47, 0x0a, 0x0b, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x22, 0x40, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, + 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, + 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x31, 0x0a, 0x15, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x16, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x60, + 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, + 0x66, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0xd7, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, - 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6d, 0x6f, 0x72, 0x65, 0x12, 0x47, - 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x22, 0x40, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, - 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, - 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x31, 0x0a, 0x15, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x30, - 0x0a, 0x16, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x22, 0x60, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, - 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, - 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x42, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x65, 0x66, - 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x42, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, + 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x18, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x37, + 0x0a, 0x15, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x13, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, + 0x79, 0x22, 0x93, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x4b, 0x0a, 0x0e, 0x68, 0x61, + 0x76, 0x65, 0x5f, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0d, 0x68, 0x61, 0x76, 0x65, 0x41, 0x72, + 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x78, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x09, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x88, 0x01, - 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x99, 0x01, 0x0a, - 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, - 0x17, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x68, 0x61, 0x76, 0x65, 0x5f, 0x61, 0x72, 0x74, 0x65, - 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x61, 0x72, 0x74, + 0x65, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, - 0x74, 0x52, 0x0d, 0x68, 0x61, 0x76, 0x65, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, - 0x22, 0x78, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x08, 0x61, 0x72, 0x74, 0x65, - 0x66, 0x61, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x3f, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x42, - 0x0a, 0x09, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, - 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, - 0x74, 0x73, 0x22, 0x84, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x52, 0x08, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x22, 0x3d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x22, 0x94, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x42, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, + 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22, 0x84, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x23, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x18, + 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, + 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x60, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb2, 0x03, 0x0a, + 0x1b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0a, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x5d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 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, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x6c, + 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, + 0x0f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x22, 0xf8, 0x09, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x52, 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x69, 0x6e, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x0d, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3e, + 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x73, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, + 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x1a, 0xee, 0x01, 0x0a, 0x06, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, + 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x23, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x61, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, - 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb4, 0x03, 0x0a, 0x1b, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0a, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x5d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 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, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, - 0x6c, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x27, - 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x5f, 0x69, - 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0xfa, 0x09, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x65, - 0x72, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x69, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x0d, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x3e, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, - 0x73, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x1a, 0xee, 0x01, 0x0a, 0x06, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, - 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x23, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0xf7, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, - 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, - 0x9b, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x76, 0x65, 0x72, - 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x2e, 0x52, 0x65, 0x66, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0x73, 0x0a, - 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xaf, 0x03, 0x0a, 0x13, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4b, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x6e, 0x0a, - 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0xda, 0x01, - 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, - 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x50, 0x0a, - 0x06, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6e, 0x6e, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x38, 0x0a, 0x0d, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x0a, 0x10, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x11, - 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2a, 0x5c, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x50, - 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x16, 0x0a, 0x12, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, - 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x45, 0x50, 0x4c, 0x4f, - 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x02, 0x2a, - 0x3b, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, - 0x5f, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x54, 0x52, - 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x44, 0x10, 0x01, 0x2a, 0x59, 0x0a, 0x0b, - 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x52, - 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, - 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x41, 0x53, 0x53, 0x49, - 0x47, 0x4e, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, - 0x5f, 0x44, 0x45, 0x41, 0x44, 0x10, 0x03, 0x32, 0xa0, 0x01, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x62, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0xf7, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x99, + 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, + 0x65, 0x66, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0x73, 0x0a, 0x05, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6e, + 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, + 0x14, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xaf, 0x03, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x6e, 0x0a, 0x0d, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, + 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0xda, 0x01, 0x0a, 0x07, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, + 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x50, 0x0a, 0x06, 0x72, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, + 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x39, 0x0a, 0x10, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x37, 0x0a, 0x0e, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x5c, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, + 0x44, 0x44, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, + 0x0a, 0x12, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x48, 0x41, + 0x4e, 0x47, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x3b, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, + 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, + 0x44, 0x10, 0x01, 0x2a, 0x59, 0x0a, 0x0b, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x4c, + 0x45, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x52, 0x45, + 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x55, 0x4e, 0x4e, + 0x45, 0x52, 0x5f, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, + 0x0b, 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x44, 0x10, 0x03, 0x32, 0xa0, + 0x01, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, + 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x45, 0x0a, 0x04, 0x43, 0x61, + 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0xf6, 0x0a, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, - 0x90, 0x02, 0x01, 0x12, 0x45, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf6, 0x0a, 0x0a, 0x11, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5a, 0x0a, 0x0b, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, - 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x12, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, - 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x63, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, - 0x63, 0x74, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x90, 0x02, 0x01, 0x12, 0x5a, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, + 0x12, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, + 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, - 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x60, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, - 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, - 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x65, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, - 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, + 0x63, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, + 0x5d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, + 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x14, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x12, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x28, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, - 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x50, 0x75, 0x6c, 0x6c, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x30, 0x01, 0x32, 0xd2, 0x02, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, + 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, + 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x77, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x59, 0x0a, 0x0a, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, - 0x01, 0x12, 0x4e, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x20, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x1f, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, - 0x0a, 0x09, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x44, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, - 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x66, 0x74, 0x6c, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, 0xd2, 0x02, 0x0a, 0x0d, 0x52, + 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, + 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x4e, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x12, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x12, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, + 0x44, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, + 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x3b, + 0x66, 0x74, 0x6c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/protos/xyz/block/ftl/v1/ftl.proto b/backend/protos/xyz/block/ftl/v1/ftl.proto index b430f6737b..e12bbfbc14 100644 --- a/backend/protos/xyz/block/ftl/v1/ftl.proto +++ b/backend/protos/xyz/block/ftl/v1/ftl.proto @@ -70,7 +70,7 @@ message GetSchemaResponse { message PullSchemaRequest {} message PullSchemaResponse { - string deployment_name = 1; + string deployment_key = 1; string module_name = 2; // For deletes this will not be present. optional schema.Module schema = 4; @@ -109,13 +109,13 @@ message CreateDeploymentRequest { optional google.protobuf.Struct labels = 3; } message CreateDeploymentResponse { - string deployment_name = 1; + string deployment_key = 1; // Currently active deployment for this module, if any. - optional string active_deployment_name = 2; + optional string active_deployment_key = 2; } message GetDeploymentArtefactsRequest { - string deployment_name = 1; + string deployment_key = 1; repeated DeploymentArtefact have_artefacts = 2; } message GetDeploymentArtefactsResponse { @@ -124,7 +124,7 @@ message GetDeploymentArtefactsResponse { } message GetDeploymentRequest { - string deployment_name = 1; + string deployment_key = 1; } message GetDeploymentResponse { schema.Module schema = 1; @@ -161,19 +161,19 @@ message RegisterRunnerRequest { message RegisterRunnerResponse {} message UpdateDeployRequest { - string deployment_name = 1; + string deployment_key = 1; int32 min_replicas = 2; } message UpdateDeployResponse {} message ReplaceDeployRequest { - string deployment_name = 1; + string deployment_key = 1; int32 min_replicas = 2; } message ReplaceDeployResponse {} message StreamDeploymentLogsRequest { - string deployment_name = 1; + string deployment_key = 1; optional string request_name = 2; google.protobuf.Timestamp time_stamp = 3; int32 log_level = 4; @@ -219,7 +219,7 @@ message StatusResponse { repeated Deployment deployments = 3; message IngressRoute { - string deployment_name = 1; + string deployment_key = 1; schema.Ref verb = 5; string method = 3; string path = 4; @@ -311,16 +311,16 @@ service ControllerService { } message DeployRequest { - string deployment_name = 1; + string deployment_key = 1; } message DeployResponse {} message TerminateRequest { - string deployment_name = 1; + string deployment_key = 1; } message ReserveRequest { - string deployment_name = 1; + string deployment_key = 1; } message ReserveResponse {} diff --git a/backend/protos/xyz/block/ftl/v1/mixins.go b/backend/protos/xyz/block/ftl/v1/mixins.go index 6f4ed170cb..9062f559e1 100644 --- a/backend/protos/xyz/block/ftl/v1/mixins.go +++ b/backend/protos/xyz/block/ftl/v1/mixins.go @@ -60,13 +60,13 @@ func (m *Metadata) Delete(key string) { m.Values = out } -func (r *RegisterRunnerRequest) DeploymentAsOptional() (optional.Option[model.DeploymentName], error) { +func (r *RegisterRunnerRequest) DeploymentAsOptional() (optional.Option[model.DeploymentKey], error) { if r.Deployment == nil { - return optional.None[model.DeploymentName](), nil + return optional.None[model.DeploymentKey](), nil } - key, err := model.ParseDeploymentName(*r.Deployment) + key, err := model.ParseDeploymentKey(*r.Deployment) if err != nil { - return optional.None[model.DeploymentName](), fmt.Errorf("%s: %w", "invalid deployment key", err) + return optional.None[model.DeploymentKey](), fmt.Errorf("%s: %w", "invalid deployment key", err) } return optional.Some(key), nil } diff --git a/backend/runner/runner.go b/backend/runner/runner.go index a3ca551f2a..cbc1cad9c5 100644 --- a/backend/runner/runner.go +++ b/backend/runner/runner.go @@ -112,7 +112,7 @@ var _ ftlv1connect.RunnerServiceHandler = (*Service)(nil) var _ ftlv1connect.VerbServiceHandler = (*Service)(nil) type deployment struct { - key model.DeploymentName + key model.DeploymentKey plugin *plugin.Plugin[ftlv1connect.VerbServiceClient] // Cancelled when plugin terminates ctx context.Context @@ -157,7 +157,7 @@ func (s *Service) Deploy(ctx context.Context, req *connect.Request[ftlv1.DeployR return nil, connect.NewError(connect.CodeUnavailable, fmt.Errorf("%s: %w", "failed to register runner", err)) } - key, err := model.ParseDeploymentName(req.Msg.DeploymentName) + key, err := model.ParseDeploymentKey(req.Msg.DeploymentKey) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s: %w", "invalid deployment key", err)) } @@ -185,7 +185,7 @@ func (s *Service) Deploy(ctx context.Context, req *connect.Request[ftlv1.DeployR } }() - gdResp, err := s.controllerClient.GetDeployment(ctx, connect.NewRequest(&ftlv1.GetDeploymentRequest{DeploymentName: req.Msg.DeploymentName})) + gdResp, err := s.controllerClient.GetDeployment(ctx, connect.NewRequest(&ftlv1.GetDeploymentRequest{DeploymentKey: req.Msg.DeploymentKey})) if err != nil { return nil, err } @@ -242,11 +242,11 @@ func (s *Service) Terminate(ctx context.Context, c *connect.Request[ftlv1.Termin if !ok { return nil, connect.NewError(connect.CodeNotFound, errors.New("no deployment")) } - deploymentName, err := model.ParseDeploymentName(c.Msg.DeploymentName) + deploymentKey, err := model.ParseDeploymentKey(c.Msg.DeploymentKey) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s: %w", "invalid deployment key", err)) } - if depl.key != deploymentName { + if depl.key != deploymentKey { return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("deployment key mismatch")) } @@ -275,7 +275,7 @@ func (s *Service) Terminate(ctx context.Context, c *connect.Request[ftlv1.Termin }), nil } -func (s *Service) makeDeployment(ctx context.Context, key model.DeploymentName, plugin *plugin.Plugin[ftlv1connect.VerbServiceClient]) *deployment { +func (s *Service) makeDeployment(ctx context.Context, key model.DeploymentKey, plugin *plugin.Plugin[ftlv1connect.VerbServiceClient]) *deployment { return &deployment{ ctx: ctx, key: key, @@ -289,11 +289,11 @@ func (s *Service) registrationLoop(ctx context.Context, send func(request *ftlv1 // Figure out the appropriate state. state := s.state.Load() var errPtr *string - var deploymentName *string + var deploymentKey *string depl, ok := s.deployment.Load().Get() if ok { dkey := depl.key.String() - deploymentName = &dkey + deploymentKey = &dkey select { case <-depl.ctx.Done(): state = ftlv1.RunnerState_RUNNER_IDLE @@ -314,7 +314,7 @@ func (s *Service) registrationLoop(ctx context.Context, send func(request *ftlv1 Key: s.key.String(), Endpoint: s.config.Advertise.String(), Labels: s.labels, - Deployment: deploymentName, + Deployment: deploymentKey, State: state, Error: errPtr, }) @@ -345,7 +345,7 @@ func (s *Service) streamLogsLoop(ctx context.Context, send func(request *ftlv1.S select { case entry := <-s.deploymentLogQueue: - deploymentName, ok := entry.Attributes["deployment"] + deploymentKey, ok := entry.Attributes["deployment"] if !ok { return fmt.Errorf("missing deployment key") } @@ -361,13 +361,13 @@ func (s *Service) streamLogsLoop(ctx context.Context, send func(request *ftlv1.S } err := send(&ftlv1.StreamDeploymentLogsRequest{ - RequestName: request, - DeploymentName: deploymentName, - TimeStamp: timestamppb.New(entry.Time), - LogLevel: int32(entry.Level.Severity()), - Attributes: entry.Attributes, - Message: entry.Message, - Error: errorString, + RequestName: request, + DeploymentKey: deploymentKey, + TimeStamp: timestamppb.New(entry.Time), + LogLevel: int32(entry.Level.Severity()), + Attributes: entry.Attributes, + Message: entry.Message, + Error: errorString, }) if err != nil { return err @@ -381,8 +381,8 @@ func (s *Service) streamLogsLoop(ctx context.Context, send func(request *ftlv1.S return nil } -func (s *Service) getDeploymentLogger(ctx context.Context, deploymentName model.DeploymentName) *log.Logger { - attrs := map[string]string{"deployment": deploymentName.String()} +func (s *Service) getDeploymentLogger(ctx context.Context, deploymentKey model.DeploymentKey) *log.Logger { + attrs := map[string]string{"deployment": deploymentKey.String()} if requestName, ok, _ := rpc.RequestNameFromContext(ctx); ok { attrs["request"] = requestName.String() } diff --git a/buildengine/deploy.go b/buildengine/deploy.go index ced1152336..59fd6b4742 100644 --- a/buildengine/deploy.go +++ b/buildengine/deploy.go @@ -89,14 +89,14 @@ func Deploy(ctx context.Context, module Module, replicas int32, waitForDeployOnl return err } - _, err = client.ReplaceDeploy(ctx, connect.NewRequest(&ftlv1.ReplaceDeployRequest{DeploymentName: resp.Msg.GetDeploymentName(), MinReplicas: replicas})) + _, err = client.ReplaceDeploy(ctx, connect.NewRequest(&ftlv1.ReplaceDeployRequest{DeploymentKey: resp.Msg.GetDeploymentKey(), MinReplicas: replicas})) if err != nil { return err } if waitForDeployOnline { - logger.Debugf("Waiting for deployment %s to become ready", resp.Msg.DeploymentName) - err = checkReadiness(ctx, client, resp.Msg.DeploymentName, replicas) + logger.Debugf("Waiting for deployment %s to become ready", resp.Msg.DeploymentKey) + err = checkReadiness(ctx, client, resp.Msg.DeploymentKey, replicas) if err != nil { return err } @@ -126,7 +126,7 @@ func teminateModuleDeployment(ctx context.Context, client ftlv1connect.Controlle } logger.Infof("Terminating deployment %s", key) - _, err = client.UpdateDeploy(ctx, connect.NewRequest(&ftlv1.UpdateDeployRequest{DeploymentName: key})) + _, err = client.UpdateDeploy(ctx, connect.NewRequest(&ftlv1.UpdateDeployRequest{DeploymentKey: key})) return err } @@ -229,7 +229,7 @@ func relToCWD(path string) string { return rel } -func checkReadiness(ctx context.Context, client DeployClient, deploymentName string, replicas int32) error { +func checkReadiness(ctx context.Context, client DeployClient, deploymentKey string, replicas int32) error { ticker := time.NewTicker(time.Second) defer ticker.Stop() @@ -245,7 +245,7 @@ func checkReadiness(ctx context.Context, client DeployClient, deploymentName str var found bool for _, deployment := range status.Msg.Deployments { - if deployment.Key == deploymentName { + if deployment.Key == deploymentKey { found = true if deployment.Replicas >= replicas { return nil @@ -253,7 +253,7 @@ func checkReadiness(ctx context.Context, client DeployClient, deploymentName str } } if !found { - return fmt.Errorf("deployment %s not found: %v", deploymentName, status.Msg.Deployments) + return fmt.Errorf("deployment %s not found: %v", deploymentKey, status.Msg.Deployments) } case <-ctx.Done(): return ctx.Err() diff --git a/buildengine/deploy_test.go b/buildengine/deploy_test.go index 6e87372ace..f4b1c3fc35 100644 --- a/buildengine/deploy_test.go +++ b/buildengine/deploy_test.go @@ -15,7 +15,7 @@ import ( type mockDeployClient struct { MissingDigests []string - DeploymentName string + DeploymentKey string } func (m *mockDeployClient) GetArtefactDiffs(context.Context, *connect.Request[ftlv1.GetArtefactDiffsRequest]) (*connect.Response[ftlv1.GetArtefactDiffsResponse], error) { @@ -30,7 +30,7 @@ func (m *mockDeployClient) UploadArtefact(ctx context.Context, req *connect.Requ } func (m *mockDeployClient) CreateDeployment(context.Context, *connect.Request[ftlv1.CreateDeploymentRequest]) (*connect.Response[ftlv1.CreateDeploymentResponse], error) { - return connect.NewResponse(&ftlv1.CreateDeploymentResponse{DeploymentName: m.DeploymentName}), nil + return connect.NewResponse(&ftlv1.CreateDeploymentResponse{DeploymentKey: m.DeploymentKey}), nil } func (m *mockDeployClient) ReplaceDeploy(context.Context, *connect.Request[ftlv1.ReplaceDeployRequest]) (*connect.Response[ftlv1.ReplaceDeployResponse], error) { @@ -40,7 +40,7 @@ func (m *mockDeployClient) ReplaceDeploy(context.Context, *connect.Request[ftlv1 func (m *mockDeployClient) Status(context.Context, *connect.Request[ftlv1.StatusRequest]) (*connect.Response[ftlv1.StatusResponse], error) { resp := &ftlv1.StatusResponse{ Deployments: []*ftlv1.StatusResponse_Deployment{ - {Key: m.DeploymentName, Replicas: 1}, + {Key: m.DeploymentKey, Replicas: 1}, }, } return connect.NewResponse(resp), nil @@ -76,7 +76,7 @@ func TestDeploy(t *testing.T) { client := &mockDeployClient{ MissingDigests: []string{sum.String()}, - DeploymentName: "test-deployment", + DeploymentKey: "test-deployment", } err = Deploy(ctx, module, int32(1), true, client) diff --git a/cmd/ftl/cmd_download.go b/cmd/ftl/cmd_download.go index 766bd7463c..65fd3e3bbd 100644 --- a/cmd/ftl/cmd_download.go +++ b/cmd/ftl/cmd_download.go @@ -13,8 +13,8 @@ import ( ) type downloadCmd struct { - Dest string `short:"d" help:"Destination directory." default:"."` - Deployment model.DeploymentName `help:"Deployment to download." arg:""` + Dest string `short:"d" help:"Destination directory." default:"."` + Deployment model.DeploymentKey `help:"Deployment to download." arg:""` } func (d *downloadCmd) Run(ctx context.Context, client ftlv1connect.ControllerServiceClient) error { diff --git a/cmd/ftl/cmd_kill.go b/cmd/ftl/cmd_kill.go index 158ee34840..458be0ab14 100644 --- a/cmd/ftl/cmd_kill.go +++ b/cmd/ftl/cmd_kill.go @@ -11,11 +11,11 @@ import ( ) type killCmd struct { - Deployment model.DeploymentName `arg:"" help:"Deployment to kill."` + Deployment model.DeploymentKey `arg:"" help:"Deployment to kill."` } func (k *killCmd) Run(ctx context.Context, client ftlv1connect.ControllerServiceClient) error { - _, err := client.UpdateDeploy(ctx, connect.NewRequest(&ftlv1.UpdateDeployRequest{DeploymentName: k.Deployment.String()})) + _, err := client.UpdateDeploy(ctx, connect.NewRequest(&ftlv1.UpdateDeployRequest{DeploymentKey: k.Deployment.String()})) if err != nil { return err } diff --git a/cmd/ftl/cmd_update.go b/cmd/ftl/cmd_update.go index f0fd5835e6..5c92f9cfa2 100644 --- a/cmd/ftl/cmd_update.go +++ b/cmd/ftl/cmd_update.go @@ -11,14 +11,14 @@ import ( ) type updateCmd struct { - Replicas int32 `short:"n" help:"Number of replicas to deploy." default:"1"` - Deployment model.DeploymentName `arg:"" help:"Deployment to update."` + Replicas int32 `short:"n" help:"Number of replicas to deploy." default:"1"` + Deployment model.DeploymentKey `arg:"" help:"Deployment to update."` } func (u *updateCmd) Run(ctx context.Context, client ftlv1connect.ControllerServiceClient) error { _, err := client.UpdateDeploy(ctx, connect.NewRequest(&ftlv1.UpdateDeployRequest{ - DeploymentName: u.Deployment.String(), - MinReplicas: u.Replicas, + DeploymentKey: u.Deployment.String(), + MinReplicas: u.Replicas, })) if err != nil { return err diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 71e1a5ca67..41a5f1a52a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -15,8 +15,8 @@ export const App = () => { } /> } /> - } /> - } /> + } /> + } /> } /> diff --git a/frontend/src/features/deployments/DeploymentCard.tsx b/frontend/src/features/deployments/DeploymentCard.tsx index c3d72a6145..018bc853e0 100644 --- a/frontend/src/features/deployments/DeploymentCard.tsx +++ b/frontend/src/features/deployments/DeploymentCard.tsx @@ -7,28 +7,28 @@ import { Module } from '../../protos/xyz/block/ftl/v1/console/console_pb' import { modulesContext } from '../../providers/modules-provider' import { deploymentTextColor } from './deployment.utils' -export const DeploymentCard = ({ deploymentName, className }: { deploymentName: string; className?: string }) => { +export const DeploymentCard = ({ deploymentKey, className }: { deploymentKey: string; className?: string }) => { const navigate = useNavigate() const { modules } = useContext(modulesContext) const [module, setModule] = useState() useEffect(() => { if (modules) { - const module = modules.find((module) => module.deploymentName === deploymentName) + const module = modules.find((module) => module.deploymentKey === deploymentKey) setModule(module) } }, [modules]) return ( navigate(`/deployments/${deploymentName}`)} + onClick={() => navigate(`/deployments/${deploymentKey}`)} >
-

{deploymentName}

+

{deploymentKey}

diff --git a/frontend/src/features/deployments/DeploymentPage.tsx b/frontend/src/features/deployments/DeploymentPage.tsx index eef3cdb19a..23900dc5c2 100644 --- a/frontend/src/features/deployments/DeploymentPage.tsx +++ b/frontend/src/features/deployments/DeploymentPage.tsx @@ -17,7 +17,7 @@ const timeSettings = { isTailing: true, isPaused: false } export const DeploymentPage = () => { const navigate = useNavigate() - const { deploymentName } = useParams() + const { deploymentKey } = useParams() const modules = useContext(modulesContext) const notification = useContext(NotificationsContext) const navgation = useNavigate() @@ -25,22 +25,22 @@ export const DeploymentPage = () => { const [calls, setCalls] = useState([]) const filters = useMemo(() => { - if (!module?.deploymentName) return [] + if (!module?.deploymentKey) return [] - return [modulesFilter([module.deploymentName])] - }, [module?.deploymentName]) + return [modulesFilter([module.deploymentKey])] + }, [module?.deploymentKey]) useEffect(() => { - if (modules.modules.length > 0 && deploymentName) { - let module = modules.modules.find((module) => module.deploymentName === deploymentName) + if (modules.modules.length > 0 && deploymentKey) { + let module = modules.modules.find((module) => module.deploymentKey === deploymentKey) if (!module) { - const lastIndex = deploymentName.lastIndexOf('-') + const lastIndex = deploymentKey.lastIndexOf('-') if (lastIndex !== -1) { - module = modules.modules.find((module) => module.name === deploymentName.substring(0, lastIndex)) - navgation(`/deployments/${module?.deploymentName}`) + module = modules.modules.find((module) => module.name === deploymentKey.substring(0, lastIndex)) + navgation(`/deployments/${module?.deploymentKey}`) notification.showNotification({ title: 'Showing latest deployment', - message: `The previous deployment of ${module?.deploymentName} was not found. Showing the latest deployment of ${module?.name} instead.`, + message: `The previous deployment of ${module?.deploymentKey} was not found. Showing the latest deployment of ${module?.name} instead.`, type: NotificationType.Info, }) setModule(module) @@ -49,7 +49,7 @@ export const DeploymentPage = () => { setModule(module) } } - }, [modules, deploymentName]) + }, [modules, deploymentKey]) useEffect(() => { if (!module) return @@ -79,7 +79,7 @@ export const DeploymentPage = () => { const handleCallClick = (verb: Ref) => { const module = modules?.modules.find((module) => module.name === verb.module) if (module) { - navigate(`/deployments/${module.deploymentName}/verbs/${verb.name}`) + navigate(`/deployments/${module.deploymentKey}/verbs/${verb.name}`) } } @@ -88,7 +88,7 @@ export const DeploymentPage = () => { } - title={module?.deploymentName || 'Loading...'} + title={module?.deploymentKey || 'Loading...'} breadcrumbs={[{ label: 'Deployments', link: '/deployments' }]} /> @@ -100,7 +100,7 @@ export const DeploymentPage = () => { navigate(`/deployments/${module.deploymentName}/verbs/${verb.verb?.name}`)} + onClick={() => navigate(`/deployments/${module.deploymentKey}/verbs/${verb.verb?.name}`)} > {verb.verb?.name}

{verb.verb?.name}

@@ -118,7 +118,7 @@ export const DeploymentPage = () => {
- {module?.deploymentName && } + {module?.deploymentKey && }
diff --git a/frontend/src/features/deployments/DeploymentsPage.tsx b/frontend/src/features/deployments/DeploymentsPage.tsx index 8189090b0a..228bf8b214 100644 --- a/frontend/src/features/deployments/DeploymentsPage.tsx +++ b/frontend/src/features/deployments/DeploymentsPage.tsx @@ -13,7 +13,7 @@ export const DeploymentsPage = () => {
{modules.modules.map((module) => ( - + ))}
diff --git a/frontend/src/features/timeline/Timeline.tsx b/frontend/src/features/timeline/Timeline.tsx index 89f7727c1b..309cdd5021 100644 --- a/frontend/src/features/timeline/Timeline.tsx +++ b/frontend/src/features/timeline/Timeline.tsx @@ -118,16 +118,16 @@ export const Timeline = ({ timeSettings, filters }: { timeSettings: TimeSettings setSearchParams({ ...Object.fromEntries(searchParams.entries()), id: entry.id.toString() }) } - const deploymentName = (event: Event) => { + const deploymentKey = (event: Event) => { switch (event.entry?.case) { case 'call': - return event.entry.value.deploymentName + return event.entry.value.deploymentKey case 'log': - return event.entry.value.deploymentName + return event.entry.value.deploymentKey case 'deploymentCreated': - return event.entry.value.name + return event.entry.value.key case 'deploymentUpdated': - return event.entry.value.name + return event.entry.value.key default: return '' } @@ -165,12 +165,12 @@ export const Timeline = ({ timeSettings, filters }: { timeSettings: TimeSettings {formatTimestampShort(entry.timeStamp)} - {deploymentName(entry)} + {deploymentKey(entry)} {(() => { diff --git a/frontend/src/features/timeline/TimelineDeploymentCreated.tsx b/frontend/src/features/timeline/TimelineDeploymentCreated.tsx index 85058b8d65..e4eeee229f 100644 --- a/frontend/src/features/timeline/TimelineDeploymentCreated.tsx +++ b/frontend/src/features/timeline/TimelineDeploymentCreated.tsx @@ -3,7 +3,7 @@ import { DeploymentCreatedEvent } from '../../protos/xyz/block/ftl/v1/console/co export const TimelineDeploymentCreated = ({ deployment }: { deployment: DeploymentCreatedEvent }) => { return ( <> - Created deployment {deployment.name} for language{' '} + Created deployment {deployment.key} for language{' '} {deployment.language} ) diff --git a/frontend/src/features/timeline/TimelineDeploymentUpdated.tsx b/frontend/src/features/timeline/TimelineDeploymentUpdated.tsx index 44ba850b97..f55009e7d9 100644 --- a/frontend/src/features/timeline/TimelineDeploymentUpdated.tsx +++ b/frontend/src/features/timeline/TimelineDeploymentUpdated.tsx @@ -3,7 +3,7 @@ import { DeploymentUpdatedEvent } from '../../protos/xyz/block/ftl/v1/console/co export const TimelineDeploymentUpdated = ({ deployment }: { deployment: DeploymentUpdatedEvent }) => { return ( <> - Updated deployment {deployment.name} min replicas to{' '} + Updated deployment {deployment.key} min replicas to{' '} {deployment.minReplicas} (previously{' '} {deployment.prevMinReplicas}) diff --git a/frontend/src/features/timeline/details/TimelineCallDetails.tsx b/frontend/src/features/timeline/details/TimelineCallDetails.tsx index 76e3aad3bb..b2e9a63382 100644 --- a/frontend/src/features/timeline/details/TimelineCallDetails.tsx +++ b/frontend/src/features/timeline/details/TimelineCallDetails.tsx @@ -89,7 +89,7 @@ export const TimelineCallDetails = ({ timestamp, call }: { timestamp: Timestamp; )} - +
    {selectedCall.requestName && ( diff --git a/frontend/src/features/timeline/details/TimelineDeploymentCreatedDetails.tsx b/frontend/src/features/timeline/details/TimelineDeploymentCreatedDetails.tsx index 781d89b3c0..bd21401da1 100644 --- a/frontend/src/features/timeline/details/TimelineDeploymentCreatedDetails.tsx +++ b/frontend/src/features/timeline/details/TimelineDeploymentCreatedDetails.tsx @@ -34,7 +34,7 @@ export const TimelineDeploymentCreatedDetails = ({ - +
    • diff --git a/frontend/src/features/timeline/details/TimelineDeploymentUpdatedDetails.tsx b/frontend/src/features/timeline/details/TimelineDeploymentUpdatedDetails.tsx index 3584d8d006..c0a19923de 100644 --- a/frontend/src/features/timeline/details/TimelineDeploymentUpdatedDetails.tsx +++ b/frontend/src/features/timeline/details/TimelineDeploymentUpdatedDetails.tsx @@ -34,11 +34,11 @@ export const TimelineDeploymentUpdatedDetails = ({ - +
      • - +
      • diff --git a/frontend/src/features/timeline/details/TimelineLogDetails.tsx b/frontend/src/features/timeline/details/TimelineLogDetails.tsx index 0e489ca77a..52e3a9a5c6 100644 --- a/frontend/src/features/timeline/details/TimelineLogDetails.tsx +++ b/frontend/src/features/timeline/details/TimelineLogDetails.tsx @@ -32,7 +32,7 @@ export const TimelineLogDetails = ({ event, log }: { event: Event; log: LogEvent

        Attributes

        - +
          {log.requestName && ( diff --git a/frontend/src/features/timeline/filters/TimelineFilterPanel.tsx b/frontend/src/features/timeline/filters/TimelineFilterPanel.tsx index 4fe1052b92..660b9000f1 100644 --- a/frontend/src/features/timeline/filters/TimelineFilterPanel.tsx +++ b/frontend/src/features/timeline/filters/TimelineFilterPanel.tsx @@ -52,7 +52,7 @@ export const TimelineFilterPanel = ({ if (modules.modules.length === 0) { return } - const newModules = modules.modules.map((module) => module.deploymentName) + const newModules = modules.modules.map((module) => module.deploymentKey) const addedModules = newModules.filter((name) => !previousModules.includes(name)) if (addedModules.length > 0) { @@ -85,11 +85,11 @@ export const TimelineFilterPanel = ({ } } - const handleModuleChanged = (deploymentName: string, checked: boolean) => { + const handleModuleChanged = (deploymentKey: string, checked: boolean) => { if (checked) { - setSelectedModules((prev) => [...prev, deploymentName]) + setSelectedModules((prev) => [...prev, deploymentKey]) } else { - setSelectedModules((prev) => prev.filter((filter) => filter !== deploymentName)) + setSelectedModules((prev) => prev.filter((filter) => filter !== deploymentKey)) } } @@ -155,7 +155,7 @@ export const TimelineFilterPanel = ({
          {modules.modules.map((module) => ( -
          +
          handleModuleChanged(module.deploymentName, e.target.checked)} + checked={selectedModules.includes(module.deploymentKey)} + onChange={(e) => handleModuleChanged(module.deploymentKey, e.target.checked)} className='h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600 cursor-pointer' />
          -
          diff --git a/frontend/src/features/verbs/VerbPage.tsx b/frontend/src/features/verbs/VerbPage.tsx index 87feaff710..cbb9097824 100644 --- a/frontend/src/features/verbs/VerbPage.tsx +++ b/frontend/src/features/verbs/VerbPage.tsx @@ -11,7 +11,7 @@ import { CallList } from '../calls/CallList' import { VerbForm } from './VerbForm' export const VerbPage = () => { - const { deploymentName, verbName } = useParams() + const { deploymentKey, verbName } = useParams() const modules = useContext(modulesContext) const [module, setModule] = useState() const [verb, setVerb] = useState() @@ -19,12 +19,12 @@ export const VerbPage = () => { useEffect(() => { if (modules) { - const module = modules.modules.find((module) => module.deploymentName === deploymentName?.toLocaleLowerCase()) + const module = modules.modules.find((module) => module.deploymentKey === deploymentKey?.toLocaleLowerCase()) setModule(module) const verb = module?.verbs.find((verb) => verb.verb?.name.toLocaleLowerCase() === verbName?.toLocaleLowerCase()) setVerb(verb) } - }, [modules, deploymentName]) + }, [modules, deploymentKey]) useEffect(() => { const abortController = new AbortController() @@ -56,7 +56,7 @@ export const VerbPage = () => { title={verb?.verb?.name || ''} breadcrumbs={[ { label: 'Deployments', link: '/deployments' }, - { label: module?.deploymentName || '', link: `/deployments/${module?.deploymentName}` }, + { label: module?.deploymentKey || '', link: `/deployments/${module?.deploymentKey}` }, ]} /> diff --git a/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts b/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts index 80cf212e5d..4749091c08 100644 --- a/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts +++ b/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts @@ -94,9 +94,9 @@ proto3.util.setEnumType(LogLevel, "xyz.block.ftl.v1.console.LogLevel", [ */ export class LogEvent extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: optional string request_name = 2; @@ -141,7 +141,7 @@ export class LogEvent extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.console.LogEvent"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "request_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 3, name: "time_stamp", kind: "message", T: Timestamp }, { no: 4, name: "log_level", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, @@ -178,9 +178,9 @@ export class CallEvent extends Message { requestName?: string; /** - * @generated from field: string deployment_name = 2; + * @generated from field: string deployment_key = 2; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: google.protobuf.Timestamp time_stamp = 3; @@ -231,7 +231,7 @@ export class CallEvent extends Message { static readonly typeName = "xyz.block.ftl.v1.console.CallEvent"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "request_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "time_stamp", kind: "message", T: Timestamp }, { no: 11, name: "source_verb_ref", kind: "message", T: Ref, opt: true }, { no: 12, name: "destination_verb_ref", kind: "message", T: Ref }, @@ -264,9 +264,9 @@ export class CallEvent extends Message { */ export class DeploymentCreatedEvent extends Message { /** - * @generated from field: string name = 1; + * @generated from field: string key = 1; */ - name = ""; + key = ""; /** * @generated from field: string language = 2; @@ -296,7 +296,7 @@ export class DeploymentCreatedEvent extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.console.DeploymentCreatedEvent"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "module_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, @@ -325,9 +325,9 @@ export class DeploymentCreatedEvent extends Message { */ export class DeploymentUpdatedEvent extends Message { /** - * @generated from field: string name = 1; + * @generated from field: string key = 1; */ - name = ""; + key = ""; /** * @generated from field: int32 min_replicas = 2; @@ -347,7 +347,7 @@ export class DeploymentUpdatedEvent extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.console.DeploymentUpdatedEvent"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, { no: 3, name: "prev_min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, ]); @@ -471,9 +471,9 @@ export class Module extends Message { name = ""; /** - * @generated from field: string deployment_name = 2; + * @generated from field: string deployment_key = 2; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: string language = 3; @@ -504,7 +504,7 @@ export class Module extends Message { static readonly typeName = "xyz.block.ftl.v1.console.Module"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "verbs", kind: "message", T: Verb, repeated: true }, @@ -746,7 +746,7 @@ export class EventsQuery_LogLevelFilter extends Message { */ export class PullSchemaResponse extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: string module_name = 2; @@ -529,7 +529,7 @@ export class PullSchemaResponse extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.PullSchemaResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "module_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "schema", kind: "message", T: Module, opt: true }, { no: 3, name: "more", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, @@ -814,16 +814,16 @@ export class CreateDeploymentRequest extends Message { */ export class CreateDeploymentResponse extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * Currently active deployment for this module, if any. * - * @generated from field: optional string active_deployment_name = 2; + * @generated from field: optional string active_deployment_key = 2; */ - activeDeploymentName?: string; + activeDeploymentKey?: string; constructor(data?: PartialMessage) { super(); @@ -833,8 +833,8 @@ export class CreateDeploymentResponse extends Message static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.CreateDeploymentResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "active_deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "active_deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): CreateDeploymentResponse { @@ -859,9 +859,9 @@ export class CreateDeploymentResponse extends Message */ export class GetDeploymentArtefactsRequest extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: repeated xyz.block.ftl.v1.DeploymentArtefact have_artefacts = 2; @@ -876,7 +876,7 @@ export class GetDeploymentArtefactsRequest extends Message [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "have_artefacts", kind: "message", T: DeploymentArtefact, repeated: true }, ]); @@ -945,9 +945,9 @@ export class GetDeploymentArtefactsResponse extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; constructor(data?: PartialMessage) { super(); @@ -957,7 +957,7 @@ export class GetDeploymentRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.GetDeploymentRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetDeploymentRequest { @@ -1125,9 +1125,9 @@ export class RegisterRunnerResponse extends Message { */ export class UpdateDeployRequest extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: int32 min_replicas = 2; @@ -1142,7 +1142,7 @@ export class UpdateDeployRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.UpdateDeployRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, ]); @@ -1199,9 +1199,9 @@ export class UpdateDeployResponse extends Message { */ export class ReplaceDeployRequest extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: int32 min_replicas = 2; @@ -1216,7 +1216,7 @@ export class ReplaceDeployRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.ReplaceDeployRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, ]); @@ -1273,9 +1273,9 @@ export class ReplaceDeployResponse extends Message { */ export class StreamDeploymentLogsRequest extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: optional string request_name = 2; @@ -1315,7 +1315,7 @@ export class StreamDeploymentLogsRequest extends Message [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "request_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 3, name: "time_stamp", kind: "message", T: Timestamp }, { no: 4, name: "log_level", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, @@ -1682,9 +1682,9 @@ export class StatusResponse_Deployment extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; /** * @generated from field: xyz.block.ftl.v1.schema.Ref verb = 5; @@ -1709,7 +1709,7 @@ export class StatusResponse_IngressRoute extends Message [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "verb", kind: "message", T: Ref }, { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -1964,9 +1964,9 @@ export class ProcessListResponse_Process extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; constructor(data?: PartialMessage) { super(); @@ -1976,7 +1976,7 @@ export class DeployRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.DeployRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): DeployRequest { @@ -2032,9 +2032,9 @@ export class DeployResponse extends Message { */ export class TerminateRequest extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; constructor(data?: PartialMessage) { super(); @@ -2044,7 +2044,7 @@ export class TerminateRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.TerminateRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TerminateRequest { @@ -2069,9 +2069,9 @@ export class TerminateRequest extends Message { */ export class ReserveRequest extends Message { /** - * @generated from field: string deployment_name = 1; + * @generated from field: string deployment_key = 1; */ - deploymentName = ""; + deploymentKey = ""; constructor(data?: PartialMessage) { super(); @@ -2081,7 +2081,7 @@ export class ReserveRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1.ReserveRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "deployment_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): ReserveRequest { diff --git a/internal/download/download.go b/internal/download/download.go index 00dabbecac..3586be07e5 100644 --- a/internal/download/download.go +++ b/internal/download/download.go @@ -16,10 +16,10 @@ import ( ) // Artefacts downloads artefacts for a deployment from the Controller. -func Artefacts(ctx context.Context, client ftlv1connect.ControllerServiceClient, name model.DeploymentName, dest string) error { +func Artefacts(ctx context.Context, client ftlv1connect.ControllerServiceClient, key model.DeploymentKey, dest string) error { logger := log.FromContext(ctx) stream, err := client.GetDeploymentArtefacts(ctx, connect.NewRequest(&ftlv1.GetDeploymentArtefactsRequest{ - DeploymentName: name.String(), + DeploymentKey: key.String(), })) if err != nil { return err diff --git a/internal/model/deployment_key.go b/internal/model/deployment_key.go new file mode 100644 index 0000000000..370b6fb70b --- /dev/null +++ b/internal/model/deployment_key.go @@ -0,0 +1,86 @@ +package model + +import ( + "crypto/rand" + "database/sql" + "database/sql/driver" + "encoding" + "fmt" + "strings" +) + +type DeploymentKey struct { + module string + hash string +} + +var _ interface { + sql.Scanner + driver.Valuer + encoding.TextUnmarshaler + encoding.TextMarshaler +} = (*DeploymentKey)(nil) + +func NewDeploymentKey(module string) DeploymentKey { + hash := make([]byte, 5) + _, err := rand.Read(hash) + if err != nil { + panic(err) + } + return DeploymentKey{module: module, hash: fmt.Sprintf("%010x", hash)} +} + +func ParseDeploymentKey(input string) (DeploymentKey, error) { + parts := strings.Split(input, "-") + if len(parts) < 2 { + return DeploymentKey{}, fmt.Errorf("invalid deployment key %q: does not follow - pattern", input) + } + + module := strings.Join(parts[0:len(parts)-1], "-") + if len(module) == 0 { + return DeploymentKey{}, fmt.Errorf("invalid deployment key %q: module name should not be empty", input) + } + + hash := parts[len(parts)-1] + if len(hash) != 10 { + return DeploymentKey{}, fmt.Errorf("invalid deployment key %q: hash should be 10 hex characters long", input) + } + + return DeploymentKey{ + module: module, + hash: parts[len(parts)-1], + }, nil +} + +func (d *DeploymentKey) String() string { + return fmt.Sprintf("%s-%s", d.module, d.hash) +} + +func (d *DeploymentKey) UnmarshalText(bytes []byte) error { + key, err := ParseDeploymentKey(string(bytes)) + if err != nil { + return err + } + *d = key + return nil +} + +func (d *DeploymentKey) MarshalText() ([]byte, error) { + return []byte(d.String()), nil +} + +func (d *DeploymentKey) Scan(value any) error { + if value == nil { + return nil + } + key, err := ParseDeploymentKey(value.(string)) + if err != nil { + return err + } + *d = key + return nil +} + +func (d DeploymentKey) Value() (driver.Value, error) { + return d.String(), nil +} diff --git a/internal/model/deployment_name_test.go b/internal/model/deployment_key_test.go similarity index 78% rename from internal/model/deployment_name_test.go rename to internal/model/deployment_key_test.go index 3c84aa9f26..2dbb0e8130 100644 --- a/internal/model/deployment_name_test.go +++ b/internal/model/deployment_key_test.go @@ -7,7 +7,7 @@ import ( "github.com/alecthomas/assert/v2" ) -func TestDeploymentName(t *testing.T) { +func TestDeploymentKey(t *testing.T) { for _, test := range []struct { str string // when full string is known strPrefix string // when only prefix is known @@ -23,14 +23,14 @@ func TestDeploymentName(t *testing.T) { {str: "module-with-hyphens-0011223344", module: "module-with-hyphens", hash: "0011223344"}, {str: "-", decodeErr: true}, } { - decoded, decodeErr := ParseDeploymentName(test.str) + decoded, decodeErr := ParseDeploymentKey(test.str) if test.decodeErr { - assert.Error(t, decodeErr, "expected error for deployment name %q", test.str) + assert.Error(t, decodeErr, "expected error for deployment key %q", test.str) } else { - created := NewDeploymentName(test.module) + created := NewDeploymentKey(test.module) - forceEncoded := DeploymentName{ + forceEncoded := DeploymentKey{ module: test.module, hash: test.hash, } @@ -54,7 +54,7 @@ func TestDeploymentName(t *testing.T) { } } -func TestZeroDeploymentName(t *testing.T) { - _, err := ParseDeploymentName("") - assert.Error(t, err, "expected error for empty deployment name") +func TestZeroDeploymentKey(t *testing.T) { + _, err := ParseDeploymentKey("") + assert.Error(t, err, "expected error for empty deployment key") } diff --git a/internal/model/deployment_name.go b/internal/model/deployment_name.go deleted file mode 100644 index 4e66e7bad5..0000000000 --- a/internal/model/deployment_name.go +++ /dev/null @@ -1,86 +0,0 @@ -package model - -import ( - "crypto/rand" - "database/sql" - "database/sql/driver" - "encoding" - "fmt" - "strings" -) - -type DeploymentName struct { - module string - hash string -} - -var _ interface { - sql.Scanner - driver.Valuer - encoding.TextUnmarshaler - encoding.TextMarshaler -} = (*DeploymentName)(nil) - -func NewDeploymentName(module string) DeploymentName { - hash := make([]byte, 5) - _, err := rand.Read(hash) - if err != nil { - panic(err) - } - return DeploymentName{module: module, hash: fmt.Sprintf("%010x", hash)} -} - -func ParseDeploymentName(name string) (DeploymentName, error) { - parts := strings.Split(name, "-") - if len(parts) < 2 { - return DeploymentName{}, fmt.Errorf("invalid deployment name %q: does not follow - pattern", name) - } - - module := strings.Join(parts[0:len(parts)-1], "-") - if len(module) == 0 { - return DeploymentName{}, fmt.Errorf("invalid deployment name %q: module name should not be empty", name) - } - - hash := parts[len(parts)-1] - if len(hash) != 10 { - return DeploymentName{}, fmt.Errorf("invalid deployment name %q: hash should be 10 hex characters long", name) - } - - return DeploymentName{ - module: module, - hash: parts[len(parts)-1], - }, nil -} - -func (d *DeploymentName) String() string { - return fmt.Sprintf("%s-%s", d.module, d.hash) -} - -func (d *DeploymentName) UnmarshalText(bytes []byte) error { - name, err := ParseDeploymentName(string(bytes)) - if err != nil { - return err - } - *d = name - return nil -} - -func (d *DeploymentName) MarshalText() ([]byte, error) { - return []byte(d.String()), nil -} - -func (d *DeploymentName) Scan(value any) error { - if value == nil { - return nil - } - name, err := ParseDeploymentName(value.(string)) - if err != nil { - return err - } - *d = name - return nil -} - -func (d DeploymentName) Value() (driver.Value, error) { - return d.String(), nil -} diff --git a/internal/model/model.go b/internal/model/model.go index 1622bf0f19..eb8b585496 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -13,7 +13,7 @@ import ( type Deployment struct { Module string Language string - Name DeploymentName + Key DeploymentKey Schema *schema.Module Artefacts []*Artefact } diff --git a/sqlc.yaml b/sqlc.yaml index 6c90ab4b19..f05bc23f07 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -36,12 +36,12 @@ sql: nullable: true go_type: type: "NullRunnerKey" - - db_type: "deployment_name" - go_type: "github.com/TBD54566975/ftl/internal/model.DeploymentName" - - db_type: "deployment_name" + - db_type: "deployment_key" + go_type: "github.com/TBD54566975/ftl/internal/model.DeploymentKey" + - db_type: "deployment_key" nullable: true go_type: - type: "NullDeploymentName" + type: "NullDeploymentKey" - db_type: "controller_key" go_type: "github.com/TBD54566975/ftl/internal/model.ControllerKey" - db_type: "text" @@ -72,7 +72,7 @@ sql: - column: "controller.key" go_type: "github.com/TBD54566975/ftl/internal/model.ControllerKey" - column: "deployments.name" - go_type: "github.com/TBD54566975/ftl/internal/model.DeploymentName" + go_type: "github.com/TBD54566975/ftl/internal/model.DeploymentKey" - column: "events.payload" go_type: "encoding/json.RawMessage" rules: