Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterQueueServiceServer(s grpc.ServiceRegistrar, srv QueueServiceServer)
- func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)
- type CompleteRequest
- func (*CompleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompleteRequest) GetJobId() string
- func (x *CompleteRequest) GetLeaseId() string
- func (x *CompleteRequest) GetResult() *structpb.Struct
- func (x *CompleteRequest) GetWorkerId() string
- func (*CompleteRequest) ProtoMessage()
- func (x *CompleteRequest) ProtoReflect() protoreflect.Message
- func (x *CompleteRequest) Reset()
- func (x *CompleteRequest) String() string
- type CompleteResponse
- type DequeueRequest
- func (*DequeueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DequeueRequest) GetBatchSize() int32
- func (x *DequeueRequest) GetLeaseDurationSecs() int32
- func (x *DequeueRequest) GetQueueName() string
- func (x *DequeueRequest) GetWorkerId() string
- func (*DequeueRequest) ProtoMessage()
- func (x *DequeueRequest) ProtoReflect() protoreflect.Message
- func (x *DequeueRequest) Reset()
- func (x *DequeueRequest) String() string
- type DequeueResponse
- type DeregisterRequest
- type DeregisterResponse
- func (*DeregisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeregisterResponse) GetSuccess() bool
- func (*DeregisterResponse) ProtoMessage()
- func (x *DeregisterResponse) ProtoReflect() protoreflect.Message
- func (x *DeregisterResponse) Reset()
- func (x *DeregisterResponse) String() string
- type EnqueueRequest
- func (*EnqueueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EnqueueRequest) GetIdempotencyKey() string
- func (x *EnqueueRequest) GetMaxRetries() int32
- func (x *EnqueueRequest) GetPayload() *structpb.Struct
- func (x *EnqueueRequest) GetPriority() int32
- func (x *EnqueueRequest) GetQueueName() string
- func (x *EnqueueRequest) GetScheduledAt() *timestamppb.Timestamp
- func (x *EnqueueRequest) GetTags() map[string]string
- func (x *EnqueueRequest) GetTimeoutSeconds() int32
- func (*EnqueueRequest) ProtoMessage()
- func (x *EnqueueRequest) ProtoReflect() protoreflect.Message
- func (x *EnqueueRequest) Reset()
- func (x *EnqueueRequest) String() string
- type EnqueueResponse
- func (*EnqueueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EnqueueResponse) GetCreated() bool
- func (x *EnqueueResponse) GetJobId() string
- func (*EnqueueResponse) ProtoMessage()
- func (x *EnqueueResponse) ProtoReflect() protoreflect.Message
- func (x *EnqueueResponse) Reset()
- func (x *EnqueueResponse) String() string
- type ErrorResponse
- func (*ErrorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ErrorResponse) GetCode() string
- func (x *ErrorResponse) GetMessage() string
- func (*ErrorResponse) ProtoMessage()
- func (x *ErrorResponse) ProtoReflect() protoreflect.Message
- func (x *ErrorResponse) Reset()
- func (x *ErrorResponse) String() string
- type FailRequest
- func (*FailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FailRequest) GetError() string
- func (x *FailRequest) GetJobId() string
- func (x *FailRequest) GetLeaseId() string
- func (x *FailRequest) GetRetry() bool
- func (x *FailRequest) GetWorkerId() string
- func (*FailRequest) ProtoMessage()
- func (x *FailRequest) ProtoReflect() protoreflect.Message
- func (x *FailRequest) Reset()
- func (x *FailRequest) String() string
- type FailResponse
- func (*FailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FailResponse) GetNextRetryDelaySecs() int32
- func (x *FailResponse) GetSuccess() bool
- func (x *FailResponse) GetWillRetry() bool
- func (*FailResponse) ProtoMessage()
- func (x *FailResponse) ProtoReflect() protoreflect.Message
- func (x *FailResponse) Reset()
- func (x *FailResponse) String() string
- type GetJobRequest
- type GetJobResponse
- type GetQueueStatsRequest
- func (*GetQueueStatsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetQueueStatsRequest) GetQueueName() string
- func (*GetQueueStatsRequest) ProtoMessage()
- func (x *GetQueueStatsRequest) ProtoReflect() protoreflect.Message
- func (x *GetQueueStatsRequest) Reset()
- func (x *GetQueueStatsRequest) String() string
- type GetQueueStatsResponse
- func (*GetQueueStatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetQueueStatsResponse) GetCompleted() int64
- func (x *GetQueueStatsResponse) GetDeadletter() int64
- func (x *GetQueueStatsResponse) GetFailed() int64
- func (x *GetQueueStatsResponse) GetMaxAgeMs() int64
- func (x *GetQueueStatsResponse) GetPending() int64
- func (x *GetQueueStatsResponse) GetProcessing() int64
- func (x *GetQueueStatsResponse) GetQueueName() string
- func (x *GetQueueStatsResponse) GetScheduled() int64
- func (x *GetQueueStatsResponse) GetTotal() int64
- func (*GetQueueStatsResponse) ProtoMessage()
- func (x *GetQueueStatsResponse) ProtoReflect() protoreflect.Message
- func (x *GetQueueStatsResponse) Reset()
- func (x *GetQueueStatsResponse) String() string
- type HeartbeatRequest
- func (*HeartbeatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HeartbeatRequest) GetCurrentJobs() int32
- func (x *HeartbeatRequest) GetMetadata() map[string]string
- func (x *HeartbeatRequest) GetStatus() string
- func (x *HeartbeatRequest) GetWorkerId() string
- func (*HeartbeatRequest) ProtoMessage()
- func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message
- func (x *HeartbeatRequest) Reset()
- func (x *HeartbeatRequest) String() string
- type HeartbeatResponse
- func (*HeartbeatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HeartbeatResponse) GetAcknowledged() bool
- func (x *HeartbeatResponse) GetShouldDrain() bool
- func (*HeartbeatResponse) ProtoMessage()
- func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message
- func (x *HeartbeatResponse) Reset()
- func (x *HeartbeatResponse) String() string
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetAssignedWorkerId() string
- func (x *Job) GetCompletedAt() *timestamppb.Timestamp
- func (x *Job) GetCreatedAt() *timestamppb.Timestamp
- func (x *Job) GetId() string
- func (x *Job) GetIdempotencyKey() string
- func (x *Job) GetLastError() string
- func (x *Job) GetLeaseExpiresAt() *timestamppb.Timestamp
- func (x *Job) GetLeaseId() string
- func (x *Job) GetMaxRetries() int32
- func (x *Job) GetOrganizationId() string
- func (x *Job) GetPayload() *structpb.Struct
- func (x *Job) GetPriority() int32
- func (x *Job) GetQueueName() string
- func (x *Job) GetResult() *structpb.Struct
- func (x *Job) GetRetryCount() int32
- func (x *Job) GetScheduledAt() *timestamppb.Timestamp
- func (x *Job) GetStartedAt() *timestamppb.Timestamp
- func (x *Job) GetStatus() JobStatus
- func (x *Job) GetTimeoutSeconds() int32
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type JobStatus
- type ProcessRequest
- func (*ProcessRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessRequest) GetComplete() *CompleteRequest
- func (x *ProcessRequest) GetDequeue() *DequeueRequest
- func (x *ProcessRequest) GetFail() *FailRequest
- func (x *ProcessRequest) GetRenewLease() *RenewLeaseRequest
- func (x *ProcessRequest) GetRequest() isProcessRequest_Request
- func (*ProcessRequest) ProtoMessage()
- func (x *ProcessRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessRequest) Reset()
- func (x *ProcessRequest) String() string
- type ProcessRequest_Complete
- type ProcessRequest_Dequeue
- type ProcessRequest_Fail
- type ProcessRequest_RenewLease
- type ProcessResponse
- func (*ProcessResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessResponse) GetComplete() *CompleteResponse
- func (x *ProcessResponse) GetError() *ErrorResponse
- func (x *ProcessResponse) GetFail() *FailResponse
- func (x *ProcessResponse) GetJob() *Job
- func (x *ProcessResponse) GetRenewLease() *RenewLeaseResponse
- func (x *ProcessResponse) GetResponse() isProcessResponse_Response
- func (*ProcessResponse) ProtoMessage()
- func (x *ProcessResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessResponse) Reset()
- func (x *ProcessResponse) String() string
- type ProcessResponse_Complete
- type ProcessResponse_Error
- type ProcessResponse_Fail
- type ProcessResponse_Job
- type ProcessResponse_RenewLease
- type QueueServiceClient
- type QueueServiceServer
- type QueueService_ProcessJobsClient
- type QueueService_ProcessJobsServer
- type QueueService_StreamJobsClient
- type QueueService_StreamJobsServer
- type RegisterWorkerRequest
- func (*RegisterWorkerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterWorkerRequest) GetHostname() string
- func (x *RegisterWorkerRequest) GetMaxConcurrency() int32
- func (x *RegisterWorkerRequest) GetMetadata() map[string]string
- func (x *RegisterWorkerRequest) GetQueueName() string
- func (x *RegisterWorkerRequest) GetVersion() string
- func (x *RegisterWorkerRequest) GetWorkerType() string
- func (*RegisterWorkerRequest) ProtoMessage()
- func (x *RegisterWorkerRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterWorkerRequest) Reset()
- func (x *RegisterWorkerRequest) String() string
- type RegisterWorkerResponse
- func (*RegisterWorkerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterWorkerResponse) GetHeartbeatIntervalSecs() int32
- func (x *RegisterWorkerResponse) GetLeaseDurationSecs() int32
- func (x *RegisterWorkerResponse) GetWorkerId() string
- func (*RegisterWorkerResponse) ProtoMessage()
- func (x *RegisterWorkerResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterWorkerResponse) Reset()
- func (x *RegisterWorkerResponse) String() string
- type RenewLeaseRequest
- func (*RenewLeaseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RenewLeaseRequest) GetExtensionSecs() int32
- func (x *RenewLeaseRequest) GetJobId() string
- func (x *RenewLeaseRequest) GetLeaseId() string
- func (x *RenewLeaseRequest) GetWorkerId() string
- func (*RenewLeaseRequest) ProtoMessage()
- func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message
- func (x *RenewLeaseRequest) Reset()
- func (x *RenewLeaseRequest) String() string
- type RenewLeaseResponse
- func (*RenewLeaseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RenewLeaseResponse) GetNewExpiresAt() *timestamppb.Timestamp
- func (x *RenewLeaseResponse) GetSuccess() bool
- func (*RenewLeaseResponse) ProtoMessage()
- func (x *RenewLeaseResponse) ProtoReflect() protoreflect.Message
- func (x *RenewLeaseResponse) Reset()
- func (x *RenewLeaseResponse) String() string
- type StreamJobsRequest
- func (*StreamJobsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamJobsRequest) GetLeaseDurationSecs() int32
- func (x *StreamJobsRequest) GetQueueName() string
- func (x *StreamJobsRequest) GetWorkerId() string
- func (*StreamJobsRequest) ProtoMessage()
- func (x *StreamJobsRequest) ProtoReflect() protoreflect.Message
- func (x *StreamJobsRequest) Reset()
- func (x *StreamJobsRequest) String() string
- type UnimplementedQueueServiceServer
- func (UnimplementedQueueServiceServer) Complete(context.Context, *CompleteRequest) (*CompleteResponse, error)
- func (UnimplementedQueueServiceServer) Dequeue(context.Context, *DequeueRequest) (*DequeueResponse, error)
- func (UnimplementedQueueServiceServer) Enqueue(context.Context, *EnqueueRequest) (*EnqueueResponse, error)
- func (UnimplementedQueueServiceServer) Fail(context.Context, *FailRequest) (*FailResponse, error)
- func (UnimplementedQueueServiceServer) GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
- func (UnimplementedQueueServiceServer) GetQueueStats(context.Context, *GetQueueStatsRequest) (*GetQueueStatsResponse, error)
- func (UnimplementedQueueServiceServer) ProcessJobs(grpc.BidiStreamingServer[ProcessRequest, ProcessResponse]) error
- func (UnimplementedQueueServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*RenewLeaseResponse, error)
- func (UnimplementedQueueServiceServer) StreamJobs(*StreamJobsRequest, grpc.ServerStreamingServer[Job]) error
- type UnimplementedWorkerServiceServer
- func (UnimplementedWorkerServiceServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)
- func (UnimplementedWorkerServiceServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
- func (UnimplementedWorkerServiceServer) Register(context.Context, *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
- type UnsafeQueueServiceServer
- type UnsafeWorkerServiceServer
- type WorkerServiceClient
- type WorkerServiceServer
Constants ¶
const ( QueueService_Enqueue_FullMethodName = "/spooled.v1.QueueService/Enqueue" QueueService_Dequeue_FullMethodName = "/spooled.v1.QueueService/Dequeue" QueueService_Complete_FullMethodName = "/spooled.v1.QueueService/Complete" QueueService_Fail_FullMethodName = "/spooled.v1.QueueService/Fail" QueueService_RenewLease_FullMethodName = "/spooled.v1.QueueService/RenewLease" QueueService_GetJob_FullMethodName = "/spooled.v1.QueueService/GetJob" QueueService_GetQueueStats_FullMethodName = "/spooled.v1.QueueService/GetQueueStats" QueueService_StreamJobs_FullMethodName = "/spooled.v1.QueueService/StreamJobs" QueueService_ProcessJobs_FullMethodName = "/spooled.v1.QueueService/ProcessJobs" )
const ( WorkerService_Register_FullMethodName = "/spooled.v1.WorkerService/Register" WorkerService_Heartbeat_FullMethodName = "/spooled.v1.WorkerService/Heartbeat" WorkerService_Deregister_FullMethodName = "/spooled.v1.WorkerService/Deregister" )
Variables ¶
var ( JobStatus_name = map[int32]string{ 0: "JOB_STATUS_UNSPECIFIED", 1: "JOB_STATUS_PENDING", 2: "JOB_STATUS_SCHEDULED", 3: "JOB_STATUS_PROCESSING", 4: "JOB_STATUS_COMPLETED", 5: "JOB_STATUS_FAILED", 6: "JOB_STATUS_DEADLETTER", 7: "JOB_STATUS_CANCELLED", } JobStatus_value = map[string]int32{ "JOB_STATUS_UNSPECIFIED": 0, "JOB_STATUS_PENDING": 1, "JOB_STATUS_SCHEDULED": 2, "JOB_STATUS_PROCESSING": 3, "JOB_STATUS_COMPLETED": 4, "JOB_STATUS_FAILED": 5, "JOB_STATUS_DEADLETTER": 6, "JOB_STATUS_CANCELLED": 7, } )
Enum value maps for JobStatus.
var File_spooled_proto protoreflect.FileDescriptor
var QueueService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "spooled.v1.QueueService", HandlerType: (*QueueServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Enqueue", Handler: _QueueService_Enqueue_Handler, }, { MethodName: "Dequeue", Handler: _QueueService_Dequeue_Handler, }, { MethodName: "Complete", Handler: _QueueService_Complete_Handler, }, { MethodName: "Fail", Handler: _QueueService_Fail_Handler, }, { MethodName: "RenewLease", Handler: _QueueService_RenewLease_Handler, }, { MethodName: "GetJob", Handler: _QueueService_GetJob_Handler, }, { MethodName: "GetQueueStats", Handler: _QueueService_GetQueueStats_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamJobs", Handler: _QueueService_StreamJobs_Handler, ServerStreams: true, }, { StreamName: "ProcessJobs", Handler: _QueueService_ProcessJobs_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "spooled.proto", }
QueueService_ServiceDesc is the grpc.ServiceDesc for QueueService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var WorkerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "spooled.v1.WorkerService", HandlerType: (*WorkerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _WorkerService_Register_Handler, }, { MethodName: "Heartbeat", Handler: _WorkerService_Heartbeat_Handler, }, { MethodName: "Deregister", Handler: _WorkerService_Deregister_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "spooled.proto", }
WorkerService_ServiceDesc is the grpc.ServiceDesc for WorkerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterQueueServiceServer ¶
func RegisterQueueServiceServer(s grpc.ServiceRegistrar, srv QueueServiceServer)
func RegisterWorkerServiceServer ¶
func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)
Types ¶
type CompleteRequest ¶
type CompleteRequest struct {
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
Result *structpb.Struct `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
// Lease fencing token from the dequeued Job. When set, the completion
// succeeds only if it matches the job's current lease.
LeaseId string `protobuf:"bytes,4,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
// contains filtered or unexported fields
}
Complete Request
func (*CompleteRequest) Descriptor
deprecated
func (*CompleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompleteRequest.ProtoReflect.Descriptor instead.
func (*CompleteRequest) GetJobId ¶
func (x *CompleteRequest) GetJobId() string
func (*CompleteRequest) GetLeaseId ¶ added in v1.0.19
func (x *CompleteRequest) GetLeaseId() string
func (*CompleteRequest) GetResult ¶
func (x *CompleteRequest) GetResult() *structpb.Struct
func (*CompleteRequest) GetWorkerId ¶
func (x *CompleteRequest) GetWorkerId() string
func (*CompleteRequest) ProtoMessage ¶
func (*CompleteRequest) ProtoMessage()
func (*CompleteRequest) ProtoReflect ¶
func (x *CompleteRequest) ProtoReflect() protoreflect.Message
func (*CompleteRequest) Reset ¶
func (x *CompleteRequest) Reset()
func (*CompleteRequest) String ¶
func (x *CompleteRequest) String() string
type CompleteResponse ¶
type CompleteResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
Complete Response
func (*CompleteResponse) Descriptor
deprecated
func (*CompleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompleteResponse.ProtoReflect.Descriptor instead.
func (*CompleteResponse) GetSuccess ¶
func (x *CompleteResponse) GetSuccess() bool
func (*CompleteResponse) ProtoMessage ¶
func (*CompleteResponse) ProtoMessage()
func (*CompleteResponse) ProtoReflect ¶
func (x *CompleteResponse) ProtoReflect() protoreflect.Message
func (*CompleteResponse) Reset ¶
func (x *CompleteResponse) Reset()
func (*CompleteResponse) String ¶
func (x *CompleteResponse) String() string
type DequeueRequest ¶
type DequeueRequest struct {
QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
LeaseDurationSecs int32 `protobuf:"varint,3,opt,name=lease_duration_secs,json=leaseDurationSecs,proto3" json:"lease_duration_secs,omitempty"`
BatchSize int32 `protobuf:"varint,4,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` // How many jobs to dequeue at once
// contains filtered or unexported fields
}
Dequeue Request
func (*DequeueRequest) Descriptor
deprecated
func (*DequeueRequest) Descriptor() ([]byte, []int)
Deprecated: Use DequeueRequest.ProtoReflect.Descriptor instead.
func (*DequeueRequest) GetBatchSize ¶
func (x *DequeueRequest) GetBatchSize() int32
func (*DequeueRequest) GetLeaseDurationSecs ¶
func (x *DequeueRequest) GetLeaseDurationSecs() int32
func (*DequeueRequest) GetQueueName ¶
func (x *DequeueRequest) GetQueueName() string
func (*DequeueRequest) GetWorkerId ¶
func (x *DequeueRequest) GetWorkerId() string
func (*DequeueRequest) ProtoMessage ¶
func (*DequeueRequest) ProtoMessage()
func (*DequeueRequest) ProtoReflect ¶
func (x *DequeueRequest) ProtoReflect() protoreflect.Message
func (*DequeueRequest) Reset ¶
func (x *DequeueRequest) Reset()
func (*DequeueRequest) String ¶
func (x *DequeueRequest) String() string
type DequeueResponse ¶
type DequeueResponse struct {
Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"`
// contains filtered or unexported fields
}
Dequeue Response
func (*DequeueResponse) Descriptor
deprecated
func (*DequeueResponse) Descriptor() ([]byte, []int)
Deprecated: Use DequeueResponse.ProtoReflect.Descriptor instead.
func (*DequeueResponse) GetJobs ¶
func (x *DequeueResponse) GetJobs() []*Job
func (*DequeueResponse) ProtoMessage ¶
func (*DequeueResponse) ProtoMessage()
func (*DequeueResponse) ProtoReflect ¶
func (x *DequeueResponse) ProtoReflect() protoreflect.Message
func (*DequeueResponse) Reset ¶
func (x *DequeueResponse) Reset()
func (*DequeueResponse) String ¶
func (x *DequeueResponse) String() string
type DeregisterRequest ¶
type DeregisterRequest struct {
WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
// contains filtered or unexported fields
}
Deregister Request
func (*DeregisterRequest) Descriptor
deprecated
func (*DeregisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeregisterRequest.ProtoReflect.Descriptor instead.
func (*DeregisterRequest) GetWorkerId ¶
func (x *DeregisterRequest) GetWorkerId() string
func (*DeregisterRequest) ProtoMessage ¶
func (*DeregisterRequest) ProtoMessage()
func (*DeregisterRequest) ProtoReflect ¶
func (x *DeregisterRequest) ProtoReflect() protoreflect.Message
func (*DeregisterRequest) Reset ¶
func (x *DeregisterRequest) Reset()
func (*DeregisterRequest) String ¶
func (x *DeregisterRequest) String() string
type DeregisterResponse ¶
type DeregisterResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
Deregister Response
func (*DeregisterResponse) Descriptor
deprecated
func (*DeregisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeregisterResponse.ProtoReflect.Descriptor instead.
func (*DeregisterResponse) GetSuccess ¶
func (x *DeregisterResponse) GetSuccess() bool
func (*DeregisterResponse) ProtoMessage ¶
func (*DeregisterResponse) ProtoMessage()
func (*DeregisterResponse) ProtoReflect ¶
func (x *DeregisterResponse) ProtoReflect() protoreflect.Message
func (*DeregisterResponse) Reset ¶
func (x *DeregisterResponse) Reset()
func (*DeregisterResponse) String ¶
func (x *DeregisterResponse) String() string
type EnqueueRequest ¶
type EnqueueRequest struct {
QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
Payload *structpb.Struct `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
Priority int32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
TimeoutSeconds int32 `protobuf:"varint,5,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"`
IdempotencyKey string `protobuf:"bytes,7,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
Tags map[string]string `` /* 135-byte string literal not displayed */
// contains filtered or unexported fields
}
Enqueue Request
func (*EnqueueRequest) Descriptor
deprecated
func (*EnqueueRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnqueueRequest.ProtoReflect.Descriptor instead.
func (*EnqueueRequest) GetIdempotencyKey ¶
func (x *EnqueueRequest) GetIdempotencyKey() string
func (*EnqueueRequest) GetMaxRetries ¶
func (x *EnqueueRequest) GetMaxRetries() int32
func (*EnqueueRequest) GetPayload ¶
func (x *EnqueueRequest) GetPayload() *structpb.Struct
func (*EnqueueRequest) GetPriority ¶
func (x *EnqueueRequest) GetPriority() int32
func (*EnqueueRequest) GetQueueName ¶
func (x *EnqueueRequest) GetQueueName() string
func (*EnqueueRequest) GetScheduledAt ¶
func (x *EnqueueRequest) GetScheduledAt() *timestamppb.Timestamp
func (*EnqueueRequest) GetTags ¶
func (x *EnqueueRequest) GetTags() map[string]string
func (*EnqueueRequest) GetTimeoutSeconds ¶
func (x *EnqueueRequest) GetTimeoutSeconds() int32
func (*EnqueueRequest) ProtoMessage ¶
func (*EnqueueRequest) ProtoMessage()
func (*EnqueueRequest) ProtoReflect ¶
func (x *EnqueueRequest) ProtoReflect() protoreflect.Message
func (*EnqueueRequest) Reset ¶
func (x *EnqueueRequest) Reset()
func (*EnqueueRequest) String ¶
func (x *EnqueueRequest) String() string
type EnqueueResponse ¶
type EnqueueResponse struct {
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
Created bool `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` // false if idempotent (existing job)
// contains filtered or unexported fields
}
Enqueue Response
func (*EnqueueResponse) Descriptor
deprecated
func (*EnqueueResponse) Descriptor() ([]byte, []int)
Deprecated: Use EnqueueResponse.ProtoReflect.Descriptor instead.
func (*EnqueueResponse) GetCreated ¶
func (x *EnqueueResponse) GetCreated() bool
func (*EnqueueResponse) GetJobId ¶
func (x *EnqueueResponse) GetJobId() string
func (*EnqueueResponse) ProtoMessage ¶
func (*EnqueueResponse) ProtoMessage()
func (*EnqueueResponse) ProtoReflect ¶
func (x *EnqueueResponse) ProtoReflect() protoreflect.Message
func (*EnqueueResponse) Reset ¶
func (x *EnqueueResponse) Reset()
func (*EnqueueResponse) String ¶
func (x *EnqueueResponse) String() string
type ErrorResponse ¶
type ErrorResponse struct {
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Error Response
func (*ErrorResponse) Descriptor
deprecated
func (*ErrorResponse) Descriptor() ([]byte, []int)
Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
func (*ErrorResponse) GetCode ¶
func (x *ErrorResponse) GetCode() string
func (*ErrorResponse) GetMessage ¶
func (x *ErrorResponse) GetMessage() string
func (*ErrorResponse) ProtoMessage ¶
func (*ErrorResponse) ProtoMessage()
func (*ErrorResponse) ProtoReflect ¶
func (x *ErrorResponse) ProtoReflect() protoreflect.Message
func (*ErrorResponse) Reset ¶
func (x *ErrorResponse) Reset()
func (*ErrorResponse) String ¶
func (x *ErrorResponse) String() string
type FailRequest ¶
type FailRequest struct {
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
Retry bool `protobuf:"varint,4,opt,name=retry,proto3" json:"retry,omitempty"` // Whether to retry or move to DLQ
// Lease fencing token from the dequeued Job. When set, the failure
// succeeds only if it matches the job's current lease.
LeaseId string `protobuf:"bytes,5,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
// contains filtered or unexported fields
}
Fail Request
func (*FailRequest) Descriptor
deprecated
func (*FailRequest) Descriptor() ([]byte, []int)
Deprecated: Use FailRequest.ProtoReflect.Descriptor instead.
func (*FailRequest) GetError ¶
func (x *FailRequest) GetError() string
func (*FailRequest) GetJobId ¶
func (x *FailRequest) GetJobId() string
func (*FailRequest) GetLeaseId ¶ added in v1.0.19
func (x *FailRequest) GetLeaseId() string
func (*FailRequest) GetRetry ¶
func (x *FailRequest) GetRetry() bool
func (*FailRequest) GetWorkerId ¶
func (x *FailRequest) GetWorkerId() string
func (*FailRequest) ProtoMessage ¶
func (*FailRequest) ProtoMessage()
func (*FailRequest) ProtoReflect ¶
func (x *FailRequest) ProtoReflect() protoreflect.Message
func (*FailRequest) Reset ¶
func (x *FailRequest) Reset()
func (*FailRequest) String ¶
func (x *FailRequest) String() string
type FailResponse ¶
type FailResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
WillRetry bool `protobuf:"varint,2,opt,name=will_retry,json=willRetry,proto3" json:"will_retry,omitempty"`
NextRetryDelaySecs int32 `protobuf:"varint,3,opt,name=next_retry_delay_secs,json=nextRetryDelaySecs,proto3" json:"next_retry_delay_secs,omitempty"`
// contains filtered or unexported fields
}
Fail Response
func (*FailResponse) Descriptor
deprecated
func (*FailResponse) Descriptor() ([]byte, []int)
Deprecated: Use FailResponse.ProtoReflect.Descriptor instead.
func (*FailResponse) GetNextRetryDelaySecs ¶
func (x *FailResponse) GetNextRetryDelaySecs() int32
func (*FailResponse) GetSuccess ¶
func (x *FailResponse) GetSuccess() bool
func (*FailResponse) GetWillRetry ¶
func (x *FailResponse) GetWillRetry() bool
func (*FailResponse) ProtoMessage ¶
func (*FailResponse) ProtoMessage()
func (*FailResponse) ProtoReflect ¶
func (x *FailResponse) ProtoReflect() protoreflect.Message
func (*FailResponse) Reset ¶
func (x *FailResponse) Reset()
func (*FailResponse) String ¶
func (x *FailResponse) String() string
type GetJobRequest ¶
type GetJobRequest struct {
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
// contains filtered or unexported fields
}
Get Job Request
func (*GetJobRequest) Descriptor
deprecated
func (*GetJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead.
func (*GetJobRequest) GetJobId ¶
func (x *GetJobRequest) GetJobId() string
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 GetJobResponse ¶
type GetJobResponse struct {
Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"`
// contains filtered or unexported fields
}
Get Job Response
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 GetQueueStatsRequest ¶
type GetQueueStatsRequest struct {
QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
// contains filtered or unexported fields
}
Get Queue Stats Request
func (*GetQueueStatsRequest) Descriptor
deprecated
func (*GetQueueStatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetQueueStatsRequest.ProtoReflect.Descriptor instead.
func (*GetQueueStatsRequest) GetQueueName ¶
func (x *GetQueueStatsRequest) GetQueueName() string
func (*GetQueueStatsRequest) ProtoMessage ¶
func (*GetQueueStatsRequest) ProtoMessage()
func (*GetQueueStatsRequest) ProtoReflect ¶
func (x *GetQueueStatsRequest) ProtoReflect() protoreflect.Message
func (*GetQueueStatsRequest) Reset ¶
func (x *GetQueueStatsRequest) Reset()
func (*GetQueueStatsRequest) String ¶
func (x *GetQueueStatsRequest) String() string
type GetQueueStatsResponse ¶
type GetQueueStatsResponse struct {
QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
Pending int64 `protobuf:"varint,2,opt,name=pending,proto3" json:"pending,omitempty"`
Scheduled int64 `protobuf:"varint,3,opt,name=scheduled,proto3" json:"scheduled,omitempty"`
Processing int64 `protobuf:"varint,4,opt,name=processing,proto3" json:"processing,omitempty"`
Completed int64 `protobuf:"varint,5,opt,name=completed,proto3" json:"completed,omitempty"`
Failed int64 `protobuf:"varint,6,opt,name=failed,proto3" json:"failed,omitempty"`
Deadletter int64 `protobuf:"varint,7,opt,name=deadletter,proto3" json:"deadletter,omitempty"`
Total int64 `protobuf:"varint,8,opt,name=total,proto3" json:"total,omitempty"`
MaxAgeMs int64 `protobuf:"varint,9,opt,name=max_age_ms,json=maxAgeMs,proto3" json:"max_age_ms,omitempty"` // Age of oldest pending job
// contains filtered or unexported fields
}
Get Queue Stats Response
func (*GetQueueStatsResponse) Descriptor
deprecated
func (*GetQueueStatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetQueueStatsResponse.ProtoReflect.Descriptor instead.
func (*GetQueueStatsResponse) GetCompleted ¶
func (x *GetQueueStatsResponse) GetCompleted() int64
func (*GetQueueStatsResponse) GetDeadletter ¶
func (x *GetQueueStatsResponse) GetDeadletter() int64
func (*GetQueueStatsResponse) GetFailed ¶
func (x *GetQueueStatsResponse) GetFailed() int64
func (*GetQueueStatsResponse) GetMaxAgeMs ¶
func (x *GetQueueStatsResponse) GetMaxAgeMs() int64
func (*GetQueueStatsResponse) GetPending ¶
func (x *GetQueueStatsResponse) GetPending() int64
func (*GetQueueStatsResponse) GetProcessing ¶
func (x *GetQueueStatsResponse) GetProcessing() int64
func (*GetQueueStatsResponse) GetQueueName ¶
func (x *GetQueueStatsResponse) GetQueueName() string
func (*GetQueueStatsResponse) GetScheduled ¶
func (x *GetQueueStatsResponse) GetScheduled() int64
func (*GetQueueStatsResponse) GetTotal ¶
func (x *GetQueueStatsResponse) GetTotal() int64
func (*GetQueueStatsResponse) ProtoMessage ¶
func (*GetQueueStatsResponse) ProtoMessage()
func (*GetQueueStatsResponse) ProtoReflect ¶
func (x *GetQueueStatsResponse) ProtoReflect() protoreflect.Message
func (*GetQueueStatsResponse) Reset ¶
func (x *GetQueueStatsResponse) Reset()
func (*GetQueueStatsResponse) String ¶
func (x *GetQueueStatsResponse) String() string
type HeartbeatRequest ¶
type HeartbeatRequest struct {
WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
CurrentJobs int32 `protobuf:"varint,2,opt,name=current_jobs,json=currentJobs,proto3" json:"current_jobs,omitempty"`
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
Heartbeat Request
func (*HeartbeatRequest) Descriptor
deprecated
func (*HeartbeatRequest) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.
func (*HeartbeatRequest) GetCurrentJobs ¶
func (x *HeartbeatRequest) GetCurrentJobs() int32
func (*HeartbeatRequest) GetMetadata ¶
func (x *HeartbeatRequest) GetMetadata() map[string]string
func (*HeartbeatRequest) GetStatus ¶
func (x *HeartbeatRequest) GetStatus() string
func (*HeartbeatRequest) GetWorkerId ¶
func (x *HeartbeatRequest) GetWorkerId() string
func (*HeartbeatRequest) ProtoMessage ¶
func (*HeartbeatRequest) ProtoMessage()
func (*HeartbeatRequest) ProtoReflect ¶
func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message
func (*HeartbeatRequest) Reset ¶
func (x *HeartbeatRequest) Reset()
func (*HeartbeatRequest) String ¶
func (x *HeartbeatRequest) String() string
type HeartbeatResponse ¶
type HeartbeatResponse struct {
Acknowledged bool `protobuf:"varint,1,opt,name=acknowledged,proto3" json:"acknowledged,omitempty"`
ShouldDrain bool `protobuf:"varint,2,opt,name=should_drain,json=shouldDrain,proto3" json:"should_drain,omitempty"` // Signal to worker to stop accepting new jobs
// contains filtered or unexported fields
}
Heartbeat Response
func (*HeartbeatResponse) Descriptor
deprecated
func (*HeartbeatResponse) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
func (*HeartbeatResponse) GetAcknowledged ¶
func (x *HeartbeatResponse) GetAcknowledged() bool
func (*HeartbeatResponse) GetShouldDrain ¶
func (x *HeartbeatResponse) GetShouldDrain() bool
func (*HeartbeatResponse) ProtoMessage ¶
func (*HeartbeatResponse) ProtoMessage()
func (*HeartbeatResponse) ProtoReflect ¶
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message
func (*HeartbeatResponse) Reset ¶
func (x *HeartbeatResponse) Reset()
func (*HeartbeatResponse) String ¶
func (x *HeartbeatResponse) String() string
type Job ¶
type Job struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
QueueName string `protobuf:"bytes,3,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
Status JobStatus `protobuf:"varint,4,opt,name=status,proto3,enum=spooled.v1.JobStatus" json:"status,omitempty"`
Payload *structpb.Struct `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
Result *structpb.Struct `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"`
RetryCount int32 `protobuf:"varint,7,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
MaxRetries int32 `protobuf:"varint,8,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
LastError string `protobuf:"bytes,9,opt,name=last_error,json=lastError,proto3" json:"last_error,omitempty"`
Priority int32 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"`
TimeoutSeconds int32 `protobuf:"varint,11,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"`
StartedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
CompletedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
LeaseExpiresAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=lease_expires_at,json=leaseExpiresAt,proto3" json:"lease_expires_at,omitempty"`
AssignedWorkerId string `protobuf:"bytes,17,opt,name=assigned_worker_id,json=assignedWorkerId,proto3" json:"assigned_worker_id,omitempty"`
IdempotencyKey string `protobuf:"bytes,18,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
// Fencing token for the current lease. Returned on dequeue; echo it back
// in Complete/Fail/RenewLease to guarantee the operation applies only to
// the lease this worker actually holds (empty = legacy worker_id fence).
LeaseId string `protobuf:"bytes,19,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
// contains filtered or unexported fields
}
Job message
func (*Job) Descriptor
deprecated
func (*Job) GetAssignedWorkerId ¶
func (*Job) GetCompletedAt ¶
func (x *Job) GetCompletedAt() *timestamppb.Timestamp
func (*Job) GetCreatedAt ¶
func (x *Job) GetCreatedAt() *timestamppb.Timestamp
func (*Job) GetIdempotencyKey ¶
func (*Job) GetLastError ¶
func (*Job) GetLeaseExpiresAt ¶
func (x *Job) GetLeaseExpiresAt() *timestamppb.Timestamp
func (*Job) GetLeaseId ¶ added in v1.0.19
func (*Job) GetMaxRetries ¶
func (*Job) GetOrganizationId ¶
func (*Job) GetPayload ¶
func (*Job) GetPriority ¶
func (*Job) GetQueueName ¶
func (*Job) GetRetryCount ¶
func (*Job) GetScheduledAt ¶
func (x *Job) GetScheduledAt() *timestamppb.Timestamp
func (*Job) GetStartedAt ¶
func (x *Job) GetStartedAt() *timestamppb.Timestamp
func (*Job) GetTimeoutSeconds ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type JobStatus ¶
type JobStatus int32
Job status enumeration
const ( JobStatus_JOB_STATUS_UNSPECIFIED JobStatus = 0 JobStatus_JOB_STATUS_PENDING JobStatus = 1 JobStatus_JOB_STATUS_SCHEDULED JobStatus = 2 JobStatus_JOB_STATUS_PROCESSING JobStatus = 3 JobStatus_JOB_STATUS_COMPLETED JobStatus = 4 JobStatus_JOB_STATUS_FAILED JobStatus = 5 JobStatus_JOB_STATUS_DEADLETTER JobStatus = 6 JobStatus_JOB_STATUS_CANCELLED JobStatus = 7 )
func (JobStatus) Descriptor ¶
func (JobStatus) Descriptor() protoreflect.EnumDescriptor
func (JobStatus) EnumDescriptor
deprecated
func (JobStatus) Number ¶
func (x JobStatus) Number() protoreflect.EnumNumber
func (JobStatus) Type ¶
func (JobStatus) Type() protoreflect.EnumType
type ProcessRequest ¶
type ProcessRequest struct {
// Types that are valid to be assigned to Request:
//
// *ProcessRequest_Dequeue
// *ProcessRequest_Complete
// *ProcessRequest_Fail
// *ProcessRequest_RenewLease
Request isProcessRequest_Request `protobuf_oneof:"request"`
// contains filtered or unexported fields
}
Process Request (for bidirectional streaming)
func (*ProcessRequest) Descriptor
deprecated
func (*ProcessRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessRequest.ProtoReflect.Descriptor instead.
func (*ProcessRequest) GetComplete ¶
func (x *ProcessRequest) GetComplete() *CompleteRequest
func (*ProcessRequest) GetDequeue ¶
func (x *ProcessRequest) GetDequeue() *DequeueRequest
func (*ProcessRequest) GetFail ¶
func (x *ProcessRequest) GetFail() *FailRequest
func (*ProcessRequest) GetRenewLease ¶
func (x *ProcessRequest) GetRenewLease() *RenewLeaseRequest
func (*ProcessRequest) GetRequest ¶
func (x *ProcessRequest) GetRequest() isProcessRequest_Request
func (*ProcessRequest) ProtoMessage ¶
func (*ProcessRequest) ProtoMessage()
func (*ProcessRequest) ProtoReflect ¶
func (x *ProcessRequest) ProtoReflect() protoreflect.Message
func (*ProcessRequest) Reset ¶
func (x *ProcessRequest) Reset()
func (*ProcessRequest) String ¶
func (x *ProcessRequest) String() string
type ProcessRequest_Complete ¶
type ProcessRequest_Complete struct {
Complete *CompleteRequest `protobuf:"bytes,2,opt,name=complete,proto3,oneof"`
}
type ProcessRequest_Dequeue ¶
type ProcessRequest_Dequeue struct {
Dequeue *DequeueRequest `protobuf:"bytes,1,opt,name=dequeue,proto3,oneof"`
}
type ProcessRequest_Fail ¶
type ProcessRequest_Fail struct {
Fail *FailRequest `protobuf:"bytes,3,opt,name=fail,proto3,oneof"`
}
type ProcessRequest_RenewLease ¶
type ProcessRequest_RenewLease struct {
RenewLease *RenewLeaseRequest `protobuf:"bytes,4,opt,name=renew_lease,json=renewLease,proto3,oneof"`
}
type ProcessResponse ¶
type ProcessResponse struct {
// Types that are valid to be assigned to Response:
//
// *ProcessResponse_Job
// *ProcessResponse_Complete
// *ProcessResponse_Fail
// *ProcessResponse_RenewLease
// *ProcessResponse_Error
Response isProcessResponse_Response `protobuf_oneof:"response"`
// contains filtered or unexported fields
}
Process Response (for bidirectional streaming)
func (*ProcessResponse) Descriptor
deprecated
func (*ProcessResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessResponse.ProtoReflect.Descriptor instead.
func (*ProcessResponse) GetComplete ¶
func (x *ProcessResponse) GetComplete() *CompleteResponse
func (*ProcessResponse) GetError ¶
func (x *ProcessResponse) GetError() *ErrorResponse
func (*ProcessResponse) GetFail ¶
func (x *ProcessResponse) GetFail() *FailResponse
func (*ProcessResponse) GetJob ¶
func (x *ProcessResponse) GetJob() *Job
func (*ProcessResponse) GetRenewLease ¶
func (x *ProcessResponse) GetRenewLease() *RenewLeaseResponse
func (*ProcessResponse) GetResponse ¶
func (x *ProcessResponse) GetResponse() isProcessResponse_Response
func (*ProcessResponse) ProtoMessage ¶
func (*ProcessResponse) ProtoMessage()
func (*ProcessResponse) ProtoReflect ¶
func (x *ProcessResponse) ProtoReflect() protoreflect.Message
func (*ProcessResponse) Reset ¶
func (x *ProcessResponse) Reset()
func (*ProcessResponse) String ¶
func (x *ProcessResponse) String() string
type ProcessResponse_Complete ¶
type ProcessResponse_Complete struct {
Complete *CompleteResponse `protobuf:"bytes,2,opt,name=complete,proto3,oneof"`
}
type ProcessResponse_Error ¶
type ProcessResponse_Error struct {
Error *ErrorResponse `protobuf:"bytes,5,opt,name=error,proto3,oneof"`
}
type ProcessResponse_Fail ¶
type ProcessResponse_Fail struct {
Fail *FailResponse `protobuf:"bytes,3,opt,name=fail,proto3,oneof"`
}
type ProcessResponse_Job ¶
type ProcessResponse_Job struct {
Job *Job `protobuf:"bytes,1,opt,name=job,proto3,oneof"`
}
type ProcessResponse_RenewLease ¶
type ProcessResponse_RenewLease struct {
RenewLease *RenewLeaseResponse `protobuf:"bytes,4,opt,name=renew_lease,json=renewLease,proto3,oneof"`
}
type QueueServiceClient ¶
type QueueServiceClient interface {
// Enqueue a new job
Enqueue(ctx context.Context, in *EnqueueRequest, opts ...grpc.CallOption) (*EnqueueResponse, error)
// Dequeue a job (for workers)
Dequeue(ctx context.Context, in *DequeueRequest, opts ...grpc.CallOption) (*DequeueResponse, error)
// Complete a job
Complete(ctx context.Context, in *CompleteRequest, opts ...grpc.CallOption) (*CompleteResponse, error)
// Fail a job
Fail(ctx context.Context, in *FailRequest, opts ...grpc.CallOption) (*FailResponse, error)
// Renew job lease
RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*RenewLeaseResponse, error)
// Get job status
GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error)
// Get queue statistics
GetQueueStats(ctx context.Context, in *GetQueueStatsRequest, opts ...grpc.CallOption) (*GetQueueStatsResponse, error)
// Stream jobs to workers (server-side streaming)
// Note: Streaming is implemented via REST API WebSocket/SSE endpoints:
// - GET /api/v1/ws (WebSocket for bidirectional real-time updates)
// - GET /api/v1/events (SSE for job event streaming)
// - GET /api/v1/events/jobs/{id} (SSE for single job updates)
// - GET /api/v1/events/queues/{name} (SSE for queue updates)
StreamJobs(ctx context.Context, in *StreamJobsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Job], error)
// Bidirectional streaming for real-time job processing
// Note: Use WebSocket endpoint /api/v1/ws for bidirectional communication
ProcessJobs(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ProcessRequest, ProcessResponse], error)
}
QueueServiceClient is the client API for QueueService 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.
Spooled Queue Service High-performance gRPC API for job queue operations
func NewQueueServiceClient ¶
func NewQueueServiceClient(cc grpc.ClientConnInterface) QueueServiceClient
type QueueServiceServer ¶
type QueueServiceServer interface {
// Enqueue a new job
Enqueue(context.Context, *EnqueueRequest) (*EnqueueResponse, error)
// Dequeue a job (for workers)
Dequeue(context.Context, *DequeueRequest) (*DequeueResponse, error)
// Complete a job
Complete(context.Context, *CompleteRequest) (*CompleteResponse, error)
// Fail a job
Fail(context.Context, *FailRequest) (*FailResponse, error)
// Renew job lease
RenewLease(context.Context, *RenewLeaseRequest) (*RenewLeaseResponse, error)
// Get job status
GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
// Get queue statistics
GetQueueStats(context.Context, *GetQueueStatsRequest) (*GetQueueStatsResponse, error)
// Stream jobs to workers (server-side streaming)
// Note: Streaming is implemented via REST API WebSocket/SSE endpoints:
// - GET /api/v1/ws (WebSocket for bidirectional real-time updates)
// - GET /api/v1/events (SSE for job event streaming)
// - GET /api/v1/events/jobs/{id} (SSE for single job updates)
// - GET /api/v1/events/queues/{name} (SSE for queue updates)
StreamJobs(*StreamJobsRequest, grpc.ServerStreamingServer[Job]) error
// Bidirectional streaming for real-time job processing
// Note: Use WebSocket endpoint /api/v1/ws for bidirectional communication
ProcessJobs(grpc.BidiStreamingServer[ProcessRequest, ProcessResponse]) error
// contains filtered or unexported methods
}
QueueServiceServer is the server API for QueueService service. All implementations must embed UnimplementedQueueServiceServer for forward compatibility.
Spooled Queue Service High-performance gRPC API for job queue operations
type QueueService_ProcessJobsClient ¶
type QueueService_ProcessJobsClient = grpc.BidiStreamingClient[ProcessRequest, ProcessResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type QueueService_ProcessJobsServer ¶
type QueueService_ProcessJobsServer = grpc.BidiStreamingServer[ProcessRequest, ProcessResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type QueueService_StreamJobsClient ¶
type QueueService_StreamJobsClient = grpc.ServerStreamingClient[Job]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type QueueService_StreamJobsServer ¶
type QueueService_StreamJobsServer = grpc.ServerStreamingServer[Job]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RegisterWorkerRequest ¶
type RegisterWorkerRequest struct {
QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
WorkerType string `protobuf:"bytes,3,opt,name=worker_type,json=workerType,proto3" json:"worker_type,omitempty"`
MaxConcurrency int32 `protobuf:"varint,4,opt,name=max_concurrency,json=maxConcurrency,proto3" json:"max_concurrency,omitempty"`
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
Worker Registration
func (*RegisterWorkerRequest) Descriptor
deprecated
func (*RegisterWorkerRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterWorkerRequest.ProtoReflect.Descriptor instead.
func (*RegisterWorkerRequest) GetHostname ¶
func (x *RegisterWorkerRequest) GetHostname() string
func (*RegisterWorkerRequest) GetMaxConcurrency ¶
func (x *RegisterWorkerRequest) GetMaxConcurrency() int32
func (*RegisterWorkerRequest) GetMetadata ¶
func (x *RegisterWorkerRequest) GetMetadata() map[string]string
func (*RegisterWorkerRequest) GetQueueName ¶
func (x *RegisterWorkerRequest) GetQueueName() string
func (*RegisterWorkerRequest) GetVersion ¶
func (x *RegisterWorkerRequest) GetVersion() string
func (*RegisterWorkerRequest) GetWorkerType ¶
func (x *RegisterWorkerRequest) GetWorkerType() string
func (*RegisterWorkerRequest) ProtoMessage ¶
func (*RegisterWorkerRequest) ProtoMessage()
func (*RegisterWorkerRequest) ProtoReflect ¶
func (x *RegisterWorkerRequest) ProtoReflect() protoreflect.Message
func (*RegisterWorkerRequest) Reset ¶
func (x *RegisterWorkerRequest) Reset()
func (*RegisterWorkerRequest) String ¶
func (x *RegisterWorkerRequest) String() string
type RegisterWorkerResponse ¶
type RegisterWorkerResponse struct {
WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
LeaseDurationSecs int32 `protobuf:"varint,2,opt,name=lease_duration_secs,json=leaseDurationSecs,proto3" json:"lease_duration_secs,omitempty"`
HeartbeatIntervalSecs int32 `` /* 127-byte string literal not displayed */
// contains filtered or unexported fields
}
Worker Registration Response
func (*RegisterWorkerResponse) Descriptor
deprecated
func (*RegisterWorkerResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterWorkerResponse.ProtoReflect.Descriptor instead.
func (*RegisterWorkerResponse) GetHeartbeatIntervalSecs ¶
func (x *RegisterWorkerResponse) GetHeartbeatIntervalSecs() int32
func (*RegisterWorkerResponse) GetLeaseDurationSecs ¶
func (x *RegisterWorkerResponse) GetLeaseDurationSecs() int32
func (*RegisterWorkerResponse) GetWorkerId ¶
func (x *RegisterWorkerResponse) GetWorkerId() string
func (*RegisterWorkerResponse) ProtoMessage ¶
func (*RegisterWorkerResponse) ProtoMessage()
func (*RegisterWorkerResponse) ProtoReflect ¶
func (x *RegisterWorkerResponse) ProtoReflect() protoreflect.Message
func (*RegisterWorkerResponse) Reset ¶
func (x *RegisterWorkerResponse) Reset()
func (*RegisterWorkerResponse) String ¶
func (x *RegisterWorkerResponse) String() string
type RenewLeaseRequest ¶
type RenewLeaseRequest struct {
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
ExtensionSecs int32 `protobuf:"varint,3,opt,name=extension_secs,json=extensionSecs,proto3" json:"extension_secs,omitempty"`
// Lease fencing token from the dequeued Job. When set, the renewal
// succeeds only if it matches the job's current lease.
LeaseId string `protobuf:"bytes,4,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
// contains filtered or unexported fields
}
Renew Lease Request
func (*RenewLeaseRequest) Descriptor
deprecated
func (*RenewLeaseRequest) Descriptor() ([]byte, []int)
Deprecated: Use RenewLeaseRequest.ProtoReflect.Descriptor instead.
func (*RenewLeaseRequest) GetExtensionSecs ¶
func (x *RenewLeaseRequest) GetExtensionSecs() int32
func (*RenewLeaseRequest) GetJobId ¶
func (x *RenewLeaseRequest) GetJobId() string
func (*RenewLeaseRequest) GetLeaseId ¶ added in v1.0.19
func (x *RenewLeaseRequest) GetLeaseId() string
func (*RenewLeaseRequest) GetWorkerId ¶
func (x *RenewLeaseRequest) GetWorkerId() string
func (*RenewLeaseRequest) ProtoMessage ¶
func (*RenewLeaseRequest) ProtoMessage()
func (*RenewLeaseRequest) ProtoReflect ¶
func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message
func (*RenewLeaseRequest) Reset ¶
func (x *RenewLeaseRequest) Reset()
func (*RenewLeaseRequest) String ¶
func (x *RenewLeaseRequest) String() string
type RenewLeaseResponse ¶
type RenewLeaseResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
NewExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=new_expires_at,json=newExpiresAt,proto3" json:"new_expires_at,omitempty"`
// contains filtered or unexported fields
}
Renew Lease Response
func (*RenewLeaseResponse) Descriptor
deprecated
func (*RenewLeaseResponse) Descriptor() ([]byte, []int)
Deprecated: Use RenewLeaseResponse.ProtoReflect.Descriptor instead.
func (*RenewLeaseResponse) GetNewExpiresAt ¶
func (x *RenewLeaseResponse) GetNewExpiresAt() *timestamppb.Timestamp
func (*RenewLeaseResponse) GetSuccess ¶
func (x *RenewLeaseResponse) GetSuccess() bool
func (*RenewLeaseResponse) ProtoMessage ¶
func (*RenewLeaseResponse) ProtoMessage()
func (*RenewLeaseResponse) ProtoReflect ¶
func (x *RenewLeaseResponse) ProtoReflect() protoreflect.Message
func (*RenewLeaseResponse) Reset ¶
func (x *RenewLeaseResponse) Reset()
func (*RenewLeaseResponse) String ¶
func (x *RenewLeaseResponse) String() string
type StreamJobsRequest ¶
type StreamJobsRequest struct {
QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
LeaseDurationSecs int32 `protobuf:"varint,3,opt,name=lease_duration_secs,json=leaseDurationSecs,proto3" json:"lease_duration_secs,omitempty"`
// contains filtered or unexported fields
}
Stream Jobs Request (server-side streaming)
func (*StreamJobsRequest) Descriptor
deprecated
func (*StreamJobsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamJobsRequest.ProtoReflect.Descriptor instead.
func (*StreamJobsRequest) GetLeaseDurationSecs ¶
func (x *StreamJobsRequest) GetLeaseDurationSecs() int32
func (*StreamJobsRequest) GetQueueName ¶
func (x *StreamJobsRequest) GetQueueName() string
func (*StreamJobsRequest) GetWorkerId ¶
func (x *StreamJobsRequest) GetWorkerId() string
func (*StreamJobsRequest) ProtoMessage ¶
func (*StreamJobsRequest) ProtoMessage()
func (*StreamJobsRequest) ProtoReflect ¶
func (x *StreamJobsRequest) ProtoReflect() protoreflect.Message
func (*StreamJobsRequest) Reset ¶
func (x *StreamJobsRequest) Reset()
func (*StreamJobsRequest) String ¶
func (x *StreamJobsRequest) String() string
type UnimplementedQueueServiceServer ¶
type UnimplementedQueueServiceServer struct{}
UnimplementedQueueServiceServer 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 (UnimplementedQueueServiceServer) Complete ¶
func (UnimplementedQueueServiceServer) Complete(context.Context, *CompleteRequest) (*CompleteResponse, error)
func (UnimplementedQueueServiceServer) Dequeue ¶
func (UnimplementedQueueServiceServer) Dequeue(context.Context, *DequeueRequest) (*DequeueResponse, error)
func (UnimplementedQueueServiceServer) Enqueue ¶
func (UnimplementedQueueServiceServer) Enqueue(context.Context, *EnqueueRequest) (*EnqueueResponse, error)
func (UnimplementedQueueServiceServer) Fail ¶
func (UnimplementedQueueServiceServer) Fail(context.Context, *FailRequest) (*FailResponse, error)
func (UnimplementedQueueServiceServer) GetJob ¶
func (UnimplementedQueueServiceServer) GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
func (UnimplementedQueueServiceServer) GetQueueStats ¶
func (UnimplementedQueueServiceServer) GetQueueStats(context.Context, *GetQueueStatsRequest) (*GetQueueStatsResponse, error)
func (UnimplementedQueueServiceServer) ProcessJobs ¶
func (UnimplementedQueueServiceServer) ProcessJobs(grpc.BidiStreamingServer[ProcessRequest, ProcessResponse]) error
func (UnimplementedQueueServiceServer) RenewLease ¶
func (UnimplementedQueueServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*RenewLeaseResponse, error)
func (UnimplementedQueueServiceServer) StreamJobs ¶
func (UnimplementedQueueServiceServer) StreamJobs(*StreamJobsRequest, grpc.ServerStreamingServer[Job]) error
type UnimplementedWorkerServiceServer ¶
type UnimplementedWorkerServiceServer struct{}
UnimplementedWorkerServiceServer 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 (UnimplementedWorkerServiceServer) Deregister ¶
func (UnimplementedWorkerServiceServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)
func (UnimplementedWorkerServiceServer) Heartbeat ¶
func (UnimplementedWorkerServiceServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
func (UnimplementedWorkerServiceServer) Register ¶
func (UnimplementedWorkerServiceServer) Register(context.Context, *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
type UnsafeQueueServiceServer ¶
type UnsafeQueueServiceServer interface {
// contains filtered or unexported methods
}
UnsafeQueueServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueueServiceServer will result in compilation errors.
type UnsafeWorkerServiceServer ¶
type UnsafeWorkerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWorkerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WorkerServiceServer will result in compilation errors.
type WorkerServiceClient ¶
type WorkerServiceClient interface {
// Register a new worker
Register(ctx context.Context, in *RegisterWorkerRequest, opts ...grpc.CallOption) (*RegisterWorkerResponse, error)
// Send heartbeat
Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
// Deregister worker
Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterResponse, error)
}
WorkerServiceClient is the client API for WorkerService 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.
Worker Service for worker management
func NewWorkerServiceClient ¶
func NewWorkerServiceClient(cc grpc.ClientConnInterface) WorkerServiceClient
type WorkerServiceServer ¶
type WorkerServiceServer interface {
// Register a new worker
Register(context.Context, *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
// Send heartbeat
Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
// Deregister worker
Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)
// contains filtered or unexported methods
}
WorkerServiceServer is the server API for WorkerService service. All implementations must embed UnimplementedWorkerServiceServer for forward compatibility.
Worker Service for worker management