Documentation ¶
Overview ¶
The protocol package contains gRPC definitions for the internal services for the saync prototype.
Index ¶
- Variables
- func RegisterTaskManagerServer(s *grpc.Server, srv TaskManagerServer)
- type FinishRequest
- func (*FinishRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FinishRequest) GetId() string
- func (x *FinishRequest) GetResult() []byte
- func (x *FinishRequest) GetResultHeaders() map[string]*HeaderValue
- func (*FinishRequest) ProtoMessage()
- func (x *FinishRequest) ProtoReflect() protoreflect.Message
- func (x *FinishRequest) Reset()
- func (x *FinishRequest) String() string
- type GetRequest
- type HeaderValue
- type NackRequest
- type RenewRequest
- func (*RenewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RenewRequest) GetId() string
- func (x *RenewRequest) GetLeaseUntil() *timestamp.Timestamp
- func (*RenewRequest) ProtoMessage()
- func (x *RenewRequest) ProtoReflect() protoreflect.Message
- func (x *RenewRequest) Reset()
- func (x *RenewRequest) String() string
- type TaskManagerClient
- type TaskManagerServer
- type UnimplementedTaskManagerServer
- func (*UnimplementedTaskManagerServer) Finish(context.Context, *FinishRequest) (*empty.Empty, error)
- func (*UnimplementedTaskManagerServer) Get(context.Context, *GetRequest) (*Work, error)
- func (*UnimplementedTaskManagerServer) Nack(context.Context, *NackRequest) (*empty.Empty, error)
- func (*UnimplementedTaskManagerServer) Renew(context.Context, *RenewRequest) (*empty.Empty, error)
- type Work
- func (*Work) Descriptor() ([]byte, []int)deprecated
- func (x *Work) GetEnqueuedAt() *timestamp.Timestamp
- func (x *Work) GetHeaders() map[string]*HeaderValue
- func (x *Work) GetId() string
- func (x *Work) GetLeasedUntil() *timestamp.Timestamp
- func (x *Work) GetPayload() []byte
- func (*Work) ProtoMessage()
- func (x *Work) ProtoReflect() protoreflect.Message
- func (x *Work) Reset()
- func (x *Work) String() string
Constants ¶
This section is empty.
Variables ¶
var File_taskqueue_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTaskManagerServer ¶
func RegisterTaskManagerServer(s *grpc.Server, srv TaskManagerServer)
Types ¶
type FinishRequest ¶
type FinishRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ResultHeaders map[string]*HeaderValue `` /* 188-byte string literal not displayed */ Result []byte `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*FinishRequest) Descriptor
deprecated
func (*FinishRequest) Descriptor() ([]byte, []int)
Deprecated: Use FinishRequest.ProtoReflect.Descriptor instead.
func (*FinishRequest) GetId ¶
func (x *FinishRequest) GetId() string
func (*FinishRequest) GetResult ¶
func (x *FinishRequest) GetResult() []byte
func (*FinishRequest) GetResultHeaders ¶
func (x *FinishRequest) GetResultHeaders() map[string]*HeaderValue
func (*FinishRequest) ProtoMessage ¶
func (*FinishRequest) ProtoMessage()
func (*FinishRequest) ProtoReflect ¶
func (x *FinishRequest) ProtoReflect() protoreflect.Message
func (*FinishRequest) Reset ¶
func (x *FinishRequest) Reset()
func (*FinishRequest) String ¶
func (x *FinishRequest) String() string
type GetRequest ¶
type GetRequest struct { QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetQueueName ¶
func (x *GetRequest) GetQueueName() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type HeaderValue ¶
type HeaderValue struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*HeaderValue) Descriptor
deprecated
func (*HeaderValue) Descriptor() ([]byte, []int)
Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead.
func (*HeaderValue) GetValue ¶
func (x *HeaderValue) GetValue() []string
func (*HeaderValue) ProtoMessage ¶
func (*HeaderValue) ProtoMessage()
func (*HeaderValue) ProtoReflect ¶
func (x *HeaderValue) ProtoReflect() protoreflect.Message
func (*HeaderValue) Reset ¶
func (x *HeaderValue) Reset()
func (*HeaderValue) String ¶
func (x *HeaderValue) String() string
type NackRequest ¶
type NackRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*NackRequest) Descriptor
deprecated
func (*NackRequest) Descriptor() ([]byte, []int)
Deprecated: Use NackRequest.ProtoReflect.Descriptor instead.
func (*NackRequest) GetError ¶
func (x *NackRequest) GetError() string
func (*NackRequest) GetId ¶
func (x *NackRequest) GetId() string
func (*NackRequest) ProtoMessage ¶
func (*NackRequest) ProtoMessage()
func (*NackRequest) ProtoReflect ¶
func (x *NackRequest) ProtoReflect() protoreflect.Message
func (*NackRequest) Reset ¶
func (x *NackRequest) Reset()
func (*NackRequest) String ¶
func (x *NackRequest) String() string
type RenewRequest ¶
type RenewRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` LeaseUntil *timestamp.Timestamp `protobuf:"bytes,2,opt,name=lease_until,json=leaseUntil,proto3" json:"lease_until,omitempty"` // contains filtered or unexported fields }
func (*RenewRequest) Descriptor
deprecated
func (*RenewRequest) Descriptor() ([]byte, []int)
Deprecated: Use RenewRequest.ProtoReflect.Descriptor instead.
func (*RenewRequest) GetId ¶
func (x *RenewRequest) GetId() string
func (*RenewRequest) GetLeaseUntil ¶
func (x *RenewRequest) GetLeaseUntil() *timestamp.Timestamp
func (*RenewRequest) ProtoMessage ¶
func (*RenewRequest) ProtoMessage()
func (*RenewRequest) ProtoReflect ¶
func (x *RenewRequest) ProtoReflect() protoreflect.Message
func (*RenewRequest) Reset ¶
func (x *RenewRequest) Reset()
func (*RenewRequest) String ¶
func (x *RenewRequest) String() string
type TaskManagerClient ¶
type TaskManagerClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Work, error) Renew(ctx context.Context, in *RenewRequest, opts ...grpc.CallOption) (*empty.Empty, error) Finish(ctx context.Context, in *FinishRequest, opts ...grpc.CallOption) (*empty.Empty, error) Nack(ctx context.Context, in *NackRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
TaskManagerClient is the client API for TaskManager service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTaskManagerClient ¶
func NewTaskManagerClient(cc grpc.ClientConnInterface) TaskManagerClient
type TaskManagerServer ¶
type TaskManagerServer interface { Get(context.Context, *GetRequest) (*Work, error) Renew(context.Context, *RenewRequest) (*empty.Empty, error) Finish(context.Context, *FinishRequest) (*empty.Empty, error) Nack(context.Context, *NackRequest) (*empty.Empty, error) }
TaskManagerServer is the server API for TaskManager service.
type UnimplementedTaskManagerServer ¶
type UnimplementedTaskManagerServer struct { }
UnimplementedTaskManagerServer can be embedded to have forward compatible implementations.
func (*UnimplementedTaskManagerServer) Finish ¶
func (*UnimplementedTaskManagerServer) Finish(context.Context, *FinishRequest) (*empty.Empty, error)
func (*UnimplementedTaskManagerServer) Get ¶
func (*UnimplementedTaskManagerServer) Get(context.Context, *GetRequest) (*Work, error)
func (*UnimplementedTaskManagerServer) Nack ¶
func (*UnimplementedTaskManagerServer) Nack(context.Context, *NackRequest) (*empty.Empty, error)
func (*UnimplementedTaskManagerServer) Renew ¶
func (*UnimplementedTaskManagerServer) Renew(context.Context, *RenewRequest) (*empty.Empty, error)
type Work ¶
type Work struct { // Generated ID representing the Work. An opaque value. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Headers map[string]*HeaderValue `` /* 155-byte string literal not displayed */ Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` EnqueuedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=enqueued_at,json=enqueuedAt,proto3" json:"enqueued_at,omitempty"` LeasedUntil *timestamp.Timestamp `protobuf:"bytes,5,opt,name=leased_until,json=leasedUntil,proto3" json:"leased_until,omitempty"` // contains filtered or unexported fields }
func (*Work) Descriptor
deprecated
func (*Work) GetEnqueuedAt ¶
func (*Work) GetHeaders ¶
func (x *Work) GetHeaders() map[string]*HeaderValue
func (*Work) GetLeasedUntil ¶
func (*Work) GetPayload ¶
func (*Work) ProtoMessage ¶
func (*Work) ProtoMessage()
func (*Work) ProtoReflect ¶
func (x *Work) ProtoReflect() protoreflect.Message