job

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 10 Imported by: 6

Documentation

Index

Constants

View Source
const (
	JobService_GetJob_FullMethodName          = "/api.job.v1.JobService/GetJob"
	JobService_GetProposal_FullMethodName     = "/api.job.v1.JobService/GetProposal"
	JobService_ListJobs_FullMethodName        = "/api.job.v1.JobService/ListJobs"
	JobService_ListProposals_FullMethodName   = "/api.job.v1.JobService/ListProposals"
	JobService_ProposeJob_FullMethodName      = "/api.job.v1.JobService/ProposeJob"
	JobService_BatchProposeJob_FullMethodName = "/api.job.v1.JobService/BatchProposeJob"
	JobService_RevokeJob_FullMethodName       = "/api.job.v1.JobService/RevokeJob"
	JobService_DeleteJob_FullMethodName       = "/api.job.v1.JobService/DeleteJob"
	JobService_UpdateJob_FullMethodName       = "/api.job.v1.JobService/UpdateJob"
)

Variables

View Source
var (
	ProposalStatus_name = map[int32]string{
		0: "PROPOSAL_STATUS_UNSPECIFIED",
		1: "PROPOSAL_STATUS_PROPOSED",
		2: "PROPOSAL_STATUS_APPROVED",
		3: "PROPOSAL_STATUS_REJECTED",
		4: "PROPOSAL_STATUS_CANCELLED",
		5: "PROPOSAL_STATUS_PENDING",
		6: "PROPOSAL_STATUS_REVOKED",
	}
	ProposalStatus_value = map[string]int32{
		"PROPOSAL_STATUS_UNSPECIFIED": 0,
		"PROPOSAL_STATUS_PROPOSED":    1,
		"PROPOSAL_STATUS_APPROVED":    2,
		"PROPOSAL_STATUS_REJECTED":    3,
		"PROPOSAL_STATUS_CANCELLED":   4,
		"PROPOSAL_STATUS_PENDING":     5,
		"PROPOSAL_STATUS_REVOKED":     6,
	}
)

Enum value maps for ProposalStatus.

View Source
var (
	ProposalDeliveryStatus_name = map[int32]string{
		0: "PROPOSAL_DELIVERY_STATUS_UNSPECIFIED",
		1: "PROPOSAL_DELIVERY_STATUS_DELIVERED",
		2: "PROPOSAL_DELIVERY_STATUS_ACKNOWLEDGED",
		3: "PROPOSAL_DELIVERY_STATUS_FAILED",
	}
	ProposalDeliveryStatus_value = map[string]int32{
		"PROPOSAL_DELIVERY_STATUS_UNSPECIFIED":  0,
		"PROPOSAL_DELIVERY_STATUS_DELIVERED":    1,
		"PROPOSAL_DELIVERY_STATUS_ACKNOWLEDGED": 2,
		"PROPOSAL_DELIVERY_STATUS_FAILED":       3,
	}
)

Enum value maps for ProposalDeliveryStatus.

View Source
var File_job_distributor_v1_job_job_proto protoreflect.FileDescriptor
View Source
var JobService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.job.v1.JobService",
	HandlerType: (*JobServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetJob",
			Handler:    _JobService_GetJob_Handler,
		},
		{
			MethodName: "GetProposal",
			Handler:    _JobService_GetProposal_Handler,
		},
		{
			MethodName: "ListJobs",
			Handler:    _JobService_ListJobs_Handler,
		},
		{
			MethodName: "ListProposals",
			Handler:    _JobService_ListProposals_Handler,
		},
		{
			MethodName: "ProposeJob",
			Handler:    _JobService_ProposeJob_Handler,
		},
		{
			MethodName: "BatchProposeJob",
			Handler:    _JobService_BatchProposeJob_Handler,
		},
		{
			MethodName: "RevokeJob",
			Handler:    _JobService_RevokeJob_Handler,
		},
		{
			MethodName: "DeleteJob",
			Handler:    _JobService_DeleteJob_Handler,
		},
		{
			MethodName: "UpdateJob",
			Handler:    _JobService_UpdateJob_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "job-distributor/v1/job/job.proto",
}

JobService_ServiceDesc is the grpc.ServiceDesc for JobService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterJobServiceServer

func RegisterJobServiceServer(s grpc.ServiceRegistrar, srv JobServiceServer)

Types

type BatchProposeJobRequest added in v0.5.0

type BatchProposeJobRequest struct {
	NodeIds []string        `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` // List of node IDs to which the job will be proposed.
	Spec    string          `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`                      // Shared job spec across all nodes.
	Labels  []*ptypes.Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"`                  // Shared labels associated with the job.
	// contains filtered or unexported fields
}

BatchProposeJobRequest contains the job spec and list of nodes to propose it to.

func (*BatchProposeJobRequest) Descriptor deprecated added in v0.5.0

func (*BatchProposeJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchProposeJobRequest.ProtoReflect.Descriptor instead.

func (*BatchProposeJobRequest) GetLabels added in v0.5.0

func (x *BatchProposeJobRequest) GetLabels() []*ptypes.Label

func (*BatchProposeJobRequest) GetNodeIds added in v0.5.0

func (x *BatchProposeJobRequest) GetNodeIds() []string

func (*BatchProposeJobRequest) GetSpec added in v0.5.0

func (x *BatchProposeJobRequest) GetSpec() string

func (*BatchProposeJobRequest) ProtoMessage added in v0.5.0

func (*BatchProposeJobRequest) ProtoMessage()

func (*BatchProposeJobRequest) ProtoReflect added in v0.5.0

func (x *BatchProposeJobRequest) ProtoReflect() protoreflect.Message

func (*BatchProposeJobRequest) Reset added in v0.5.0

func (x *BatchProposeJobRequest) Reset()

func (*BatchProposeJobRequest) String added in v0.5.0

func (x *BatchProposeJobRequest) String() string

type BatchProposeJobResponse added in v0.5.0

type BatchProposeJobResponse struct {

	// Contains the successful job proposals, mapped by node ID.
	SuccessResponses map[string]*ProposeJobResponse `` /* 197-byte string literal not displayed */
	// Contains error details for each failed job proposal, mapped by node ID.
	FailedResponses map[string]*ProposeJobFailure `` /* 194-byte string literal not displayed */
	// contains filtered or unexported fields
}

BatchProposeJobResponse provides the success and failure statuses for each node in the batch.

func (*BatchProposeJobResponse) Descriptor deprecated added in v0.5.0

func (*BatchProposeJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchProposeJobResponse.ProtoReflect.Descriptor instead.

func (*BatchProposeJobResponse) GetFailedResponses added in v0.5.0

func (x *BatchProposeJobResponse) GetFailedResponses() map[string]*ProposeJobFailure

func (*BatchProposeJobResponse) GetSuccessResponses added in v0.5.0

func (x *BatchProposeJobResponse) GetSuccessResponses() map[string]*ProposeJobResponse

func (*BatchProposeJobResponse) ProtoMessage added in v0.5.0

func (*BatchProposeJobResponse) ProtoMessage()

func (*BatchProposeJobResponse) ProtoReflect added in v0.5.0

func (x *BatchProposeJobResponse) ProtoReflect() protoreflect.Message

func (*BatchProposeJobResponse) Reset added in v0.5.0

func (x *BatchProposeJobResponse) Reset()

func (*BatchProposeJobResponse) String added in v0.5.0

func (x *BatchProposeJobResponse) String() string

type DeleteJobRequest

type DeleteJobRequest struct {

	// Types that are assignable to IdOneof:
	//
	//	*DeleteJobRequest_Id
	//	*DeleteJobRequest_Uuid
	IdOneof isDeleteJobRequest_IdOneof `protobuf_oneof:"id_oneof"`
	// contains filtered or unexported fields
}

DeleteJobRequest specifies the criteria for deleting a job.

func (*DeleteJobRequest) Descriptor deprecated

func (*DeleteJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteJobRequest.ProtoReflect.Descriptor instead.

func (*DeleteJobRequest) GetId

func (x *DeleteJobRequest) GetId() string

func (*DeleteJobRequest) GetIdOneof

func (m *DeleteJobRequest) GetIdOneof() isDeleteJobRequest_IdOneof

func (*DeleteJobRequest) GetUuid deprecated

func (x *DeleteJobRequest) GetUuid() string

Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.

func (*DeleteJobRequest) ProtoMessage

func (*DeleteJobRequest) ProtoMessage()

func (*DeleteJobRequest) ProtoReflect

func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message

func (*DeleteJobRequest) Reset

func (x *DeleteJobRequest) Reset()

func (*DeleteJobRequest) String

func (x *DeleteJobRequest) String() string

type DeleteJobRequest_Id

type DeleteJobRequest_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the job to delete.
}

type DeleteJobRequest_Uuid

type DeleteJobRequest_Uuid struct {
	// Universally unique identifier of the job to delete.
	// This will not work when the same job uuid is found for multiple different nodes.
	// Deprecated: Use `id` instead.
	//
	// Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.
	Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"`
}

type DeleteJobResponse

type DeleteJobResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` // Details of the deleted job.
	// contains filtered or unexported fields
}

DeleteJobResponse returns details of the deleted job.

func (*DeleteJobResponse) Descriptor deprecated

func (*DeleteJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteJobResponse.ProtoReflect.Descriptor instead.

func (*DeleteJobResponse) GetJob

func (x *DeleteJobResponse) GetJob() *Job

func (*DeleteJobResponse) ProtoMessage

func (*DeleteJobResponse) ProtoMessage()

func (*DeleteJobResponse) ProtoReflect

func (x *DeleteJobResponse) ProtoReflect() protoreflect.Message

func (*DeleteJobResponse) Reset

func (x *DeleteJobResponse) Reset()

func (*DeleteJobResponse) String

func (x *DeleteJobResponse) String() string

type GetJobRequest

type GetJobRequest struct {

	// Types that are assignable to IdOneof:
	//
	//	*GetJobRequest_Id
	//	*GetJobRequest_Uuid
	IdOneof isGetJobRequest_IdOneof `protobuf_oneof:"id_oneof"`
	// contains filtered or unexported fields
}

GetJobRequest specifies the criteria for retrieving a job.

func (*GetJobRequest) Descriptor deprecated

func (*GetJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead.

func (*GetJobRequest) GetId

func (x *GetJobRequest) GetId() string

func (*GetJobRequest) GetIdOneof

func (m *GetJobRequest) GetIdOneof() isGetJobRequest_IdOneof

func (*GetJobRequest) GetUuid deprecated

func (x *GetJobRequest) GetUuid() string

Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.

func (*GetJobRequest) ProtoMessage

func (*GetJobRequest) ProtoMessage()

func (*GetJobRequest) ProtoReflect

func (x *GetJobRequest) ProtoReflect() protoreflect.Message

func (*GetJobRequest) Reset

func (x *GetJobRequest) Reset()

func (*GetJobRequest) String

func (x *GetJobRequest) String() string

type GetJobRequest_Id

type GetJobRequest_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the job.
}

type GetJobRequest_Uuid

type GetJobRequest_Uuid struct {
	// Universally unique identifier of the job.
	// This will not work when the same job uuid is found for multiple different nodes.
	// Deprecated: Use `id` instead.
	//
	// Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.
	Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"`
}

type GetJobResponse

type GetJobResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` // Details of the retrieved job.
	// contains filtered or unexported fields
}

GetJobResponse contains the job details.

func (*GetJobResponse) Descriptor deprecated

func (*GetJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetJobResponse.ProtoReflect.Descriptor instead.

func (*GetJobResponse) GetJob

func (x *GetJobResponse) GetJob() *Job

func (*GetJobResponse) ProtoMessage

func (*GetJobResponse) ProtoMessage()

func (*GetJobResponse) ProtoReflect

func (x *GetJobResponse) ProtoReflect() protoreflect.Message

func (*GetJobResponse) Reset

func (x *GetJobResponse) Reset()

func (*GetJobResponse) String

func (x *GetJobResponse) String() string

type GetProposalRequest

type GetProposalRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier of the proposal to retrieve.
	// contains filtered or unexported fields
}

GetProposalRequest specifies the criteria for retrieving a proposal.

func (*GetProposalRequest) Descriptor deprecated

func (*GetProposalRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetProposalRequest.ProtoReflect.Descriptor instead.

func (*GetProposalRequest) GetId

func (x *GetProposalRequest) GetId() string

func (*GetProposalRequest) ProtoMessage

func (*GetProposalRequest) ProtoMessage()

func (*GetProposalRequest) ProtoReflect

func (x *GetProposalRequest) ProtoReflect() protoreflect.Message

func (*GetProposalRequest) Reset

func (x *GetProposalRequest) Reset()

func (*GetProposalRequest) String

func (x *GetProposalRequest) String() string

type GetProposalResponse

type GetProposalResponse struct {
	Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` // Details of the retrieved proposal.
	// contains filtered or unexported fields
}

GetProposalResponse contains the proposal details.

func (*GetProposalResponse) Descriptor deprecated

func (*GetProposalResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetProposalResponse.ProtoReflect.Descriptor instead.

func (*GetProposalResponse) GetProposal

func (x *GetProposalResponse) GetProposal() *Proposal

func (*GetProposalResponse) ProtoMessage

func (*GetProposalResponse) ProtoMessage()

func (*GetProposalResponse) ProtoReflect

func (x *GetProposalResponse) ProtoReflect() protoreflect.Message

func (*GetProposalResponse) Reset

func (x *GetProposalResponse) Reset()

func (*GetProposalResponse) String

func (x *GetProposalResponse) String() string

type Job

type Job struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                      // Unique identifier for the job.
	Uuid        string                 `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`                                  // Universally unique identifier for the job.
	NodeId      string                 `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`                // ID of the node associated with this job.
	ProposalIds []string               `protobuf:"bytes,4,rep,name=proposal_ids,json=proposalIds,proto3" json:"proposal_ids,omitempty"` // List of proposal IDs associated with this job.
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`       // Timestamp when the job was created.
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`       // Timestamp when the job was last updated.
	DeletedAt   *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`       // Timestamp when the job was deleted, if applicable.
	Labels      []*ptypes.Label        `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"`                              // Set of labels associated with the job.
	// contains filtered or unexported fields
}

Job represents the structured data of a job within the system.

func (*Job) Descriptor deprecated

func (*Job) Descriptor() ([]byte, []int)

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetCreatedAt

func (x *Job) GetCreatedAt() *timestamppb.Timestamp

func (*Job) GetDeletedAt

func (x *Job) GetDeletedAt() *timestamppb.Timestamp

func (*Job) GetId

func (x *Job) GetId() string

func (*Job) GetLabels

func (x *Job) GetLabels() []*ptypes.Label

func (*Job) GetNodeId

func (x *Job) GetNodeId() string

func (*Job) GetProposalIds

func (x *Job) GetProposalIds() []string

func (*Job) GetUpdatedAt

func (x *Job) GetUpdatedAt() *timestamppb.Timestamp

func (*Job) GetUuid

func (x *Job) GetUuid() string

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

func (x *Job) ProtoReflect() protoreflect.Message

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type JobServiceClient

type JobServiceClient interface {
	// GetJob retrieves the details of a specific job by its ID or UUID.
	GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error)
	// GetProposal retrieves the details of a specific proposal by its ID.
	GetProposal(ctx context.Context, in *GetProposalRequest, opts ...grpc.CallOption) (*GetProposalResponse, error)
	// ListJobs returns a list of jobs, optionally filtered by IDs or node IDs.
	ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error)
	// ListProposals returns a list of proposals, optionally filtered by proposal or job IDs.
	ListProposals(ctx context.Context, in *ListProposalsRequest, opts ...grpc.CallOption) (*ListProposalsResponse, error)
	// ProposeJob submits a new job proposal to a node.
	ProposeJob(ctx context.Context, in *ProposeJobRequest, opts ...grpc.CallOption) (*ProposeJobResponse, error)
	// BatchProposeJob submits a job proposals to a batch of nodes.
	BatchProposeJob(ctx context.Context, in *BatchProposeJobRequest, opts ...grpc.CallOption) (*BatchProposeJobResponse, error)
	// RevokeJob revokes an existing job proposal.
	RevokeJob(ctx context.Context, in *RevokeJobRequest, opts ...grpc.CallOption) (*RevokeJobResponse, error)
	// DeleteJob deletes a job from the system.
	DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*DeleteJobResponse, error)
	// UpdateJob updates a job in the system.
	UpdateJob(ctx context.Context, in *UpdateJobRequest, opts ...grpc.CallOption) (*UpdateJobResponse, error)
}

JobServiceClient is the client API for JobService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

JobService provides RPCs for managing jobs and job proposals within the system.

func NewJobServiceClient

func NewJobServiceClient(cc grpc.ClientConnInterface) JobServiceClient

type JobServiceServer

type JobServiceServer interface {
	// GetJob retrieves the details of a specific job by its ID or UUID.
	GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
	// GetProposal retrieves the details of a specific proposal by its ID.
	GetProposal(context.Context, *GetProposalRequest) (*GetProposalResponse, error)
	// ListJobs returns a list of jobs, optionally filtered by IDs or node IDs.
	ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error)
	// ListProposals returns a list of proposals, optionally filtered by proposal or job IDs.
	ListProposals(context.Context, *ListProposalsRequest) (*ListProposalsResponse, error)
	// ProposeJob submits a new job proposal to a node.
	ProposeJob(context.Context, *ProposeJobRequest) (*ProposeJobResponse, error)
	// BatchProposeJob submits a job proposals to a batch of nodes.
	BatchProposeJob(context.Context, *BatchProposeJobRequest) (*BatchProposeJobResponse, error)
	// RevokeJob revokes an existing job proposal.
	RevokeJob(context.Context, *RevokeJobRequest) (*RevokeJobResponse, error)
	// DeleteJob deletes a job from the system.
	DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobResponse, error)
	// UpdateJob updates a job in the system.
	UpdateJob(context.Context, *UpdateJobRequest) (*UpdateJobResponse, error)
	// contains filtered or unexported methods
}

JobServiceServer is the server API for JobService service. All implementations must embed UnimplementedJobServiceServer for forward compatibility.

JobService provides RPCs for managing jobs and job proposals within the system.

type ListJobsRequest

type ListJobsRequest struct {
	Filter *ListJobsRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // Filters applied to the job listing.
	// contains filtered or unexported fields
}

ListJobsRequest specifies filters for listing jobs.

func (*ListJobsRequest) Descriptor deprecated

func (*ListJobsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead.

func (*ListJobsRequest) GetFilter

func (x *ListJobsRequest) GetFilter() *ListJobsRequest_Filter

func (*ListJobsRequest) ProtoMessage

func (*ListJobsRequest) ProtoMessage()

func (*ListJobsRequest) ProtoReflect

func (x *ListJobsRequest) ProtoReflect() protoreflect.Message

func (*ListJobsRequest) Reset

func (x *ListJobsRequest) Reset()

func (*ListJobsRequest) String

func (x *ListJobsRequest) String() string

type ListJobsRequest_Filter

type ListJobsRequest_Filter struct {
	Ids       []string           `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`                        // Filter by job IDs.
	NodeIds   []string           `protobuf:"bytes,2,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` // Filter by node IDs.
	Selectors []*ptypes.Selector `protobuf:"bytes,3,rep,name=selectors,proto3" json:"selectors,omitempty"`            // Filter by selectors
	Uuids     []string           `protobuf:"bytes,4,rep,name=uuids,proto3" json:"uuids,omitempty"`                    // Filter by job UUIDs.
	// contains filtered or unexported fields
}

func (*ListJobsRequest_Filter) Descriptor deprecated

func (*ListJobsRequest_Filter) Descriptor() ([]byte, []int)

Deprecated: Use ListJobsRequest_Filter.ProtoReflect.Descriptor instead.

func (*ListJobsRequest_Filter) GetIds

func (x *ListJobsRequest_Filter) GetIds() []string

func (*ListJobsRequest_Filter) GetNodeIds

func (x *ListJobsRequest_Filter) GetNodeIds() []string

func (*ListJobsRequest_Filter) GetSelectors

func (x *ListJobsRequest_Filter) GetSelectors() []*ptypes.Selector

func (*ListJobsRequest_Filter) GetUuids added in v0.6.0

func (x *ListJobsRequest_Filter) GetUuids() []string

func (*ListJobsRequest_Filter) ProtoMessage

func (*ListJobsRequest_Filter) ProtoMessage()

func (*ListJobsRequest_Filter) ProtoReflect

func (x *ListJobsRequest_Filter) ProtoReflect() protoreflect.Message

func (*ListJobsRequest_Filter) Reset

func (x *ListJobsRequest_Filter) Reset()

func (*ListJobsRequest_Filter) String

func (x *ListJobsRequest_Filter) String() string

type ListJobsResponse

type ListJobsResponse struct {
	Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` // List of jobs.
	// contains filtered or unexported fields
}

ListJobsResponse contains a list of jobs that match the filters.

func (*ListJobsResponse) Descriptor deprecated

func (*ListJobsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead.

func (*ListJobsResponse) GetJobs

func (x *ListJobsResponse) GetJobs() []*Job

func (*ListJobsResponse) ProtoMessage

func (*ListJobsResponse) ProtoMessage()

func (*ListJobsResponse) ProtoReflect

func (x *ListJobsResponse) ProtoReflect() protoreflect.Message

func (*ListJobsResponse) Reset

func (x *ListJobsResponse) Reset()

func (*ListJobsResponse) String

func (x *ListJobsResponse) String() string

type ListProposalsRequest

type ListProposalsRequest struct {
	Filter *ListProposalsRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // Filters applied to the proposal listing.
	// contains filtered or unexported fields
}

ListProposalsRequest specifies filters for listing proposals.

func (*ListProposalsRequest) Descriptor deprecated

func (*ListProposalsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListProposalsRequest.ProtoReflect.Descriptor instead.

func (*ListProposalsRequest) GetFilter

func (*ListProposalsRequest) ProtoMessage

func (*ListProposalsRequest) ProtoMessage()

func (*ListProposalsRequest) ProtoReflect

func (x *ListProposalsRequest) ProtoReflect() protoreflect.Message

func (*ListProposalsRequest) Reset

func (x *ListProposalsRequest) Reset()

func (*ListProposalsRequest) String

func (x *ListProposalsRequest) String() string

type ListProposalsRequest_Filter

type ListProposalsRequest_Filter struct {
	Ids    []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`                     // Filter by proposal IDs.
	JobIds []string `protobuf:"bytes,2,rep,name=job_ids,json=jobIds,proto3" json:"job_ids,omitempty"` // Filter by job IDs.
	// contains filtered or unexported fields
}

func (*ListProposalsRequest_Filter) Descriptor deprecated

func (*ListProposalsRequest_Filter) Descriptor() ([]byte, []int)

Deprecated: Use ListProposalsRequest_Filter.ProtoReflect.Descriptor instead.

func (*ListProposalsRequest_Filter) GetIds

func (x *ListProposalsRequest_Filter) GetIds() []string

func (*ListProposalsRequest_Filter) GetJobIds

func (x *ListProposalsRequest_Filter) GetJobIds() []string

func (*ListProposalsRequest_Filter) ProtoMessage

func (*ListProposalsRequest_Filter) ProtoMessage()

func (*ListProposalsRequest_Filter) ProtoReflect

func (*ListProposalsRequest_Filter) Reset

func (x *ListProposalsRequest_Filter) Reset()

func (*ListProposalsRequest_Filter) String

func (x *ListProposalsRequest_Filter) String() string

type ListProposalsResponse

type ListProposalsResponse struct {
	Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` // List of proposals.
	// contains filtered or unexported fields
}

ListProposalsResponse contains a list of proposals that match the filters.

func (*ListProposalsResponse) Descriptor deprecated

func (*ListProposalsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListProposalsResponse.ProtoReflect.Descriptor instead.

func (*ListProposalsResponse) GetProposals

func (x *ListProposalsResponse) GetProposals() []*Proposal

func (*ListProposalsResponse) ProtoMessage

func (*ListProposalsResponse) ProtoMessage()

func (*ListProposalsResponse) ProtoReflect

func (x *ListProposalsResponse) ProtoReflect() protoreflect.Message

func (*ListProposalsResponse) Reset

func (x *ListProposalsResponse) Reset()

func (*ListProposalsResponse) String

func (x *ListProposalsResponse) String() string

type Proposal

type Proposal struct {
	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                         // Unique identifier for the proposal.
	Revision       int64                  `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`                            // Revision number of the proposal.  Montonically increasing.
	Status         ProposalStatus         `protobuf:"varint,3,opt,name=status,proto3,enum=api.job.v1.ProposalStatus" json:"status,omitempty"` // Current status of the proposal.
	DeliveryStatus ProposalDeliveryStatus ``                                                                                                  // Delivery status of the proposal.
	/* 143-byte string literal not displayed */
	Spec               string                 `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"`                                                                // Specification of the job proposed.
	JobId              string                 `protobuf:"bytes,6,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`                                                 // ID of the job associated with this proposal.
	CreatedAt          *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`                                     // Timestamp when the proposal was created.
	UpdatedAt          *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`                                     // Timestamp when the proposal was last updated.
	AckedAt            *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=acked_at,json=ackedAt,proto3,oneof" json:"acked_at,omitempty"`                                     // Timestamp when the proposal was acknowledged.
	ResponseReceivedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=response_received_at,json=responseReceivedAt,proto3,oneof" json:"response_received_at,omitempty"` // Timestamp when a response was received.
	// contains filtered or unexported fields
}

Proposal represents a job proposal.

func (*Proposal) Descriptor deprecated

func (*Proposal) Descriptor() ([]byte, []int)

Deprecated: Use Proposal.ProtoReflect.Descriptor instead.

func (*Proposal) GetAckedAt

func (x *Proposal) GetAckedAt() *timestamppb.Timestamp

func (*Proposal) GetCreatedAt

func (x *Proposal) GetCreatedAt() *timestamppb.Timestamp

func (*Proposal) GetDeliveryStatus

func (x *Proposal) GetDeliveryStatus() ProposalDeliveryStatus

func (*Proposal) GetId

func (x *Proposal) GetId() string

func (*Proposal) GetJobId

func (x *Proposal) GetJobId() string

func (*Proposal) GetResponseReceivedAt

func (x *Proposal) GetResponseReceivedAt() *timestamppb.Timestamp

func (*Proposal) GetRevision

func (x *Proposal) GetRevision() int64

func (*Proposal) GetSpec

func (x *Proposal) GetSpec() string

func (*Proposal) GetStatus

func (x *Proposal) GetStatus() ProposalStatus

func (*Proposal) GetUpdatedAt

func (x *Proposal) GetUpdatedAt() *timestamppb.Timestamp

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) ProtoReflect

func (x *Proposal) ProtoReflect() protoreflect.Message

func (*Proposal) Reset

func (x *Proposal) Reset()

func (*Proposal) String

func (x *Proposal) String() string

type ProposalDeliveryStatus

type ProposalDeliveryStatus int32

ProposalDeliveryStatus defines the delivery status of the proposal to the node.

const (
	ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_UNSPECIFIED  ProposalDeliveryStatus = 0
	ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_DELIVERED    ProposalDeliveryStatus = 1 // Delivered to the node.
	ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_ACKNOWLEDGED ProposalDeliveryStatus = 2 // Acknowledged by the node.
	ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_FAILED       ProposalDeliveryStatus = 3 // Delivery failed.
)

func (ProposalDeliveryStatus) Descriptor

func (ProposalDeliveryStatus) Enum

func (ProposalDeliveryStatus) EnumDescriptor deprecated

func (ProposalDeliveryStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProposalDeliveryStatus.Descriptor instead.

func (ProposalDeliveryStatus) Number

func (ProposalDeliveryStatus) String

func (x ProposalDeliveryStatus) String() string

func (ProposalDeliveryStatus) Type

type ProposalStatus

type ProposalStatus int32

ProposalStatus defines the possible states of a job proposal.

const (
	ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0
	ProposalStatus_PROPOSAL_STATUS_PROPOSED    ProposalStatus = 1 // Proposal has been made but not yet decided upon.
	ProposalStatus_PROPOSAL_STATUS_APPROVED    ProposalStatus = 2 // Proposal has been accepted.
	ProposalStatus_PROPOSAL_STATUS_REJECTED    ProposalStatus = 3 // Proposal has been rejected.
	ProposalStatus_PROPOSAL_STATUS_CANCELLED   ProposalStatus = 4 // Proposal has been cancelled.
	ProposalStatus_PROPOSAL_STATUS_PENDING     ProposalStatus = 5 // Proposal is pending review.
	ProposalStatus_PROPOSAL_STATUS_REVOKED     ProposalStatus = 6 // Proposal has been revoked after being proposed.
)

func (ProposalStatus) Descriptor

func (ProposalStatus) Enum

func (x ProposalStatus) Enum() *ProposalStatus

func (ProposalStatus) EnumDescriptor deprecated

func (ProposalStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProposalStatus.Descriptor instead.

func (ProposalStatus) Number

func (ProposalStatus) String

func (x ProposalStatus) String() string

func (ProposalStatus) Type

type ProposeJobFailure added in v0.5.0

type ProposeJobFailure struct {
	ErrorMessage string `protobuf:"bytes,1,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` // Description of the error.
	// contains filtered or unexported fields
}

ProposeJobFailure Represents detailed information for a failed job proposal.

func (*ProposeJobFailure) Descriptor deprecated added in v0.5.0

func (*ProposeJobFailure) Descriptor() ([]byte, []int)

Deprecated: Use ProposeJobFailure.ProtoReflect.Descriptor instead.

func (*ProposeJobFailure) GetErrorMessage added in v0.5.0

func (x *ProposeJobFailure) GetErrorMessage() string

func (*ProposeJobFailure) ProtoMessage added in v0.5.0

func (*ProposeJobFailure) ProtoMessage()

func (*ProposeJobFailure) ProtoReflect added in v0.5.0

func (x *ProposeJobFailure) ProtoReflect() protoreflect.Message

func (*ProposeJobFailure) Reset added in v0.5.0

func (x *ProposeJobFailure) Reset()

func (*ProposeJobFailure) String added in v0.5.0

func (x *ProposeJobFailure) String() string

type ProposeJobRequest

type ProposeJobRequest struct {
	NodeId string          `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // ID of the node to which the job is proposed.
	Spec   string          `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`                   // Specification of the job being proposed.
	Labels []*ptypes.Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"`               // Labels to associate with the job.
	// contains filtered or unexported fields
}

ProposeJobRequest contains the information needed to submit a new job proposal.

func (*ProposeJobRequest) Descriptor deprecated

func (*ProposeJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use ProposeJobRequest.ProtoReflect.Descriptor instead.

func (*ProposeJobRequest) GetLabels

func (x *ProposeJobRequest) GetLabels() []*ptypes.Label

func (*ProposeJobRequest) GetNodeId

func (x *ProposeJobRequest) GetNodeId() string

func (*ProposeJobRequest) GetSpec

func (x *ProposeJobRequest) GetSpec() string

func (*ProposeJobRequest) ProtoMessage

func (*ProposeJobRequest) ProtoMessage()

func (*ProposeJobRequest) ProtoReflect

func (x *ProposeJobRequest) ProtoReflect() protoreflect.Message

func (*ProposeJobRequest) Reset

func (x *ProposeJobRequest) Reset()

func (*ProposeJobRequest) String

func (x *ProposeJobRequest) String() string

type ProposeJobResponse

type ProposeJobResponse struct {
	Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` // Details of the newly created proposal.
	// contains filtered or unexported fields
}

ProposeJobResponse returns the newly created proposal.

func (*ProposeJobResponse) Descriptor deprecated

func (*ProposeJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use ProposeJobResponse.ProtoReflect.Descriptor instead.

func (*ProposeJobResponse) GetProposal

func (x *ProposeJobResponse) GetProposal() *Proposal

func (*ProposeJobResponse) ProtoMessage

func (*ProposeJobResponse) ProtoMessage()

func (*ProposeJobResponse) ProtoReflect

func (x *ProposeJobResponse) ProtoReflect() protoreflect.Message

func (*ProposeJobResponse) Reset

func (x *ProposeJobResponse) Reset()

func (*ProposeJobResponse) String

func (x *ProposeJobResponse) String() string

type RevokeJobRequest

type RevokeJobRequest struct {

	// Types that are assignable to IdOneof:
	//
	//	*RevokeJobRequest_Id
	//	*RevokeJobRequest_Uuid
	IdOneof isRevokeJobRequest_IdOneof `protobuf_oneof:"id_oneof"`
	// contains filtered or unexported fields
}

RevokeJobRequest specifies the criteria for revoking a job proposal.

func (*RevokeJobRequest) Descriptor deprecated

func (*RevokeJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use RevokeJobRequest.ProtoReflect.Descriptor instead.

func (*RevokeJobRequest) GetId

func (x *RevokeJobRequest) GetId() string

func (*RevokeJobRequest) GetIdOneof

func (m *RevokeJobRequest) GetIdOneof() isRevokeJobRequest_IdOneof

func (*RevokeJobRequest) GetUuid deprecated

func (x *RevokeJobRequest) GetUuid() string

Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.

func (*RevokeJobRequest) ProtoMessage

func (*RevokeJobRequest) ProtoMessage()

func (*RevokeJobRequest) ProtoReflect

func (x *RevokeJobRequest) ProtoReflect() protoreflect.Message

func (*RevokeJobRequest) Reset

func (x *RevokeJobRequest) Reset()

func (*RevokeJobRequest) String

func (x *RevokeJobRequest) String() string

type RevokeJobRequest_Id

type RevokeJobRequest_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the proposal to revoke.
}

type RevokeJobRequest_Uuid

type RevokeJobRequest_Uuid struct {
	// Universally unique identifier of the proposal to revoke.
	// This will not work when the same job uuid is found for multiple different nodes.
	// Deprecated: Use `id` instead.
	//
	// Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.
	Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"`
}

type RevokeJobResponse

type RevokeJobResponse struct {
	Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` // Details of the revoked proposal.
	// contains filtered or unexported fields
}

RevokeJobResponse returns the revoked proposal.

func (*RevokeJobResponse) Descriptor deprecated

func (*RevokeJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use RevokeJobResponse.ProtoReflect.Descriptor instead.

func (*RevokeJobResponse) GetProposal

func (x *RevokeJobResponse) GetProposal() *Proposal

func (*RevokeJobResponse) ProtoMessage

func (*RevokeJobResponse) ProtoMessage()

func (*RevokeJobResponse) ProtoReflect

func (x *RevokeJobResponse) ProtoReflect() protoreflect.Message

func (*RevokeJobResponse) Reset

func (x *RevokeJobResponse) Reset()

func (*RevokeJobResponse) String

func (x *RevokeJobResponse) String() string

type UnimplementedJobServiceServer

type UnimplementedJobServiceServer struct{}

UnimplementedJobServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedJobServiceServer) BatchProposeJob added in v0.5.0

func (UnimplementedJobServiceServer) DeleteJob

func (UnimplementedJobServiceServer) GetJob

func (UnimplementedJobServiceServer) GetProposal

func (UnimplementedJobServiceServer) ListJobs

func (UnimplementedJobServiceServer) ListProposals

func (UnimplementedJobServiceServer) ProposeJob

func (UnimplementedJobServiceServer) RevokeJob

func (UnimplementedJobServiceServer) UpdateJob

type UnsafeJobServiceServer

type UnsafeJobServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeJobServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JobServiceServer will result in compilation errors.

type UpdateJobRequest

type UpdateJobRequest struct {

	// Types that are assignable to IdOneof:
	//
	//	*UpdateJobRequest_Id
	//	*UpdateJobRequest_Uuid
	IdOneof isUpdateJobRequest_IdOneof `protobuf_oneof:"id_oneof"`
	Labels  []*ptypes.Label            `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // Set of labels associated with the job.
	// contains filtered or unexported fields
}

UpdateJobRequest specifies the criteria for updating a job.

func (*UpdateJobRequest) Descriptor deprecated

func (*UpdateJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateJobRequest.ProtoReflect.Descriptor instead.

func (*UpdateJobRequest) GetId

func (x *UpdateJobRequest) GetId() string

func (*UpdateJobRequest) GetIdOneof

func (m *UpdateJobRequest) GetIdOneof() isUpdateJobRequest_IdOneof

func (*UpdateJobRequest) GetLabels

func (x *UpdateJobRequest) GetLabels() []*ptypes.Label

func (*UpdateJobRequest) GetUuid deprecated

func (x *UpdateJobRequest) GetUuid() string

Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.

func (*UpdateJobRequest) ProtoMessage

func (*UpdateJobRequest) ProtoMessage()

func (*UpdateJobRequest) ProtoReflect

func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message

func (*UpdateJobRequest) Reset

func (x *UpdateJobRequest) Reset()

func (*UpdateJobRequest) String

func (x *UpdateJobRequest) String() string

type UpdateJobRequest_Id

type UpdateJobRequest_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the job to update.
}

type UpdateJobRequest_Uuid

type UpdateJobRequest_Uuid struct {
	// Universally unique identifier of the job to update.
	// This will not work when the same job uuid is found for multiple different nodes.
	// Deprecated: Use `id` instead.
	//
	// Deprecated: Marked as deprecated in job-distributor/v1/job/job.proto.
	Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"`
}

type UpdateJobResponse

type UpdateJobResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` // Details of the updated job.
	// contains filtered or unexported fields
}

UpdateJobResponse returns details of the updated job.

func (*UpdateJobResponse) Descriptor deprecated

func (*UpdateJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateJobResponse.ProtoReflect.Descriptor instead.

func (*UpdateJobResponse) GetJob

func (x *UpdateJobResponse) GetJob() *Job

func (*UpdateJobResponse) ProtoMessage

func (*UpdateJobResponse) ProtoMessage()

func (*UpdateJobResponse) ProtoReflect

func (x *UpdateJobResponse) ProtoReflect() protoreflect.Message

func (*UpdateJobResponse) Reset

func (x *UpdateJobResponse) Reset()

func (*UpdateJobResponse) String

func (x *UpdateJobResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL