protocol

package
v0.0.0-...-16733e2 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: 11 Imported by: 0

Documentation

Overview

The protocol package contains gRPC definitions for the internal services for the saync prototype.

Index

Constants

This section is empty.

Variables

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

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) Get

func (*UnimplementedTaskManagerServer) Nack

func (*UnimplementedTaskManagerServer) Renew

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

Deprecated: Use Work.ProtoReflect.Descriptor instead.

func (*Work) GetEnqueuedAt

func (x *Work) GetEnqueuedAt() *timestamp.Timestamp

func (*Work) GetHeaders

func (x *Work) GetHeaders() map[string]*HeaderValue

func (*Work) GetId

func (x *Work) GetId() string

func (*Work) GetLeasedUntil

func (x *Work) GetLeasedUntil() *timestamp.Timestamp

func (*Work) GetPayload

func (x *Work) GetPayload() []byte

func (*Work) ProtoMessage

func (*Work) ProtoMessage()

func (*Work) ProtoReflect

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

func (*Work) Reset

func (x *Work) Reset()

func (*Work) String

func (x *Work) String() string

Jump to

Keyboard shortcuts

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