pb

package
v5.0.4-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: LGPL-3.0 Imports: 5 Imported by: 66

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTaskQueueServer

func RegisterTaskQueueServer(s *grpc.Server, srv TaskQueueServer)

Types

type DequeueRequest

type DequeueRequest struct {
	Topic      string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	ClientHost string `protobuf:"bytes,2,opt,name=client_host,json=clientHost" json:"client_host,omitempty"`
}

func (*DequeueRequest) Descriptor

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

func (*DequeueRequest) GetClientHost

func (m *DequeueRequest) GetClientHost() string

func (*DequeueRequest) GetTopic

func (m *DequeueRequest) GetTopic() string

func (*DequeueRequest) ProtoMessage

func (*DequeueRequest) ProtoMessage()

func (*DequeueRequest) Reset

func (m *DequeueRequest) Reset()

func (*DequeueRequest) String

func (m *DequeueRequest) String() string

type EnqueueRequest

type EnqueueRequest struct {
	Topic   string       `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	Message *TaskMessage `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}

func (*EnqueueRequest) Descriptor

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

func (*EnqueueRequest) GetMessage

func (m *EnqueueRequest) GetMessage() *TaskMessage

func (*EnqueueRequest) GetTopic

func (m *EnqueueRequest) GetTopic() string

func (*EnqueueRequest) ProtoMessage

func (*EnqueueRequest) ProtoMessage()

func (*EnqueueRequest) Reset

func (m *EnqueueRequest) Reset()

func (*EnqueueRequest) String

func (m *EnqueueRequest) String() string

type TaskMessage

type TaskMessage struct {
	TaskType   string `protobuf:"bytes,1,opt,name=task_type,json=taskType" json:"task_type,omitempty"`
	TaskBody   []byte `protobuf:"bytes,2,opt,name=task_body,json=taskBody,proto3" json:"task_body,omitempty"`
	CreateTime string `protobuf:"bytes,3,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
	User       string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"`
}

func (*TaskMessage) Descriptor

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

func (*TaskMessage) GetCreateTime

func (m *TaskMessage) GetCreateTime() string

func (*TaskMessage) GetTaskBody

func (m *TaskMessage) GetTaskBody() []byte

func (*TaskMessage) GetTaskType

func (m *TaskMessage) GetTaskType() string

func (*TaskMessage) GetUser

func (m *TaskMessage) GetUser() string

func (*TaskMessage) ProtoMessage

func (*TaskMessage) ProtoMessage()

func (*TaskMessage) Reset

func (m *TaskMessage) Reset()

func (*TaskMessage) String

func (m *TaskMessage) String() string

type TaskQueueClient

type TaskQueueClient interface {
	Enqueue(ctx context.Context, in *EnqueueRequest, opts ...grpc.CallOption) (*TaskReply, error)
	Topics(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*TaskReply, error)
	Dequeue(ctx context.Context, in *DequeueRequest, opts ...grpc.CallOption) (*TaskMessage, error)
}

func NewTaskQueueClient

func NewTaskQueueClient(cc *grpc.ClientConn) TaskQueueClient

type TaskQueueServer

type TaskQueueServer interface {
	Enqueue(context.Context, *EnqueueRequest) (*TaskReply, error)
	Topics(context.Context, *TopicRequest) (*TaskReply, error)
	Dequeue(context.Context, *DequeueRequest) (*TaskMessage, error)
}

type TaskReply

type TaskReply struct {
	Status  string   `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Message string   `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	Topics  []string `protobuf:"bytes,3,rep,name=topics" json:"topics,omitempty"`
}

func (*TaskReply) Descriptor

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

func (*TaskReply) GetMessage

func (m *TaskReply) GetMessage() string

func (*TaskReply) GetStatus

func (m *TaskReply) GetStatus() string

func (*TaskReply) GetTopics

func (m *TaskReply) GetTopics() []string

func (*TaskReply) ProtoMessage

func (*TaskReply) ProtoMessage()

func (*TaskReply) Reset

func (m *TaskReply) Reset()

func (*TaskReply) String

func (m *TaskReply) String() string

type TopicRequest

type TopicRequest struct {
}

func (*TopicRequest) Descriptor

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

func (*TopicRequest) ProtoMessage

func (*TopicRequest) ProtoMessage()

func (*TopicRequest) Reset

func (m *TopicRequest) Reset()

func (*TopicRequest) String

func (m *TopicRequest) String() string

Jump to

Keyboard shortcuts

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