diff --git a/.changeset/shiny-hornets-appear.md b/.changeset/shiny-hornets-appear.md new file mode 100644 index 00000000..2c3cd1f3 --- /dev/null +++ b/.changeset/shiny-hornets-appear.md @@ -0,0 +1,5 @@ +--- +"@common-fate/sdk": minor +--- + +Add CancelBackgroundJob and ListBackgroundJobs RPCs for managing background jobs. diff --git a/gen/commonfate/control/diagnostic/v1alpha1/diagnostic.pb.go b/gen/commonfate/control/diagnostic/v1alpha1/diagnostic.pb.go index 049e2e3d..5683848b 100644 --- a/gen/commonfate/control/diagnostic/v1alpha1/diagnostic.pb.go +++ b/gen/commonfate/control/diagnostic/v1alpha1/diagnostic.pb.go @@ -21,6 +21,70 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type JobState int32 + +const ( + JobState_JOB_STATE_UNSPECIFIED JobState = 0 + JobState_JOB_STATE_AVAILABLE JobState = 1 + JobState_JOB_STATE_CANCELLED JobState = 2 + JobState_JOB_STATE_COMPLETED JobState = 3 + JobState_JOB_STATE_DISCARDED JobState = 4 + JobState_JOB_STATE_RETRYABLE JobState = 5 + JobState_JOB_STATE_RUNNING JobState = 6 + JobState_JOB_STATE_SCHEDULED JobState = 7 +) + +// Enum value maps for JobState. +var ( + JobState_name = map[int32]string{ + 0: "JOB_STATE_UNSPECIFIED", + 1: "JOB_STATE_AVAILABLE", + 2: "JOB_STATE_CANCELLED", + 3: "JOB_STATE_COMPLETED", + 4: "JOB_STATE_DISCARDED", + 5: "JOB_STATE_RETRYABLE", + 6: "JOB_STATE_RUNNING", + 7: "JOB_STATE_SCHEDULED", + } + JobState_value = map[string]int32{ + "JOB_STATE_UNSPECIFIED": 0, + "JOB_STATE_AVAILABLE": 1, + "JOB_STATE_CANCELLED": 2, + "JOB_STATE_COMPLETED": 3, + "JOB_STATE_DISCARDED": 4, + "JOB_STATE_RETRYABLE": 5, + "JOB_STATE_RUNNING": 6, + "JOB_STATE_SCHEDULED": 7, + } +) + +func (x JobState) Enum() *JobState { + p := new(JobState) + *p = x + return p +} + +func (x JobState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobState) Descriptor() protoreflect.EnumDescriptor { + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_enumTypes[0].Descriptor() +} + +func (JobState) Type() protoreflect.EnumType { + return &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_enumTypes[0] +} + +func (x JobState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobState.Descriptor instead. +func (JobState) EnumDescriptor() ([]byte, []int) { + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{0} +} + type GetOAuthTokenMetadataRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -169,6 +233,411 @@ func (x *OAuthTokenMetadata) GetExpiresAt() *timestamppb.Timestamp { return nil } +type ListBackgroundJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optionally filter jobs by kind, supplying an empty list will return jobs for all kinds + Kinds []string `protobuf:"bytes,1,rep,name=kinds,proto3" json:"kinds,omitempty"` + // by default requests will return upp to 100 jobs, set this between 1 and 10000 to retrieve more jobs + Count *int64 `protobuf:"varint,2,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The job state to filter for + State JobState `protobuf:"varint,3,opt,name=state,proto3,enum=commonfate.control.diagnostic.v1alpha1.JobState" json:"state,omitempty"` +} + +func (x *ListBackgroundJobsRequest) Reset() { + *x = ListBackgroundJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBackgroundJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBackgroundJobsRequest) ProtoMessage() {} + +func (x *ListBackgroundJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBackgroundJobsRequest.ProtoReflect.Descriptor instead. +func (*ListBackgroundJobsRequest) Descriptor() ([]byte, []int) { + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{3} +} + +func (x *ListBackgroundJobsRequest) GetKinds() []string { + if x != nil { + return x.Kinds + } + return nil +} + +func (x *ListBackgroundJobsRequest) GetCount() int64 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +func (x *ListBackgroundJobsRequest) GetState() JobState { + if x != nil { + return x.State + } + return JobState_JOB_STATE_UNSPECIFIED +} + +type ListBackgroundJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` +} + +func (x *ListBackgroundJobsResponse) Reset() { + *x = ListBackgroundJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBackgroundJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBackgroundJobsResponse) ProtoMessage() {} + +func (x *ListBackgroundJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBackgroundJobsResponse.ProtoReflect.Descriptor instead. +func (*ListBackgroundJobsResponse) Descriptor() ([]byte, []int) { + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{4} +} + +func (x *ListBackgroundJobsResponse) GetJobs() []*Job { + if x != nil { + return x.Jobs + } + return nil +} + +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Attempt is the attempt number of the job. Jobs are inserted at 0, the + // number is incremented to 1 the first time work its worked, and may + // increment further if it's either snoozed or errors. + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + // AttemptedAt is the time that the job was last worked. Starts out as `nil` + // on a new insert. + AttemptedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=attempted_at,json=attemptedAt,proto3" json:"attempted_at,omitempty"` + // AttemptedBy is the set of client IDs that have worked this job. + AttemptedBy []string `protobuf:"bytes,4,rep,name=attempted_by,json=attemptedBy,proto3" json:"attempted_by,omitempty"` + // CreatedAt is when the job record was created. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // EncodedArgs is the job's JobArgs encoded as JSON. + EncodedArgs []byte `protobuf:"bytes,6,opt,name=encoded_args,json=encodedArgs,proto3" json:"encoded_args,omitempty"` + // Errors is a set of errors that occurred when the job was worked, one for + // each attempt. Ordered from earliest error to the latest error. + Errors []*AttemptError `protobuf:"bytes,7,rep,name=errors,proto3" json:"errors,omitempty"` + // FinalizedAt is the time at which the job was "finalized", meaning it was + // either completed successfully or errored for the last time such that + // it'll no longer be retried. + FinalizedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=finalized_at,json=finalizedAt,proto3" json:"finalized_at,omitempty"` + // Kind uniquely identifies the type of job and instructs which worker + // should work it. It is set at insertion time via `Kind()` on the + // `JobArgs`. + Kind string `protobuf:"bytes,9,opt,name=kind,proto3" json:"kind,omitempty"` + // MaxAttempts is the maximum number of attempts that the job will be tried + // before it errors for the last time and will no longer be worked. + // + // Extracted (in order of precedence) from job-specific InsertOpts + // on Insert, from the worker level InsertOpts from JobArgsWithInsertOpts, + // or from a client's default value. + MaxAttempts int64 `protobuf:"varint,10,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"` + // Metadata is a field for storing arbitrary metadata on a job. It should + // always be a valid JSON object payload, and users should not overwrite or + // remove anything stored in this field by River. + Metadata []byte `protobuf:"bytes,11,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Priority is the priority of the job, with 1 being the highest priority and + // 4 being the lowest. When fetching available jobs to work, the highest + // priority jobs will always be fetched before any lower priority jobs are + // fetched. Note that if your workers are swamped with more high-priority jobs + // then they can handle, lower priority jobs may not be fetched. + Priority int64 `protobuf:"varint,12,opt,name=priority,proto3" json:"priority,omitempty"` + // Queue is the name of the queue where the job will be worked. Queues can + // be configured independently and be used to isolate jobs. + // + // Extracted from either specific InsertOpts on Insert, or InsertOpts from + // JobArgsWithInsertOpts, or a client's default value. + Queue string `protobuf:"bytes,13,opt,name=queue,proto3" json:"queue,omitempty"` + // ScheduledAt is when the job is scheduled to become available to be + // worked. Jobs default to running immediately, but may be scheduled + // for the future when they're inserted. They may also be scheduled for + // later because they were snoozed or because they errored and have + // additional retry attempts remaining. + ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"` + // State is the state of job like `available` or `completed`. Jobs are + // `available` when they're first inserted. + State string `protobuf:"bytes,15,opt,name=state,proto3" json:"state,omitempty"` + // Tags are an arbitrary list of keywords to add to the job. They have no + // functional behavior and are meant entirely as a user-specified construct + // to help group and categorize jobs. + Tags []string `protobuf:"bytes,16,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{5} +} + +func (x *Job) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Job) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *Job) GetAttemptedAt() *timestamppb.Timestamp { + if x != nil { + return x.AttemptedAt + } + return nil +} + +func (x *Job) GetAttemptedBy() []string { + if x != nil { + return x.AttemptedBy + } + return nil +} + +func (x *Job) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Job) GetEncodedArgs() []byte { + if x != nil { + return x.EncodedArgs + } + return nil +} + +func (x *Job) GetErrors() []*AttemptError { + if x != nil { + return x.Errors + } + return nil +} + +func (x *Job) GetFinalizedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinalizedAt + } + return nil +} + +func (x *Job) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Job) GetMaxAttempts() int64 { + if x != nil { + return x.MaxAttempts + } + return 0 +} + +func (x *Job) GetMetadata() []byte { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Job) GetPriority() int64 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *Job) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *Job) GetScheduledAt() *timestamppb.Timestamp { + if x != nil { + return x.ScheduledAt + } + return nil +} + +func (x *Job) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *Job) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +// AttemptError is an error from a single job attempt that failed due to an +// error or a panic. +type AttemptError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // At is the time at which the error occurred. + At *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=at,proto3" json:"at,omitempty"` + // Attempt is the attempt number on which the error occurred (maps to + // Attempt on a job row). + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + // Error contains the stringified error of an error returned from a job or a + // panic value in case of a panic. + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + // Trace contains a stack trace from a job that panicked. The trace is + // produced by invoking `debug.Trace()`. + Trace string `protobuf:"bytes,4,opt,name=trace,proto3" json:"trace,omitempty"` +} + +func (x *AttemptError) Reset() { + *x = AttemptError{} + if protoimpl.UnsafeEnabled { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttemptError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttemptError) ProtoMessage() {} + +func (x *AttemptError) ProtoReflect() protoreflect.Message { + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttemptError.ProtoReflect.Descriptor instead. +func (*AttemptError) Descriptor() ([]byte, []int) { + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{6} +} + +func (x *AttemptError) GetAt() *timestamppb.Timestamp { + if x != nil { + return x.At + } + return nil +} + +func (x *AttemptError) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *AttemptError) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *AttemptError) GetTrace() string { + if x != nil { + return x.Trace + } + return "" +} + // AllDiagnostics is used client-side to combine and serialise all collected diagnostics into a single JSON. type AllDiagnostics struct { state protoimpl.MessageState @@ -181,7 +650,7 @@ type AllDiagnostics struct { func (x *AllDiagnostics) Reset() { *x = AllDiagnostics{} if protoimpl.UnsafeEnabled { - mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[3] + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -194,7 +663,7 @@ func (x *AllDiagnostics) String() string { func (*AllDiagnostics) ProtoMessage() {} func (x *AllDiagnostics) ProtoReflect() protoreflect.Message { - mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[3] + mi := &file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -207,7 +676,7 @@ func (x *AllDiagnostics) ProtoReflect() protoreflect.Message { // Deprecated: Use AllDiagnostics.ProtoReflect.Descriptor instead. func (*AllDiagnostics) Descriptor() ([]byte, []int) { - return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{3} + return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP(), []int{7} } func (x *AllDiagnostics) GetOauthTokenMetadata() *GetOAuthTokenMetadataResponse { @@ -245,7 +714,70 @@ var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDesc = []byt 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 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, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x41, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x61, 0x67, 0x6e, + 0x73, 0x41, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x46, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, + 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5d, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, + 0x6f, 0x62, 0x73, 0x22, 0xea, 0x04, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x72, + 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x64, 0x41, 0x72, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, + 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x08, 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, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 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, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x22, 0x80, 0x01, 0x0a, 0x0c, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x2a, 0x0a, 0x02, 0x61, 0x74, 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, 0x02, 0x61, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x77, 0x0a, 0x14, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, @@ -253,41 +785,64 @@ var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDesc = []byt 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x12, 0x6f, 0x61, 0x75, - 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, - 0xbc, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, - 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x44, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, 0x74, - 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, - 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, - 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, + 0xd2, 0x01, 0x0a, 0x08, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x15, + 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, + 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, + 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, + 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x44, 0x49, 0x53, 0x43, 0x41, 0x52, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x4a, + 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x59, 0x41, 0x42, + 0x4c, 0x45, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x4a, + 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, + 0x45, 0x44, 0x10, 0x07, 0x32, 0xdc, 0x02, 0x0a, 0x11, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, + 0x74, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd2, - 0x02, 0x0a, 0x2a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, - 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x44, - 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2d, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2f, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, - 0x69, 0x63, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x44, - 0xaa, 0x02, 0x26, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, - 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x26, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x44, - 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xe2, 0x02, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x5c, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, - 0x69, 0x63, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x29, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x66, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3a, 0x3a, 0x44, - 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x9d, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x41, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xd2, 0x02, 0x0a, 0x2a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, + 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x0f, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2d, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x64, + 0x6b, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, + 0x74, 0x69, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x61, + 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x43, 0x44, 0xaa, 0x02, 0x26, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, + 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, + 0x26, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x5c, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5c, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x66, 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x44, 0x69, 0x61, + 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x29, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x3a, 0x3a, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -302,25 +857,41 @@ func file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescGZIP() return file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDescData } -var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_goTypes = []interface{}{ - (*GetOAuthTokenMetadataRequest)(nil), // 0: commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataRequest - (*GetOAuthTokenMetadataResponse)(nil), // 1: commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse - (*OAuthTokenMetadata)(nil), // 2: commonfate.control.diagnostic.v1alpha1.OAuthTokenMetadata - (*AllDiagnostics)(nil), // 3: commonfate.control.diagnostic.v1alpha1.AllDiagnostics - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp + (JobState)(0), // 0: commonfate.control.diagnostic.v1alpha1.JobState + (*GetOAuthTokenMetadataRequest)(nil), // 1: commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataRequest + (*GetOAuthTokenMetadataResponse)(nil), // 2: commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse + (*OAuthTokenMetadata)(nil), // 3: commonfate.control.diagnostic.v1alpha1.OAuthTokenMetadata + (*ListBackgroundJobsRequest)(nil), // 4: commonfate.control.diagnostic.v1alpha1.ListBackgroundJobsRequest + (*ListBackgroundJobsResponse)(nil), // 5: commonfate.control.diagnostic.v1alpha1.ListBackgroundJobsResponse + (*Job)(nil), // 6: commonfate.control.diagnostic.v1alpha1.Job + (*AttemptError)(nil), // 7: commonfate.control.diagnostic.v1alpha1.AttemptError + (*AllDiagnostics)(nil), // 8: commonfate.control.diagnostic.v1alpha1.AllDiagnostics + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp } var file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_depIdxs = []int32{ - 2, // 0: commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse.tokens:type_name -> commonfate.control.diagnostic.v1alpha1.OAuthTokenMetadata - 4, // 1: commonfate.control.diagnostic.v1alpha1.OAuthTokenMetadata.expires_at:type_name -> google.protobuf.Timestamp - 1, // 2: commonfate.control.diagnostic.v1alpha1.AllDiagnostics.oauth_token_metadata:type_name -> commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse - 0, // 3: commonfate.control.diagnostic.v1alpha1.DiagnosticService.GetOAuthTokenMetadata:input_type -> commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataRequest - 1, // 4: commonfate.control.diagnostic.v1alpha1.DiagnosticService.GetOAuthTokenMetadata:output_type -> commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 0: commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse.tokens:type_name -> commonfate.control.diagnostic.v1alpha1.OAuthTokenMetadata + 9, // 1: commonfate.control.diagnostic.v1alpha1.OAuthTokenMetadata.expires_at:type_name -> google.protobuf.Timestamp + 0, // 2: commonfate.control.diagnostic.v1alpha1.ListBackgroundJobsRequest.state:type_name -> commonfate.control.diagnostic.v1alpha1.JobState + 6, // 3: commonfate.control.diagnostic.v1alpha1.ListBackgroundJobsResponse.jobs:type_name -> commonfate.control.diagnostic.v1alpha1.Job + 9, // 4: commonfate.control.diagnostic.v1alpha1.Job.attempted_at:type_name -> google.protobuf.Timestamp + 9, // 5: commonfate.control.diagnostic.v1alpha1.Job.created_at:type_name -> google.protobuf.Timestamp + 7, // 6: commonfate.control.diagnostic.v1alpha1.Job.errors:type_name -> commonfate.control.diagnostic.v1alpha1.AttemptError + 9, // 7: commonfate.control.diagnostic.v1alpha1.Job.finalized_at:type_name -> google.protobuf.Timestamp + 9, // 8: commonfate.control.diagnostic.v1alpha1.Job.scheduled_at:type_name -> google.protobuf.Timestamp + 9, // 9: commonfate.control.diagnostic.v1alpha1.AttemptError.at:type_name -> google.protobuf.Timestamp + 2, // 10: commonfate.control.diagnostic.v1alpha1.AllDiagnostics.oauth_token_metadata:type_name -> commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse + 1, // 11: commonfate.control.diagnostic.v1alpha1.DiagnosticService.GetOAuthTokenMetadata:input_type -> commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataRequest + 4, // 12: commonfate.control.diagnostic.v1alpha1.DiagnosticService.ListBackgroundJobs:input_type -> commonfate.control.diagnostic.v1alpha1.ListBackgroundJobsRequest + 2, // 13: commonfate.control.diagnostic.v1alpha1.DiagnosticService.GetOAuthTokenMetadata:output_type -> commonfate.control.diagnostic.v1alpha1.GetOAuthTokenMetadataResponse + 5, // 14: commonfate.control.diagnostic.v1alpha1.DiagnosticService.ListBackgroundJobs:output_type -> commonfate.control.diagnostic.v1alpha1.ListBackgroundJobsResponse + 13, // [13:15] is the sub-list for method output_type + 11, // [11:13] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_init() } @@ -366,6 +937,54 @@ func file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_init() { } } file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBackgroundJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBackgroundJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttemptError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllDiagnostics); i { case 0: return &v.state @@ -378,18 +997,20 @@ func file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_init() { } } } + file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes[3].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, + NumEnums: 1, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, GoTypes: file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_goTypes, DependencyIndexes: file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_depIdxs, + EnumInfos: file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_enumTypes, MessageInfos: file_commonfate_control_diagnostic_v1alpha1_diagnostic_proto_msgTypes, }.Build() File_commonfate_control_diagnostic_v1alpha1_diagnostic_proto = out.File diff --git a/gen/commonfate/control/diagnostic/v1alpha1/diagnosticv1alpha1connect/diagnostic.connect.go b/gen/commonfate/control/diagnostic/v1alpha1/diagnosticv1alpha1connect/diagnostic.connect.go index 5007bc86..c976414a 100644 --- a/gen/commonfate/control/diagnostic/v1alpha1/diagnosticv1alpha1connect/diagnostic.connect.go +++ b/gen/commonfate/control/diagnostic/v1alpha1/diagnosticv1alpha1connect/diagnostic.connect.go @@ -36,12 +36,16 @@ const ( // DiagnosticServiceGetOAuthTokenMetadataProcedure is the fully-qualified name of the // DiagnosticService's GetOAuthTokenMetadata RPC. DiagnosticServiceGetOAuthTokenMetadataProcedure = "/commonfate.control.diagnostic.v1alpha1.DiagnosticService/GetOAuthTokenMetadata" + // DiagnosticServiceListBackgroundJobsProcedure is the fully-qualified name of the + // DiagnosticService's ListBackgroundJobs RPC. + DiagnosticServiceListBackgroundJobsProcedure = "/commonfate.control.diagnostic.v1alpha1.DiagnosticService/ListBackgroundJobs" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. var ( diagnosticServiceServiceDescriptor = v1alpha1.File_commonfate_control_diagnostic_v1alpha1_diagnostic_proto.Services().ByName("DiagnosticService") diagnosticServiceGetOAuthTokenMetadataMethodDescriptor = diagnosticServiceServiceDescriptor.Methods().ByName("GetOAuthTokenMetadata") + diagnosticServiceListBackgroundJobsMethodDescriptor = diagnosticServiceServiceDescriptor.Methods().ByName("ListBackgroundJobs") ) // DiagnosticServiceClient is a client for the @@ -49,6 +53,7 @@ var ( type DiagnosticServiceClient interface { // Retrieves metadata about the current OAuth2.0 tokens stored by Common Fate. GetOAuthTokenMetadata(context.Context, *connect.Request[v1alpha1.GetOAuthTokenMetadataRequest]) (*connect.Response[v1alpha1.GetOAuthTokenMetadataResponse], error) + ListBackgroundJobs(context.Context, *connect.Request[v1alpha1.ListBackgroundJobsRequest]) (*connect.Response[v1alpha1.ListBackgroundJobsResponse], error) } // NewDiagnosticServiceClient constructs a client for the @@ -68,12 +73,19 @@ func NewDiagnosticServiceClient(httpClient connect.HTTPClient, baseURL string, o connect.WithSchema(diagnosticServiceGetOAuthTokenMetadataMethodDescriptor), connect.WithClientOptions(opts...), ), + listBackgroundJobs: connect.NewClient[v1alpha1.ListBackgroundJobsRequest, v1alpha1.ListBackgroundJobsResponse]( + httpClient, + baseURL+DiagnosticServiceListBackgroundJobsProcedure, + connect.WithSchema(diagnosticServiceListBackgroundJobsMethodDescriptor), + connect.WithClientOptions(opts...), + ), } } // diagnosticServiceClient implements DiagnosticServiceClient. type diagnosticServiceClient struct { getOAuthTokenMetadata *connect.Client[v1alpha1.GetOAuthTokenMetadataRequest, v1alpha1.GetOAuthTokenMetadataResponse] + listBackgroundJobs *connect.Client[v1alpha1.ListBackgroundJobsRequest, v1alpha1.ListBackgroundJobsResponse] } // GetOAuthTokenMetadata calls @@ -82,11 +94,18 @@ func (c *diagnosticServiceClient) GetOAuthTokenMetadata(ctx context.Context, req return c.getOAuthTokenMetadata.CallUnary(ctx, req) } +// ListBackgroundJobs calls +// commonfate.control.diagnostic.v1alpha1.DiagnosticService.ListBackgroundJobs. +func (c *diagnosticServiceClient) ListBackgroundJobs(ctx context.Context, req *connect.Request[v1alpha1.ListBackgroundJobsRequest]) (*connect.Response[v1alpha1.ListBackgroundJobsResponse], error) { + return c.listBackgroundJobs.CallUnary(ctx, req) +} + // DiagnosticServiceHandler is an implementation of the // commonfate.control.diagnostic.v1alpha1.DiagnosticService service. type DiagnosticServiceHandler interface { // Retrieves metadata about the current OAuth2.0 tokens stored by Common Fate. GetOAuthTokenMetadata(context.Context, *connect.Request[v1alpha1.GetOAuthTokenMetadataRequest]) (*connect.Response[v1alpha1.GetOAuthTokenMetadataResponse], error) + ListBackgroundJobs(context.Context, *connect.Request[v1alpha1.ListBackgroundJobsRequest]) (*connect.Response[v1alpha1.ListBackgroundJobsResponse], error) } // NewDiagnosticServiceHandler builds an HTTP handler from the service implementation. It returns @@ -101,10 +120,18 @@ func NewDiagnosticServiceHandler(svc DiagnosticServiceHandler, opts ...connect.H connect.WithSchema(diagnosticServiceGetOAuthTokenMetadataMethodDescriptor), connect.WithHandlerOptions(opts...), ) + diagnosticServiceListBackgroundJobsHandler := connect.NewUnaryHandler( + DiagnosticServiceListBackgroundJobsProcedure, + svc.ListBackgroundJobs, + connect.WithSchema(diagnosticServiceListBackgroundJobsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) return "/commonfate.control.diagnostic.v1alpha1.DiagnosticService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case DiagnosticServiceGetOAuthTokenMetadataProcedure: diagnosticServiceGetOAuthTokenMetadataHandler.ServeHTTP(w, r) + case DiagnosticServiceListBackgroundJobsProcedure: + diagnosticServiceListBackgroundJobsHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -117,3 +144,7 @@ type UnimplementedDiagnosticServiceHandler struct{} func (UnimplementedDiagnosticServiceHandler) GetOAuthTokenMetadata(context.Context, *connect.Request[v1alpha1.GetOAuthTokenMetadataRequest]) (*connect.Response[v1alpha1.GetOAuthTokenMetadataResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("commonfate.control.diagnostic.v1alpha1.DiagnosticService.GetOAuthTokenMetadata is not implemented")) } + +func (UnimplementedDiagnosticServiceHandler) ListBackgroundJobs(context.Context, *connect.Request[v1alpha1.ListBackgroundJobsRequest]) (*connect.Response[v1alpha1.ListBackgroundJobsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("commonfate.control.diagnostic.v1alpha1.DiagnosticService.ListBackgroundJobs is not implemented")) +} diff --git a/gen/commonfate/control/integration/reset/v1alpha1/reset.pb.go b/gen/commonfate/control/integration/reset/v1alpha1/reset.pb.go index 4f7f35a5..36f02b39 100644 --- a/gen/commonfate/control/integration/reset/v1alpha1/reset.pb.go +++ b/gen/commonfate/control/integration/reset/v1alpha1/reset.pb.go @@ -10,7 +10,6 @@ import ( v1alpha1 "github.com/common-fate/sdk/gen/commonfate/entity/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/durationpb" reflect "reflect" sync "sync" ) @@ -203,6 +202,92 @@ func (*RemoveOAuthTokenResponse) Descriptor() ([]byte, []int) { return file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDescGZIP(), []int{3} } +type CancelBackgroundJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The job id to cancel + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CancelBackgroundJobRequest) Reset() { + *x = CancelBackgroundJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelBackgroundJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelBackgroundJobRequest) ProtoMessage() {} + +func (x *CancelBackgroundJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelBackgroundJobRequest.ProtoReflect.Descriptor instead. +func (*CancelBackgroundJobRequest) Descriptor() ([]byte, []int) { + return file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDescGZIP(), []int{4} +} + +func (x *CancelBackgroundJobRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type CancelBackgroundJobResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CancelBackgroundJobResponse) Reset() { + *x = CancelBackgroundJobResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelBackgroundJobResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelBackgroundJobResponse) ProtoMessage() {} + +func (x *CancelBackgroundJobResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelBackgroundJobResponse.ProtoReflect.Descriptor instead. +func (*CancelBackgroundJobResponse) Descriptor() ([]byte, []int) { + return file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDescGZIP(), []int{5} +} + var File_commonfate_control_integration_reset_v1alpha1_reset_proto protoreflect.FileDescriptor var file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDesc = []byte{ @@ -212,9 +297,7 @@ var file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDesc = []b 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x6d, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x24, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x61, 0x55, 0x73, @@ -231,52 +314,68 @@ var file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDesc = []b 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xdb, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x61, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x45, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, - 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x61, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x46, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x61, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa5, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x46, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, - 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, + 0x65, 0x22, 0x2c, 0x0a, 0x1a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x1d, 0x0a, 0x1b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8c, + 0x04, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xa2, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x61, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x12, 0x45, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x61, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x46, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x61, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0xa5, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, + 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x46, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x47, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xae, 0x01, 0x0a, + 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x49, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x41, 0x75, 0x74, 0x68, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0xf4, 0x02, 0x0a, 0x31, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, - 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2d, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x64, 0x6b, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x3b, 0x72, 0x65, 0x73, 0x65, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, - 0x02, 0x04, 0x43, 0x43, 0x49, 0x52, 0xaa, 0x02, 0x2d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, - 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x2d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, - 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x39, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, - 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x3a, - 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x4a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xf4, 0x02, + 0x0a, 0x31, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2d, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x2f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x04, + 0x43, 0x43, 0x49, 0x52, 0xaa, 0x02, 0x2d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, + 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x2d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, + 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x39, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, + 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -291,22 +390,26 @@ func file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDescGZIP( return file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDescData } -var file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_commonfate_control_integration_reset_v1alpha1_reset_proto_goTypes = []interface{}{ - (*ResetEntraUsersRequest)(nil), // 0: commonfate.control.integration.reset.v1alpha1.ResetEntraUsersRequest - (*ResetEntraUsersResponse)(nil), // 1: commonfate.control.integration.reset.v1alpha1.ResetEntraUsersResponse - (*RemoveOAuthTokenRequest)(nil), // 2: commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenRequest - (*RemoveOAuthTokenResponse)(nil), // 3: commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenResponse - (*v1alpha1.EID)(nil), // 4: commonfate.entity.v1alpha1.EID + (*ResetEntraUsersRequest)(nil), // 0: commonfate.control.integration.reset.v1alpha1.ResetEntraUsersRequest + (*ResetEntraUsersResponse)(nil), // 1: commonfate.control.integration.reset.v1alpha1.ResetEntraUsersResponse + (*RemoveOAuthTokenRequest)(nil), // 2: commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenRequest + (*RemoveOAuthTokenResponse)(nil), // 3: commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenResponse + (*CancelBackgroundJobRequest)(nil), // 4: commonfate.control.integration.reset.v1alpha1.CancelBackgroundJobRequest + (*CancelBackgroundJobResponse)(nil), // 5: commonfate.control.integration.reset.v1alpha1.CancelBackgroundJobResponse + (*v1alpha1.EID)(nil), // 6: commonfate.entity.v1alpha1.EID } var file_commonfate_control_integration_reset_v1alpha1_reset_proto_depIdxs = []int32{ - 4, // 0: commonfate.control.integration.reset.v1alpha1.ResetEntraUsersResponse.deleted_entities:type_name -> commonfate.entity.v1alpha1.EID + 6, // 0: commonfate.control.integration.reset.v1alpha1.ResetEntraUsersResponse.deleted_entities:type_name -> commonfate.entity.v1alpha1.EID 0, // 1: commonfate.control.integration.reset.v1alpha1.ResetService.ResetEntraUsers:input_type -> commonfate.control.integration.reset.v1alpha1.ResetEntraUsersRequest 2, // 2: commonfate.control.integration.reset.v1alpha1.ResetService.RemoveOAuthToken:input_type -> commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenRequest - 1, // 3: commonfate.control.integration.reset.v1alpha1.ResetService.ResetEntraUsers:output_type -> commonfate.control.integration.reset.v1alpha1.ResetEntraUsersResponse - 3, // 4: commonfate.control.integration.reset.v1alpha1.ResetService.RemoveOAuthToken:output_type -> commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 4, // 3: commonfate.control.integration.reset.v1alpha1.ResetService.CancelBackgroundJob:input_type -> commonfate.control.integration.reset.v1alpha1.CancelBackgroundJobRequest + 1, // 4: commonfate.control.integration.reset.v1alpha1.ResetService.ResetEntraUsers:output_type -> commonfate.control.integration.reset.v1alpha1.ResetEntraUsersResponse + 3, // 5: commonfate.control.integration.reset.v1alpha1.ResetService.RemoveOAuthToken:output_type -> commonfate.control.integration.reset.v1alpha1.RemoveOAuthTokenResponse + 5, // 6: commonfate.control.integration.reset.v1alpha1.ResetService.CancelBackgroundJob:output_type -> commonfate.control.integration.reset.v1alpha1.CancelBackgroundJobResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -366,6 +469,30 @@ func file_commonfate_control_integration_reset_v1alpha1_reset_proto_init() { return nil } } + file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelBackgroundJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commonfate_control_integration_reset_v1alpha1_reset_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelBackgroundJobResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -373,7 +500,7 @@ func file_commonfate_control_integration_reset_v1alpha1_reset_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_commonfate_control_integration_reset_v1alpha1_reset_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/commonfate/control/integration/reset/v1alpha1/resetv1alpha1connect/reset.connect.go b/gen/commonfate/control/integration/reset/v1alpha1/resetv1alpha1connect/reset.connect.go index 8d959ba9..3222c880 100644 --- a/gen/commonfate/control/integration/reset/v1alpha1/resetv1alpha1connect/reset.connect.go +++ b/gen/commonfate/control/integration/reset/v1alpha1/resetv1alpha1connect/reset.connect.go @@ -39,13 +39,17 @@ const ( // ResetServiceRemoveOAuthTokenProcedure is the fully-qualified name of the ResetService's // RemoveOAuthToken RPC. ResetServiceRemoveOAuthTokenProcedure = "/commonfate.control.integration.reset.v1alpha1.ResetService/RemoveOAuthToken" + // ResetServiceCancelBackgroundJobProcedure is the fully-qualified name of the ResetService's + // CancelBackgroundJob RPC. + ResetServiceCancelBackgroundJobProcedure = "/commonfate.control.integration.reset.v1alpha1.ResetService/CancelBackgroundJob" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. var ( - resetServiceServiceDescriptor = v1alpha1.File_commonfate_control_integration_reset_v1alpha1_reset_proto.Services().ByName("ResetService") - resetServiceResetEntraUsersMethodDescriptor = resetServiceServiceDescriptor.Methods().ByName("ResetEntraUsers") - resetServiceRemoveOAuthTokenMethodDescriptor = resetServiceServiceDescriptor.Methods().ByName("RemoveOAuthToken") + resetServiceServiceDescriptor = v1alpha1.File_commonfate_control_integration_reset_v1alpha1_reset_proto.Services().ByName("ResetService") + resetServiceResetEntraUsersMethodDescriptor = resetServiceServiceDescriptor.Methods().ByName("ResetEntraUsers") + resetServiceRemoveOAuthTokenMethodDescriptor = resetServiceServiceDescriptor.Methods().ByName("RemoveOAuthToken") + resetServiceCancelBackgroundJobMethodDescriptor = resetServiceServiceDescriptor.Methods().ByName("CancelBackgroundJob") ) // ResetServiceClient is a client for the commonfate.control.integration.reset.v1alpha1.ResetService @@ -54,6 +58,8 @@ type ResetServiceClient interface { ResetEntraUsers(context.Context, *connect.Request[v1alpha1.ResetEntraUsersRequest]) (*connect.Response[v1alpha1.ResetEntraUsersResponse], error) // Removes an OAuth2.0 token from an installed integration from Common Fate. RemoveOAuthToken(context.Context, *connect.Request[v1alpha1.RemoveOAuthTokenRequest]) (*connect.Response[v1alpha1.RemoveOAuthTokenResponse], error) + // Cancels all current background tasks for a given kind. + CancelBackgroundJob(context.Context, *connect.Request[v1alpha1.CancelBackgroundJobRequest]) (*connect.Response[v1alpha1.CancelBackgroundJobResponse], error) } // NewResetServiceClient constructs a client for the @@ -79,13 +85,20 @@ func NewResetServiceClient(httpClient connect.HTTPClient, baseURL string, opts . connect.WithSchema(resetServiceRemoveOAuthTokenMethodDescriptor), connect.WithClientOptions(opts...), ), + cancelBackgroundJob: connect.NewClient[v1alpha1.CancelBackgroundJobRequest, v1alpha1.CancelBackgroundJobResponse]( + httpClient, + baseURL+ResetServiceCancelBackgroundJobProcedure, + connect.WithSchema(resetServiceCancelBackgroundJobMethodDescriptor), + connect.WithClientOptions(opts...), + ), } } // resetServiceClient implements ResetServiceClient. type resetServiceClient struct { - resetEntraUsers *connect.Client[v1alpha1.ResetEntraUsersRequest, v1alpha1.ResetEntraUsersResponse] - removeOAuthToken *connect.Client[v1alpha1.RemoveOAuthTokenRequest, v1alpha1.RemoveOAuthTokenResponse] + resetEntraUsers *connect.Client[v1alpha1.ResetEntraUsersRequest, v1alpha1.ResetEntraUsersResponse] + removeOAuthToken *connect.Client[v1alpha1.RemoveOAuthTokenRequest, v1alpha1.RemoveOAuthTokenResponse] + cancelBackgroundJob *connect.Client[v1alpha1.CancelBackgroundJobRequest, v1alpha1.CancelBackgroundJobResponse] } // ResetEntraUsers calls commonfate.control.integration.reset.v1alpha1.ResetService.ResetEntraUsers. @@ -99,12 +112,20 @@ func (c *resetServiceClient) RemoveOAuthToken(ctx context.Context, req *connect. return c.removeOAuthToken.CallUnary(ctx, req) } +// CancelBackgroundJob calls +// commonfate.control.integration.reset.v1alpha1.ResetService.CancelBackgroundJob. +func (c *resetServiceClient) CancelBackgroundJob(ctx context.Context, req *connect.Request[v1alpha1.CancelBackgroundJobRequest]) (*connect.Response[v1alpha1.CancelBackgroundJobResponse], error) { + return c.cancelBackgroundJob.CallUnary(ctx, req) +} + // ResetServiceHandler is an implementation of the // commonfate.control.integration.reset.v1alpha1.ResetService service. type ResetServiceHandler interface { ResetEntraUsers(context.Context, *connect.Request[v1alpha1.ResetEntraUsersRequest]) (*connect.Response[v1alpha1.ResetEntraUsersResponse], error) // Removes an OAuth2.0 token from an installed integration from Common Fate. RemoveOAuthToken(context.Context, *connect.Request[v1alpha1.RemoveOAuthTokenRequest]) (*connect.Response[v1alpha1.RemoveOAuthTokenResponse], error) + // Cancels all current background tasks for a given kind. + CancelBackgroundJob(context.Context, *connect.Request[v1alpha1.CancelBackgroundJobRequest]) (*connect.Response[v1alpha1.CancelBackgroundJobResponse], error) } // NewResetServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -125,12 +146,20 @@ func NewResetServiceHandler(svc ResetServiceHandler, opts ...connect.HandlerOpti connect.WithSchema(resetServiceRemoveOAuthTokenMethodDescriptor), connect.WithHandlerOptions(opts...), ) + resetServiceCancelBackgroundJobHandler := connect.NewUnaryHandler( + ResetServiceCancelBackgroundJobProcedure, + svc.CancelBackgroundJob, + connect.WithSchema(resetServiceCancelBackgroundJobMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) return "/commonfate.control.integration.reset.v1alpha1.ResetService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case ResetServiceResetEntraUsersProcedure: resetServiceResetEntraUsersHandler.ServeHTTP(w, r) case ResetServiceRemoveOAuthTokenProcedure: resetServiceRemoveOAuthTokenHandler.ServeHTTP(w, r) + case ResetServiceCancelBackgroundJobProcedure: + resetServiceCancelBackgroundJobHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -147,3 +176,7 @@ func (UnimplementedResetServiceHandler) ResetEntraUsers(context.Context, *connec func (UnimplementedResetServiceHandler) RemoveOAuthToken(context.Context, *connect.Request[v1alpha1.RemoveOAuthTokenRequest]) (*connect.Response[v1alpha1.RemoveOAuthTokenResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("commonfate.control.integration.reset.v1alpha1.ResetService.RemoveOAuthToken is not implemented")) } + +func (UnimplementedResetServiceHandler) CancelBackgroundJob(context.Context, *connect.Request[v1alpha1.CancelBackgroundJobRequest]) (*connect.Response[v1alpha1.CancelBackgroundJobResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("commonfate.control.integration.reset.v1alpha1.ResetService.CancelBackgroundJob is not implemented")) +} diff --git a/proto/commonfate/control/diagnostic/v1alpha1/diagnostic.proto b/proto/commonfate/control/diagnostic/v1alpha1/diagnostic.proto index 360550b8..872e792a 100644 --- a/proto/commonfate/control/diagnostic/v1alpha1/diagnostic.proto +++ b/proto/commonfate/control/diagnostic/v1alpha1/diagnostic.proto @@ -7,23 +7,147 @@ import "google/protobuf/timestamp.proto"; // The Diagnostics service contains APIs to query for read-only diagnostic // information associated with a Common Fate deployment. service DiagnosticService { - // Retrieves metadata about the current OAuth2.0 tokens stored by Common Fate. - rpc GetOAuthTokenMetadata(GetOAuthTokenMetadataRequest) returns (GetOAuthTokenMetadataResponse) {} + // Retrieves metadata about the current OAuth2.0 tokens stored by Common Fate. + rpc GetOAuthTokenMetadata(GetOAuthTokenMetadataRequest) returns (GetOAuthTokenMetadataResponse) {} + rpc ListBackgroundJobs(ListBackgroundJobsRequest) returns (ListBackgroundJobsResponse) {} } message GetOAuthTokenMetadataRequest {} message GetOAuthTokenMetadataResponse { - repeated OAuthTokenMetadata tokens = 1; + repeated OAuthTokenMetadata tokens = 1; } message OAuthTokenMetadata { - string id = 1; - string app_name = 2; - google.protobuf.Timestamp expires_at = 3; + string id = 1; + string app_name = 2; + google.protobuf.Timestamp expires_at = 3; +} + +message ListBackgroundJobsRequest { + // Optionally filter jobs by kind, supplying an empty list will return jobs for all kinds + repeated string kinds = 1; + // by default requests will return upp to 100 jobs, set this between 1 and 10000 to retrieve more jobs + optional int64 count = 2; + + // The job state to filter for + JobState state = 3; +} + +enum JobState { + JOB_STATE_UNSPECIFIED = 0; + JOB_STATE_AVAILABLE = 1; + JOB_STATE_CANCELLED = 2; + JOB_STATE_COMPLETED = 3; + JOB_STATE_DISCARDED = 4; + JOB_STATE_RETRYABLE = 5; + JOB_STATE_RUNNING = 6; + JOB_STATE_SCHEDULED = 7; +} + +message ListBackgroundJobsResponse { + repeated Job jobs = 1; +} + +message Job { + int64 id = 1; + + // Attempt is the attempt number of the job. Jobs are inserted at 0, the + // number is incremented to 1 the first time work its worked, and may + // increment further if it's either snoozed or errors. + int64 attempt = 2; + + // AttemptedAt is the time that the job was last worked. Starts out as `nil` + // on a new insert. + google.protobuf.Timestamp attempted_at = 3; + + // AttemptedBy is the set of client IDs that have worked this job. + repeated string attempted_by = 4; + + // CreatedAt is when the job record was created. + google.protobuf.Timestamp created_at = 5; + + // EncodedArgs is the job's JobArgs encoded as JSON. + bytes encoded_args = 6; + + // Errors is a set of errors that occurred when the job was worked, one for + // each attempt. Ordered from earliest error to the latest error. + repeated AttemptError errors = 7; + + // FinalizedAt is the time at which the job was "finalized", meaning it was + // either completed successfully or errored for the last time such that + // it'll no longer be retried. + google.protobuf.Timestamp finalized_at = 8; + + // Kind uniquely identifies the type of job and instructs which worker + // should work it. It is set at insertion time via `Kind()` on the + // `JobArgs`. + string kind = 9; + + // MaxAttempts is the maximum number of attempts that the job will be tried + // before it errors for the last time and will no longer be worked. + // + // Extracted (in order of precedence) from job-specific InsertOpts + // on Insert, from the worker level InsertOpts from JobArgsWithInsertOpts, + // or from a client's default value. + int64 max_attempts = 10; + + // Metadata is a field for storing arbitrary metadata on a job. It should + // always be a valid JSON object payload, and users should not overwrite or + // remove anything stored in this field by River. + bytes metadata = 11; + + // Priority is the priority of the job, with 1 being the highest priority and + // 4 being the lowest. When fetching available jobs to work, the highest + // priority jobs will always be fetched before any lower priority jobs are + // fetched. Note that if your workers are swamped with more high-priority jobs + // then they can handle, lower priority jobs may not be fetched. + int64 priority = 12; + + // Queue is the name of the queue where the job will be worked. Queues can + // be configured independently and be used to isolate jobs. + // + // Extracted from either specific InsertOpts on Insert, or InsertOpts from + // JobArgsWithInsertOpts, or a client's default value. + string queue = 13; + + // ScheduledAt is when the job is scheduled to become available to be + // worked. Jobs default to running immediately, but may be scheduled + // for the future when they're inserted. They may also be scheduled for + // later because they were snoozed or because they errored and have + // additional retry attempts remaining. + google.protobuf.Timestamp scheduled_at = 14; + + // State is the state of job like `available` or `completed`. Jobs are + // `available` when they're first inserted. + string state = 15; + + // Tags are an arbitrary list of keywords to add to the job. They have no + // functional behavior and are meant entirely as a user-specified construct + // to help group and categorize jobs. + repeated string tags = 16; +} + +// AttemptError is an error from a single job attempt that failed due to an +// error or a panic. +message AttemptError { + // At is the time at which the error occurred. + google.protobuf.Timestamp at = 1; + + // Attempt is the attempt number on which the error occurred (maps to + // Attempt on a job row). + int64 attempt = 2; + + // Error contains the stringified error of an error returned from a job or a + // panic value in case of a panic. + string error = 3; + + // Trace contains a stack trace from a job that panicked. The trace is + // produced by invoking `debug.Trace()`. + string trace = 4; } // AllDiagnostics is used client-side to combine and serialise all collected diagnostics into a single JSON. message AllDiagnostics { - GetOAuthTokenMetadataResponse oauth_token_metadata = 1; -} \ No newline at end of file + GetOAuthTokenMetadataResponse oauth_token_metadata = 1; +} diff --git a/proto/commonfate/control/integration/reset/v1alpha1/reset.proto b/proto/commonfate/control/integration/reset/v1alpha1/reset.proto index 24046655..820a540a 100644 --- a/proto/commonfate/control/integration/reset/v1alpha1/reset.proto +++ b/proto/commonfate/control/integration/reset/v1alpha1/reset.proto @@ -1,15 +1,16 @@ syntax = "proto3"; package commonfate.control.integration.reset.v1alpha1; -import "google/protobuf/duration.proto"; import "commonfate/entity/v1alpha1/eid.proto"; - service ResetService { - rpc ResetEntraUsers(ResetEntraUsersRequest) returns (ResetEntraUsersResponse) {} + rpc ResetEntraUsers(ResetEntraUsersRequest) returns (ResetEntraUsersResponse) {} + + // Removes an OAuth2.0 token from an installed integration from Common Fate. + rpc RemoveOAuthToken(RemoveOAuthTokenRequest) returns (RemoveOAuthTokenResponse) {} - // Removes an OAuth2.0 token from an installed integration from Common Fate. - rpc RemoveOAuthToken(RemoveOAuthTokenRequest) returns (RemoveOAuthTokenResponse) {} + // Cancels all current background tasks for a given kind. + rpc CancelBackgroundJob(CancelBackgroundJobRequest) returns (CancelBackgroundJobResponse) {} } message ResetEntraUsersRequest { @@ -26,4 +27,11 @@ message RemoveOAuthTokenRequest { string id = 1; } -message RemoveOAuthTokenResponse {} \ No newline at end of file +message RemoveOAuthTokenResponse {} + +message CancelBackgroundJobRequest { + // The job id to cancel + int64 id = 1; +} + +message CancelBackgroundJobResponse {}