Documentation
¶
Index ¶
- Variables
- func RegisterEntroQServer(s grpc.ServiceRegistrar, srv EntroQServer)
- type ActionType
- type AuthzDep
- func (*AuthzDep) Descriptor() ([]byte, []int)deprecated
- func (x *AuthzDep) GetActions() []ActionType
- func (x *AuthzDep) GetExact() string
- func (x *AuthzDep) GetMsg() string
- func (x *AuthzDep) GetPrefix() string
- func (*AuthzDep) ProtoMessage()
- func (x *AuthzDep) ProtoReflect() protoreflect.Message
- func (x *AuthzDep) Reset()
- func (x *AuthzDep) String() string
- type ClaimRequest
- func (*ClaimRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ClaimRequest) GetClaimantId() string
- func (x *ClaimRequest) GetDurationMs() int64
- func (x *ClaimRequest) GetPollMs() int64
- func (x *ClaimRequest) GetQueues() []string
- func (*ClaimRequest) ProtoMessage()
- func (x *ClaimRequest) ProtoReflect() protoreflect.Message
- func (x *ClaimRequest) Reset()
- func (x *ClaimRequest) String() string
- type ClaimResponse
- type EntroQClient
- type EntroQServer
- type EntroQ_StreamTasksClient
- type EntroQ_StreamTasksServer
- type ModifyDep
- func (*ModifyDep) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyDep) GetId() *TaskID
- func (x *ModifyDep) GetMsg() string
- func (x *ModifyDep) GetType() ActionType
- func (*ModifyDep) ProtoMessage()
- func (x *ModifyDep) ProtoReflect() protoreflect.Message
- func (x *ModifyDep) Reset()
- func (x *ModifyDep) String() string
- type ModifyRequest
- func (*ModifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyRequest) GetChanges() []*TaskChange
- func (x *ModifyRequest) GetClaimantId() string
- func (x *ModifyRequest) GetDeletes() []*TaskID
- func (x *ModifyRequest) GetDepends() []*TaskID
- func (x *ModifyRequest) GetInserts() []*TaskData
- func (*ModifyRequest) ProtoMessage()
- func (x *ModifyRequest) ProtoReflect() protoreflect.Message
- func (x *ModifyRequest) Reset()
- func (x *ModifyRequest) String() string
- type ModifyResponse
- func (*ModifyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyResponse) GetChanged() []*Task
- func (x *ModifyResponse) GetInserted() []*Task
- func (*ModifyResponse) ProtoMessage()
- func (x *ModifyResponse) ProtoReflect() protoreflect.Message
- func (x *ModifyResponse) Reset()
- func (x *ModifyResponse) String() string
- type QueueStats
- func (*QueueStats) Descriptor() ([]byte, []int)deprecated
- func (x *QueueStats) GetMaxClaims() int32
- func (x *QueueStats) GetName() string
- func (x *QueueStats) GetNumAvailable() int32
- func (x *QueueStats) GetNumClaimed() int32
- func (x *QueueStats) GetNumTasks() int32
- func (*QueueStats) ProtoMessage()
- func (x *QueueStats) ProtoReflect() protoreflect.Message
- func (x *QueueStats) Reset()
- func (x *QueueStats) String() string
- type QueuesRequest
- func (*QueuesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueuesRequest) GetLimit() int32
- func (x *QueuesRequest) GetMatchExact() []string
- func (x *QueuesRequest) GetMatchPrefix() []string
- func (*QueuesRequest) ProtoMessage()
- func (x *QueuesRequest) ProtoReflect() protoreflect.Message
- func (x *QueuesRequest) Reset()
- func (x *QueuesRequest) String() string
- type QueuesResponse
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetAtMs() int64
- func (x *Task) GetAttempt() int32
- func (x *Task) GetClaimantId() string
- func (x *Task) GetClaims() int32
- func (x *Task) GetCreatedMs() int64
- func (x *Task) GetErr() string
- func (x *Task) GetId() string
- func (x *Task) GetModifiedMs() int64
- func (x *Task) GetQueue() string
- func (x *Task) GetValue() []byte
- func (x *Task) GetVersion() int32
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type TaskChange
- type TaskData
- func (*TaskData) Descriptor() ([]byte, []int)deprecated
- func (x *TaskData) GetAtMs() int64
- func (x *TaskData) GetAttempt() int32
- func (x *TaskData) GetErr() string
- func (x *TaskData) GetId() string
- func (x *TaskData) GetQueue() string
- func (x *TaskData) GetValue() []byte
- func (*TaskData) ProtoMessage()
- func (x *TaskData) ProtoReflect() protoreflect.Message
- func (x *TaskData) Reset()
- func (x *TaskData) String() string
- type TaskID
- type TasksRequest
- func (*TasksRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TasksRequest) GetClaimantId() string
- func (x *TasksRequest) GetLimit() int32
- func (x *TasksRequest) GetOmitValues() bool
- func (x *TasksRequest) GetQueue() string
- func (x *TasksRequest) GetTaskId() []string
- func (*TasksRequest) ProtoMessage()
- func (x *TasksRequest) ProtoReflect() protoreflect.Message
- func (x *TasksRequest) Reset()
- func (x *TasksRequest) String() string
- type TasksResponse
- type TimeRequest
- type TimeResponse
- type UnimplementedEntroQServer
- func (UnimplementedEntroQServer) Claim(context.Context, *ClaimRequest) (*ClaimResponse, error)
- func (UnimplementedEntroQServer) Modify(context.Context, *ModifyRequest) (*ModifyResponse, error)
- func (UnimplementedEntroQServer) QueueStats(context.Context, *QueuesRequest) (*QueuesResponse, error)
- func (UnimplementedEntroQServer) Queues(context.Context, *QueuesRequest) (*QueuesResponse, error)
- func (UnimplementedEntroQServer) StreamTasks(*TasksRequest, EntroQ_StreamTasksServer) error
- func (UnimplementedEntroQServer) Tasks(context.Context, *TasksRequest) (*TasksResponse, error)
- func (UnimplementedEntroQServer) Time(context.Context, *TimeRequest) (*TimeResponse, error)
- func (UnimplementedEntroQServer) TryClaim(context.Context, *ClaimRequest) (*ClaimResponse, error)
- type UnsafeEntroQServer
Constants ¶
This section is empty.
Variables ¶
var ( ActionType_name = map[int32]string{ 0: "CLAIM", 1: "DELETE", 2: "CHANGE", 3: "DEPEND", 4: "DETAIL", 5: "INSERT", 6: "READ", } ActionType_value = map[string]int32{ "CLAIM": 0, "DELETE": 1, "CHANGE": 2, "DEPEND": 3, "DETAIL": 4, "INSERT": 5, "READ": 6, } )
Enum value maps for ActionType.
var EntroQ_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.EntroQ", HandlerType: (*EntroQServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TryClaim", Handler: _EntroQ_TryClaim_Handler, }, { MethodName: "Claim", Handler: _EntroQ_Claim_Handler, }, { MethodName: "Modify", Handler: _EntroQ_Modify_Handler, }, { MethodName: "Tasks", Handler: _EntroQ_Tasks_Handler, }, { MethodName: "Queues", Handler: _EntroQ_Queues_Handler, }, { MethodName: "QueueStats", Handler: _EntroQ_QueueStats_Handler, }, { MethodName: "Time", Handler: _EntroQ_Time_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamTasks", Handler: _EntroQ_StreamTasks_Handler, ServerStreams: true, }, }, Metadata: "entroq.proto", }
EntroQ_ServiceDesc is the grpc.ServiceDesc for EntroQ service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_entroq_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEntroQServer ¶
func RegisterEntroQServer(s grpc.ServiceRegistrar, srv EntroQServer)
Types ¶
type ActionType ¶
type ActionType int32
const ( ActionType_CLAIM ActionType = 0 ActionType_DELETE ActionType = 1 ActionType_CHANGE ActionType = 2 ActionType_DEPEND ActionType = 3 ActionType_DETAIL ActionType = 4 ActionType_INSERT ActionType = 5 ActionType_READ ActionType = 6 )
func (ActionType) Descriptor ¶
func (ActionType) Descriptor() protoreflect.EnumDescriptor
func (ActionType) Enum ¶
func (x ActionType) Enum() *ActionType
func (ActionType) EnumDescriptor
deprecated
func (ActionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ActionType.Descriptor instead.
func (ActionType) Number ¶
func (x ActionType) Number() protoreflect.EnumNumber
func (ActionType) String ¶
func (x ActionType) String() string
func (ActionType) Type ¶
func (ActionType) Type() protoreflect.EnumType
type AuthzDep ¶
type AuthzDep struct { Actions []ActionType `protobuf:"varint,1,rep,packed,name=actions,proto3,enum=proto.ActionType" json:"actions,omitempty"` // Matching. Exact string `protobuf:"bytes,2,opt,name=exact,proto3" json:"exact,omitempty"` Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` // Errors. When type is DETAIL. Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
AuthzDep can be returned with a gRPC PermissionDenied status indicating which queue/action pairs were not allowed.
func (*AuthzDep) Descriptor
deprecated
func (*AuthzDep) GetActions ¶
func (x *AuthzDep) GetActions() []ActionType
func (*AuthzDep) ProtoMessage ¶
func (*AuthzDep) ProtoMessage()
func (*AuthzDep) ProtoReflect ¶
func (x *AuthzDep) ProtoReflect() protoreflect.Message
type ClaimRequest ¶
type ClaimRequest struct { // The party requesting a task. ClaimantId string `protobuf:"bytes,1,opt,name=claimant_id,json=claimantId,proto3" json:"claimant_id,omitempty"` // The queue names to claim a task from. Queues []string `protobuf:"bytes,2,rep,name=queues,proto3" json:"queues,omitempty"` // The duration of the claim, if/once successful. DurationMs int64 `protobuf:"varint,3,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"` // How long to sleep for a claim (not try claim) between polls. The sleep may be interruptible depending on the backend implementation. PollMs int64 `protobuf:"varint,4,opt,name=poll_ms,json=pollMs,proto3" json:"poll_ms,omitempty"` // contains filtered or unexported fields }
ClaimRequest is sent to attempt to claim a task from a queue. The claimant ID should be unique to the requesting worker (e.g., if multiple workers are in the same process, they should all have different claimant IDs assigned).
func (*ClaimRequest) Descriptor
deprecated
func (*ClaimRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClaimRequest.ProtoReflect.Descriptor instead.
func (*ClaimRequest) GetClaimantId ¶
func (x *ClaimRequest) GetClaimantId() string
func (*ClaimRequest) GetDurationMs ¶
func (x *ClaimRequest) GetDurationMs() int64
func (*ClaimRequest) GetPollMs ¶
func (x *ClaimRequest) GetPollMs() int64
func (*ClaimRequest) GetQueues ¶
func (x *ClaimRequest) GetQueues() []string
func (*ClaimRequest) ProtoMessage ¶
func (*ClaimRequest) ProtoMessage()
func (*ClaimRequest) ProtoReflect ¶
func (x *ClaimRequest) ProtoReflect() protoreflect.Message
func (*ClaimRequest) Reset ¶
func (x *ClaimRequest) Reset()
func (*ClaimRequest) String ¶
func (x *ClaimRequest) String() string
type ClaimResponse ¶
type ClaimResponse struct { Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` // contains filtered or unexported fields }
ClaimResponse is returned when a claim is fulfilled or becomes obviously impossible.
For TryClaim calls, if no task is available, the task will be empty and the status code sent to the client will be OK.
For Claim calls, the lack of a task is an error, usually a timeout or cancelation.
func (*ClaimResponse) Descriptor
deprecated
func (*ClaimResponse) Descriptor() ([]byte, []int)
Deprecated: Use ClaimResponse.ProtoReflect.Descriptor instead.
func (*ClaimResponse) GetTask ¶
func (x *ClaimResponse) GetTask() *Task
func (*ClaimResponse) ProtoMessage ¶
func (*ClaimResponse) ProtoMessage()
func (*ClaimResponse) ProtoReflect ¶
func (x *ClaimResponse) ProtoReflect() protoreflect.Message
func (*ClaimResponse) Reset ¶
func (x *ClaimResponse) Reset()
func (*ClaimResponse) String ¶
func (x *ClaimResponse) String() string
type EntroQClient ¶
type EntroQClient interface { TryClaim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error) Modify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*ModifyResponse, error) Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksResponse, error) Queues(ctx context.Context, in *QueuesRequest, opts ...grpc.CallOption) (*QueuesResponse, error) QueueStats(ctx context.Context, in *QueuesRequest, opts ...grpc.CallOption) (*QueuesResponse, error) Time(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, error) // This is set to stream TasksResponse instead of just sending all tasks in a // single one. Typically this will have one task per response, but it is best // for the client to consume however many there are. StreamTasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (EntroQ_StreamTasksClient, error) }
EntroQClient is the client API for EntroQ 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.
func NewEntroQClient ¶
func NewEntroQClient(cc grpc.ClientConnInterface) EntroQClient
type EntroQServer ¶
type EntroQServer interface { TryClaim(context.Context, *ClaimRequest) (*ClaimResponse, error) Claim(context.Context, *ClaimRequest) (*ClaimResponse, error) Modify(context.Context, *ModifyRequest) (*ModifyResponse, error) Tasks(context.Context, *TasksRequest) (*TasksResponse, error) Queues(context.Context, *QueuesRequest) (*QueuesResponse, error) QueueStats(context.Context, *QueuesRequest) (*QueuesResponse, error) Time(context.Context, *TimeRequest) (*TimeResponse, error) // This is set to stream TasksResponse instead of just sending all tasks in a // single one. Typically this will have one task per response, but it is best // for the client to consume however many there are. StreamTasks(*TasksRequest, EntroQ_StreamTasksServer) error // contains filtered or unexported methods }
EntroQServer is the server API for EntroQ service. All implementations must embed UnimplementedEntroQServer for forward compatibility
type EntroQ_StreamTasksClient ¶
type EntroQ_StreamTasksClient interface { Recv() (*TasksResponse, error) grpc.ClientStream }
type EntroQ_StreamTasksServer ¶
type EntroQ_StreamTasksServer interface { Send(*TasksResponse) error grpc.ServerStream }
type ModifyDep ¶
type ModifyDep struct { Type ActionType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.ActionType" json:"type,omitempty"` Id *TaskID `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // Usually only used with type=DETAIL. // contains filtered or unexported fields }
ModifyDep can be returned with a gRPC NotFound status indicating which dependencies failed. This is done via the gRPC error return, not directly in the response proto.
func (*ModifyDep) Descriptor
deprecated
func (*ModifyDep) GetType ¶
func (x *ModifyDep) GetType() ActionType
func (*ModifyDep) ProtoMessage ¶
func (*ModifyDep) ProtoMessage()
func (*ModifyDep) ProtoReflect ¶
func (x *ModifyDep) ProtoReflect() protoreflect.Message
type ModifyRequest ¶
type ModifyRequest struct { ClaimantId string `protobuf:"bytes,1,opt,name=claimant_id,json=claimantId,proto3" json:"claimant_id,omitempty"` Inserts []*TaskData `protobuf:"bytes,2,rep,name=inserts,proto3" json:"inserts,omitempty"` Changes []*TaskChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes,omitempty"` Deletes []*TaskID `protobuf:"bytes,4,rep,name=deletes,proto3" json:"deletes,omitempty"` Depends []*TaskID `protobuf:"bytes,5,rep,name=depends,proto3" json:"depends,omitempty"` // contains filtered or unexported fields }
ModifyRequest sends a request to modify a set of tasks with given dependencies. It is performed in a transaction, in which either all suggested modifications succeed and all dependencies are satisfied, or nothing is committed at all. A failure due to dependencies (in any of changes, deletes, or inserts) will be permanent.
All successful changes will cause the requester to become the claimant.
func (*ModifyRequest) Descriptor
deprecated
func (*ModifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ModifyRequest.ProtoReflect.Descriptor instead.
func (*ModifyRequest) GetChanges ¶
func (x *ModifyRequest) GetChanges() []*TaskChange
func (*ModifyRequest) GetClaimantId ¶
func (x *ModifyRequest) GetClaimantId() string
func (*ModifyRequest) GetDeletes ¶
func (x *ModifyRequest) GetDeletes() []*TaskID
func (*ModifyRequest) GetDepends ¶
func (x *ModifyRequest) GetDepends() []*TaskID
func (*ModifyRequest) GetInserts ¶
func (x *ModifyRequest) GetInserts() []*TaskData
func (*ModifyRequest) ProtoMessage ¶
func (*ModifyRequest) ProtoMessage()
func (*ModifyRequest) ProtoReflect ¶
func (x *ModifyRequest) ProtoReflect() protoreflect.Message
func (*ModifyRequest) Reset ¶
func (x *ModifyRequest) Reset()
func (*ModifyRequest) String ¶
func (x *ModifyRequest) String() string
type ModifyResponse ¶
type ModifyResponse struct { Inserted []*Task `protobuf:"bytes,1,rep,name=inserted,proto3" json:"inserted,omitempty"` Changed []*Task `protobuf:"bytes,2,rep,name=changed,proto3" json:"changed,omitempty"` // contains filtered or unexported fields }
ModifyResponse returns inserted and updated tasks when successful. A dependency error (which is permanent) comes through as gRPC's NOT_FOUND code.
func (*ModifyResponse) Descriptor
deprecated
func (*ModifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ModifyResponse.ProtoReflect.Descriptor instead.
func (*ModifyResponse) GetChanged ¶
func (x *ModifyResponse) GetChanged() []*Task
func (*ModifyResponse) GetInserted ¶
func (x *ModifyResponse) GetInserted() []*Task
func (*ModifyResponse) ProtoMessage ¶
func (*ModifyResponse) ProtoMessage()
func (*ModifyResponse) ProtoReflect ¶
func (x *ModifyResponse) ProtoReflect() protoreflect.Message
func (*ModifyResponse) Reset ¶
func (x *ModifyResponse) Reset()
func (*ModifyResponse) String ¶
func (x *ModifyResponse) String() string
type QueueStats ¶
type QueueStats struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` NumTasks int32 `protobuf:"varint,2,opt,name=num_tasks,json=numTasks,proto3" json:"num_tasks,omitempty"` NumClaimed int32 `protobuf:"varint,3,opt,name=num_claimed,json=numClaimed,proto3" json:"num_claimed,omitempty"` NumAvailable int32 `protobuf:"varint,4,opt,name=num_available,json=numAvailable,proto3" json:"num_available,omitempty"` // Maximum claims value for any task in the queue // (can help detect tasks that are causing crashes, etc.) MaxClaims int32 `protobuf:"varint,5,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"` // contains filtered or unexported fields }
QueueStats contains the name of the queue and the number of tasks within it.
func (*QueueStats) Descriptor
deprecated
func (*QueueStats) Descriptor() ([]byte, []int)
Deprecated: Use QueueStats.ProtoReflect.Descriptor instead.
func (*QueueStats) GetMaxClaims ¶
func (x *QueueStats) GetMaxClaims() int32
func (*QueueStats) GetName ¶
func (x *QueueStats) GetName() string
func (*QueueStats) GetNumAvailable ¶
func (x *QueueStats) GetNumAvailable() int32
func (*QueueStats) GetNumClaimed ¶
func (x *QueueStats) GetNumClaimed() int32
func (*QueueStats) GetNumTasks ¶
func (x *QueueStats) GetNumTasks() int32
func (*QueueStats) ProtoMessage ¶
func (*QueueStats) ProtoMessage()
func (*QueueStats) ProtoReflect ¶
func (x *QueueStats) ProtoReflect() protoreflect.Message
func (*QueueStats) Reset ¶
func (x *QueueStats) Reset()
func (*QueueStats) String ¶
func (x *QueueStats) String() string
type QueuesRequest ¶
type QueuesRequest struct { MatchPrefix []string `protobuf:"bytes,1,rep,name=match_prefix,json=matchPrefix,proto3" json:"match_prefix,omitempty"` MatchExact []string `protobuf:"bytes,2,rep,name=match_exact,json=matchExact,proto3" json:"match_exact,omitempty"` Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
QueuesRequest is sent to request a listing of all known queues.
func (*QueuesRequest) Descriptor
deprecated
func (*QueuesRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueuesRequest.ProtoReflect.Descriptor instead.
func (*QueuesRequest) GetLimit ¶
func (x *QueuesRequest) GetLimit() int32
func (*QueuesRequest) GetMatchExact ¶
func (x *QueuesRequest) GetMatchExact() []string
func (*QueuesRequest) GetMatchPrefix ¶
func (x *QueuesRequest) GetMatchPrefix() []string
func (*QueuesRequest) ProtoMessage ¶
func (*QueuesRequest) ProtoMessage()
func (*QueuesRequest) ProtoReflect ¶
func (x *QueuesRequest) ProtoReflect() protoreflect.Message
func (*QueuesRequest) Reset ¶
func (x *QueuesRequest) Reset()
func (*QueuesRequest) String ¶
func (x *QueuesRequest) String() string
type QueuesResponse ¶
type QueuesResponse struct { Queues []*QueueStats `protobuf:"bytes,1,rep,name=queues,proto3" json:"queues,omitempty"` // contains filtered or unexported fields }
QueuesResponse contains the requested list of queue statistics.
func (*QueuesResponse) Descriptor
deprecated
func (*QueuesResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueuesResponse.ProtoReflect.Descriptor instead.
func (*QueuesResponse) GetQueues ¶
func (x *QueuesResponse) GetQueues() []*QueueStats
func (*QueuesResponse) ProtoMessage ¶
func (*QueuesResponse) ProtoMessage()
func (*QueuesResponse) ProtoReflect ¶
func (x *QueuesResponse) ProtoReflect() protoreflect.Message
func (*QueuesResponse) Reset ¶
func (x *QueuesResponse) Reset()
func (*QueuesResponse) String ¶
func (x *QueuesResponse) String() string
type Task ¶
type Task struct { // The name of the queue for this task. Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` // The epoch time in millis when this task becomes available. AtMs int64 `protobuf:"varint,4,opt,name=at_ms,json=atMs,proto3" json:"at_ms,omitempty"` // The UUID representing the claimant (owner) for this task. ClaimantId string `protobuf:"bytes,5,opt,name=claimant_id,json=claimantId,proto3" json:"claimant_id,omitempty"` // The task's opaque payload. Value []byte `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"` // Epoch times in millis for creation and update of this task. CreatedMs int64 `protobuf:"varint,7,opt,name=created_ms,json=createdMs,proto3" json:"created_ms,omitempty"` ModifiedMs int64 `protobuf:"varint,8,opt,name=modified_ms,json=modifiedMs,proto3" json:"modified_ms,omitempty"` // The number of times this has been successfully claimed. Claims int32 `protobuf:"varint,9,opt,name=claims,proto3" json:"claims,omitempty"` // Attempt and Err are used to indicate a "retryable error" with a number of // times attempted. This is used by the worker, and can be changed during // task modification. Attempt int32 `protobuf:"varint,10,opt,name=attempt,proto3" json:"attempt,omitempty"` Err string `protobuf:"bytes,11,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
Task is a complete task object, containing IDs, data, and metadata.
func (*Task) Descriptor
deprecated
func (*Task) GetAttempt ¶
func (*Task) GetClaimantId ¶
func (*Task) GetCreatedMs ¶
func (*Task) GetModifiedMs ¶
func (*Task) GetVersion ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskChange ¶
type TaskChange struct { OldId *TaskID `protobuf:"bytes,1,opt,name=old_id,json=oldId,proto3" json:"old_id,omitempty"` NewData *TaskData `protobuf:"bytes,2,opt,name=new_data,json=newData,proto3" json:"new_data,omitempty"` // contains filtered or unexported fields }
TaskChange identifies a task by ID and specifies the new data it should contain. All fields should be filled in. Empty fields result in deleting data from that field.
func (*TaskChange) Descriptor
deprecated
func (*TaskChange) Descriptor() ([]byte, []int)
Deprecated: Use TaskChange.ProtoReflect.Descriptor instead.
func (*TaskChange) GetNewData ¶
func (x *TaskChange) GetNewData() *TaskData
func (*TaskChange) GetOldId ¶
func (x *TaskChange) GetOldId() *TaskID
func (*TaskChange) ProtoMessage ¶
func (*TaskChange) ProtoMessage()
func (*TaskChange) ProtoReflect ¶
func (x *TaskChange) ProtoReflect() protoreflect.Message
func (*TaskChange) Reset ¶
func (x *TaskChange) Reset()
func (*TaskChange) String ¶
func (x *TaskChange) String() string
type TaskData ¶
type TaskData struct { // The name of the queue for this task. Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // The epoch time in millis when this task becomes available. AtMs int64 `protobuf:"varint,2,opt,name=at_ms,json=atMs,proto3" json:"at_ms,omitempty"` // The task's opaque payload. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // An optional ID (UUID) for an inserted task to use. // Default is for the backend to assign one, and that is sufficient for many // cases. If you desire to make a database entry that *references* a task, // however, in that case it can make sense to specify an explicit task ID for // insertion (allowing "consume -> db update -> modify" worker cycles to // safely update a database entry that references to-be-inserted tasks). Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` // Attempt and Err are used to indicate a "retryable error" with a number of // times attempted. This is used by the worker, and can be changed during // task modification. Attempt int32 `protobuf:"varint,5,opt,name=attempt,proto3" json:"attempt,omitempty"` Err string `protobuf:"bytes,6,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
TaskData contains only the data portion of a task. Useful for insertion and for modifying tasks.
func (*TaskData) Descriptor
deprecated
func (*TaskData) GetAttempt ¶
func (*TaskData) ProtoMessage ¶
func (*TaskData) ProtoMessage()
func (*TaskData) ProtoReflect ¶
func (x *TaskData) ProtoReflect() protoreflect.Message
type TaskID ¶
type TaskID struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // Optional queue name. This usually comes from the task itself, so it will // be present in most use cases. There are some cases where it will be empty, // like when using admin tools with special privileges. Usually you should // set this, as Authorization policies will be looking for it to ensure that // you are allowed to change, delete, or depend on this ID based on the queue // name. Queue string `protobuf:"bytes,3,opt,name=queue,proto3" json:"queue,omitempty"` // contains filtered or unexported fields }
TaskID contains the ID and version of a task. Together these make a unique identifier for that task.
func (*TaskID) Descriptor
deprecated
func (*TaskID) GetVersion ¶
func (*TaskID) ProtoMessage ¶
func (*TaskID) ProtoMessage()
func (*TaskID) ProtoReflect ¶
func (x *TaskID) ProtoReflect() protoreflect.Message
type TasksRequest ¶
type TasksRequest struct { ClaimantId string `protobuf:"bytes,1,opt,name=claimant_id,json=claimantId,proto3" json:"claimant_id,omitempty"` Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // If IDs are specified here, then any task which matches any of these IDs, // and simultaneously fits other specifications, will be returned. // If empty, all tasks that fit other specifications will be returned. TaskId []string `protobuf:"bytes,4,rep,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // If omit_values is true, then only metadata will be returned, no actual values. OmitValues bool `protobuf:"varint,5,opt,name=omit_values,json=omitValues,proto3" json:"omit_values,omitempty"` // contains filtered or unexported fields }
TasksRequest is sent to request a complete listing of tasks for the given queue. If claimant_id is empty, all tasks (not just expired or owned tasks) are returned. Next Tag: 6
func (*TasksRequest) Descriptor
deprecated
func (*TasksRequest) Descriptor() ([]byte, []int)
Deprecated: Use TasksRequest.ProtoReflect.Descriptor instead.
func (*TasksRequest) GetClaimantId ¶
func (x *TasksRequest) GetClaimantId() string
func (*TasksRequest) GetLimit ¶
func (x *TasksRequest) GetLimit() int32
func (*TasksRequest) GetOmitValues ¶
func (x *TasksRequest) GetOmitValues() bool
func (*TasksRequest) GetQueue ¶
func (x *TasksRequest) GetQueue() string
func (*TasksRequest) GetTaskId ¶
func (x *TasksRequest) GetTaskId() []string
func (*TasksRequest) ProtoMessage ¶
func (*TasksRequest) ProtoMessage()
func (*TasksRequest) ProtoReflect ¶
func (x *TasksRequest) ProtoReflect() protoreflect.Message
func (*TasksRequest) Reset ¶
func (x *TasksRequest) Reset()
func (*TasksRequest) String ¶
func (x *TasksRequest) String() string
type TasksResponse ¶
type TasksResponse struct { Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // contains filtered or unexported fields }
TasksReqponse contains the tasks requested.
func (*TasksResponse) Descriptor
deprecated
func (*TasksResponse) Descriptor() ([]byte, []int)
Deprecated: Use TasksResponse.ProtoReflect.Descriptor instead.
func (*TasksResponse) GetTasks ¶
func (x *TasksResponse) GetTasks() []*Task
func (*TasksResponse) ProtoMessage ¶
func (*TasksResponse) ProtoMessage()
func (*TasksResponse) ProtoReflect ¶
func (x *TasksResponse) ProtoReflect() protoreflect.Message
func (*TasksResponse) Reset ¶
func (x *TasksResponse) Reset()
func (*TasksResponse) String ¶
func (x *TasksResponse) String() string
type TimeRequest ¶
type TimeRequest struct {
// contains filtered or unexported fields
}
TimeRequest asks the server for what it thinks is the current time.
func (*TimeRequest) Descriptor
deprecated
func (*TimeRequest) Descriptor() ([]byte, []int)
Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.
func (*TimeRequest) ProtoMessage ¶
func (*TimeRequest) ProtoMessage()
func (*TimeRequest) ProtoReflect ¶
func (x *TimeRequest) ProtoReflect() protoreflect.Message
func (*TimeRequest) Reset ¶
func (x *TimeRequest) Reset()
func (*TimeRequest) String ¶
func (x *TimeRequest) String() string
type TimeResponse ¶
type TimeResponse struct { TimeMs int64 `protobuf:"varint,1,opt,name=time_ms,json=timeMs,proto3" json:"time_ms,omitempty"` // contains filtered or unexported fields }
TimeResponse contains the server's idea of the current time in milliseconds since the epoch.
func (*TimeResponse) Descriptor
deprecated
func (*TimeResponse) Descriptor() ([]byte, []int)
Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.
func (*TimeResponse) GetTimeMs ¶
func (x *TimeResponse) GetTimeMs() int64
func (*TimeResponse) ProtoMessage ¶
func (*TimeResponse) ProtoMessage()
func (*TimeResponse) ProtoReflect ¶
func (x *TimeResponse) ProtoReflect() protoreflect.Message
func (*TimeResponse) Reset ¶
func (x *TimeResponse) Reset()
func (*TimeResponse) String ¶
func (x *TimeResponse) String() string
type UnimplementedEntroQServer ¶
type UnimplementedEntroQServer struct { }
UnimplementedEntroQServer must be embedded to have forward compatible implementations.
func (UnimplementedEntroQServer) Claim ¶
func (UnimplementedEntroQServer) Claim(context.Context, *ClaimRequest) (*ClaimResponse, error)
func (UnimplementedEntroQServer) Modify ¶
func (UnimplementedEntroQServer) Modify(context.Context, *ModifyRequest) (*ModifyResponse, error)
func (UnimplementedEntroQServer) QueueStats ¶
func (UnimplementedEntroQServer) QueueStats(context.Context, *QueuesRequest) (*QueuesResponse, error)
func (UnimplementedEntroQServer) Queues ¶
func (UnimplementedEntroQServer) Queues(context.Context, *QueuesRequest) (*QueuesResponse, error)
func (UnimplementedEntroQServer) StreamTasks ¶
func (UnimplementedEntroQServer) StreamTasks(*TasksRequest, EntroQ_StreamTasksServer) error
func (UnimplementedEntroQServer) Tasks ¶
func (UnimplementedEntroQServer) Tasks(context.Context, *TasksRequest) (*TasksResponse, error)
func (UnimplementedEntroQServer) Time ¶
func (UnimplementedEntroQServer) Time(context.Context, *TimeRequest) (*TimeResponse, error)
func (UnimplementedEntroQServer) TryClaim ¶
func (UnimplementedEntroQServer) TryClaim(context.Context, *ClaimRequest) (*ClaimResponse, error)
type UnsafeEntroQServer ¶
type UnsafeEntroQServer interface {
// contains filtered or unexported methods
}
UnsafeEntroQServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EntroQServer will result in compilation errors.