proto

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

Protocol Buffers

To build new proto code after changing proto files, run ./protoc.sh in this directory.

It will attempt to build a local dockerfile containing the appropriate protoc tools and plugin versions if it is not available at entroq-goprotoc:local. It then mounts this directory and runs the compilation inside the container.

If the container is already built, it will skip that step and just run the tools, so it's only slow on the first invocation.

Note that if you want proto generated files to be updated for other languages, look for relevant directories under the languages in question. Run those scripts, and they work the same way.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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)

View Source
var File_entroq_proto protoreflect.FileDescriptor

Functions

func RegisterEntroQServer

func RegisterEntroQServer(s grpc.ServiceRegistrar, srv EntroQServer)

Types

type ActionType added in v0.5.1

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 added in v0.5.1

func (ActionType) Descriptor() protoreflect.EnumDescriptor

func (ActionType) Enum added in v0.5.1

func (x ActionType) Enum() *ActionType

func (ActionType) EnumDescriptor deprecated added in v0.5.1

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

Deprecated: Use ActionType.Descriptor instead.

func (ActionType) Number added in v0.5.1

func (x ActionType) Number() protoreflect.EnumNumber

func (ActionType) String added in v0.5.1

func (x ActionType) String() string

func (ActionType) Type added in v0.5.1

type AuthzDep added in v0.5.1

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 added in v0.5.1

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

Deprecated: Use AuthzDep.ProtoReflect.Descriptor instead.

func (*AuthzDep) GetActions added in v0.5.1

func (x *AuthzDep) GetActions() []ActionType

func (*AuthzDep) GetExact added in v0.5.1

func (x *AuthzDep) GetExact() string

func (*AuthzDep) GetMsg added in v0.5.1

func (x *AuthzDep) GetMsg() string

func (*AuthzDep) GetPrefix added in v0.5.1

func (x *AuthzDep) GetPrefix() string

func (*AuthzDep) ProtoMessage added in v0.5.1

func (*AuthzDep) ProtoMessage()

func (*AuthzDep) ProtoReflect added in v0.5.1

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

func (*AuthzDep) Reset added in v0.5.1

func (x *AuthzDep) Reset()

func (*AuthzDep) String added in v0.5.1

func (x *AuthzDep) String() string

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 added in v0.3.0

func (x *ClaimRequest) GetQueues() []string

func (*ClaimRequest) ProtoMessage

func (*ClaimRequest) ProtoMessage()

func (*ClaimRequest) ProtoReflect added in v0.4.3

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 added in v0.4.3

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 added in v0.3.9

type EntroQ_StreamTasksClient interface {
	Recv() (*TasksResponse, error)
	grpc.ClientStream
}

type EntroQ_StreamTasksServer added in v0.3.9

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) Descriptor() ([]byte, []int)

Deprecated: Use ModifyDep.ProtoReflect.Descriptor instead.

func (*ModifyDep) GetId

func (x *ModifyDep) GetId() *TaskID

func (*ModifyDep) GetMsg

func (x *ModifyDep) GetMsg() string

func (*ModifyDep) GetType

func (x *ModifyDep) GetType() ActionType

func (*ModifyDep) ProtoMessage

func (*ModifyDep) ProtoMessage()

func (*ModifyDep) ProtoReflect added in v0.4.3

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

func (*ModifyDep) Reset

func (x *ModifyDep) Reset()

func (*ModifyDep) String

func (x *ModifyDep) String() string

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 added in v0.4.3

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 added in v0.4.3

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 added in v0.3.18

func (x *QueueStats) GetMaxClaims() int32

func (*QueueStats) GetName

func (x *QueueStats) GetName() string

func (*QueueStats) GetNumAvailable added in v0.3.3

func (x *QueueStats) GetNumAvailable() int32

func (*QueueStats) GetNumClaimed added in v0.3.3

func (x *QueueStats) GetNumClaimed() int32

func (*QueueStats) GetNumTasks

func (x *QueueStats) GetNumTasks() int32

func (*QueueStats) ProtoMessage

func (*QueueStats) ProtoMessage()

func (*QueueStats) ProtoReflect added in v0.4.3

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 added in v0.4.3

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 added in v0.4.3

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) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetAtMs

func (x *Task) GetAtMs() int64

func (*Task) GetAttempt added in v0.4.3

func (x *Task) GetAttempt() int32

func (*Task) GetClaimantId

func (x *Task) GetClaimantId() string

func (*Task) GetClaims

func (x *Task) GetClaims() int32

func (*Task) GetCreatedMs

func (x *Task) GetCreatedMs() int64

func (*Task) GetErr added in v0.4.3

func (x *Task) GetErr() string

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetModifiedMs

func (x *Task) GetModifiedMs() int64

func (*Task) GetQueue

func (x *Task) GetQueue() string

func (*Task) GetValue

func (x *Task) GetValue() []byte

func (*Task) GetVersion

func (x *Task) GetVersion() int32

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect added in v0.4.3

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

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 added in v0.4.3

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) Descriptor() ([]byte, []int)

Deprecated: Use TaskData.ProtoReflect.Descriptor instead.

func (*TaskData) GetAtMs

func (x *TaskData) GetAtMs() int64

func (*TaskData) GetAttempt added in v0.4.3

func (x *TaskData) GetAttempt() int32

func (*TaskData) GetErr added in v0.4.3

func (x *TaskData) GetErr() string

func (*TaskData) GetId

func (x *TaskData) GetId() string

func (*TaskData) GetQueue

func (x *TaskData) GetQueue() string

func (*TaskData) GetValue

func (x *TaskData) GetValue() []byte

func (*TaskData) ProtoMessage

func (*TaskData) ProtoMessage()

func (*TaskData) ProtoReflect added in v0.4.3

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

func (*TaskData) Reset

func (x *TaskData) Reset()

func (*TaskData) String

func (x *TaskData) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TaskID.ProtoReflect.Descriptor instead.

func (*TaskID) GetId

func (x *TaskID) GetId() string

func (*TaskID) GetQueue added in v0.5.1

func (x *TaskID) GetQueue() string

func (*TaskID) GetVersion

func (x *TaskID) GetVersion() int32

func (*TaskID) ProtoMessage

func (*TaskID) ProtoMessage()

func (*TaskID) ProtoReflect added in v0.4.3

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

func (*TaskID) Reset

func (x *TaskID) Reset()

func (*TaskID) String

func (x *TaskID) String() string

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 added in v0.3.9

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 added in v0.4.3

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 added in v0.4.3

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

func (*TasksResponse) Reset

func (x *TasksResponse) Reset()

func (*TasksResponse) String

func (x *TasksResponse) String() string

type TimeRequest added in v0.2.13

type TimeRequest struct {
	// contains filtered or unexported fields
}

TimeRequest asks the server for what it thinks is the current time.

func (*TimeRequest) Descriptor deprecated added in v0.2.13

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

Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.

func (*TimeRequest) ProtoMessage added in v0.2.13

func (*TimeRequest) ProtoMessage()

func (*TimeRequest) ProtoReflect added in v0.4.3

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

func (*TimeRequest) Reset added in v0.2.13

func (x *TimeRequest) Reset()

func (*TimeRequest) String added in v0.2.13

func (x *TimeRequest) String() string

type TimeResponse added in v0.2.13

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 added in v0.2.13

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

Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.

func (*TimeResponse) GetTimeMs added in v0.2.13

func (x *TimeResponse) GetTimeMs() int64

func (*TimeResponse) ProtoMessage added in v0.2.13

func (*TimeResponse) ProtoMessage()

func (*TimeResponse) ProtoReflect added in v0.4.3

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

func (*TimeResponse) Reset added in v0.2.13

func (x *TimeResponse) Reset()

func (*TimeResponse) String added in v0.2.13

func (x *TimeResponse) String() string

type UnimplementedEntroQServer added in v0.4.3

type UnimplementedEntroQServer struct {
}

UnimplementedEntroQServer must be embedded to have forward compatible implementations.

func (UnimplementedEntroQServer) Claim added in v0.4.3

func (UnimplementedEntroQServer) Modify added in v0.4.3

func (UnimplementedEntroQServer) QueueStats added in v0.4.3

func (UnimplementedEntroQServer) Queues added in v0.4.3

func (UnimplementedEntroQServer) StreamTasks added in v0.4.3

func (UnimplementedEntroQServer) Tasks added in v0.4.3

func (UnimplementedEntroQServer) Time added in v0.4.3

func (UnimplementedEntroQServer) TryClaim added in v0.4.3

type UnsafeEntroQServer added in v0.5.1

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.

Jump to

Keyboard shortcuts

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