queue_pb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_queue_proto protoreflect.FileDescriptor
View Source
var Queue_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "queue_pb.Queue",
	HandlerType: (*QueueServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SaveMessages",
			Handler:    _Queue_SaveMessages_Handler,
		},
		{
			MethodName: "DeleteMessages",
			Handler:    _Queue_DeleteMessages_Handler,
		},
		{
			MethodName: "GetMessage",
			Handler:    _Queue_GetMessage_Handler,
		},
		{
			MethodName: "GetMessages",
			Handler:    _Queue_GetMessages_Handler,
		},
		{
			MethodName: "GetTopicList",
			Handler:    _Queue_GetTopicList_Handler,
		},
		{
			MethodName: "GetMessageCount",
			Handler:    _Queue_GetMessageCount_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetStreamMessages",
			Handler:       _Queue_GetStreamMessages_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "queue.proto",
}

Queue_ServiceDesc is the grpc.ServiceDesc for Queue service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterQueueServer

func RegisterQueueServer(s grpc.ServiceRegistrar, srv QueueServer)

Types

type CountRequest

type CountRequest struct {
	Topic  string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Prefix []byte `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// contains filtered or unexported fields
}

func (*CountRequest) Descriptor deprecated

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

Deprecated: Use CountRequest.ProtoReflect.Descriptor instead.

func (*CountRequest) GetPrefix

func (x *CountRequest) GetPrefix() []byte

func (*CountRequest) GetTopic

func (x *CountRequest) GetTopic() string

func (*CountRequest) ProtoMessage

func (*CountRequest) ProtoMessage()

func (*CountRequest) ProtoReflect

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

func (*CountRequest) Reset

func (x *CountRequest) Reset()

func (*CountRequest) String

func (x *CountRequest) String() string

type EmptyRequest

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

func (*EmptyRequest) Descriptor deprecated

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

Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) ProtoReflect

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

func (*EmptyRequest) Reset

func (x *EmptyRequest) Reset()

func (*EmptyRequest) String

func (x *EmptyRequest) String() string

type ErrorReply

type ErrorReply struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorReply) Descriptor deprecated

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

Deprecated: Use ErrorReply.ProtoReflect.Descriptor instead.

func (*ErrorReply) GetError

func (x *ErrorReply) GetError() string

func (*ErrorReply) ProtoMessage

func (*ErrorReply) ProtoMessage()

func (*ErrorReply) ProtoReflect

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

func (*ErrorReply) Reset

func (x *ErrorReply) Reset()

func (*ErrorReply) String

func (x *ErrorReply) String() string

type Message

type Message struct {
	Uid       []byte `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Topic     string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	Message   []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Timestamp int64  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetMessage

func (x *Message) GetMessage() []byte

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() int64

func (*Message) GetTopic

func (x *Message) GetTopic() string

func (*Message) GetUid

func (x *Message) GetUid() []byte

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessageUids

type MessageUids struct {
	Topic string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Uids  [][]byte `protobuf:"bytes,2,rep,name=uids,proto3" json:"uids,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageUids) Descriptor deprecated

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

Deprecated: Use MessageUids.ProtoReflect.Descriptor instead.

func (*MessageUids) GetTopic

func (x *MessageUids) GetTopic() string

func (*MessageUids) GetUids

func (x *MessageUids) GetUids() [][]byte

func (*MessageUids) ProtoMessage

func (*MessageUids) ProtoMessage()

func (*MessageUids) ProtoReflect

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

func (*MessageUids) Reset

func (x *MessageUids) Reset()

func (*MessageUids) String

func (x *MessageUids) String() string

type Messages

type Messages struct {
	Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*Messages) Descriptor deprecated

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

Deprecated: Use UidChan.ProtoReflect.Descriptor instead.

func (*Messages) GetMessages

func (x *Messages) GetMessages() []*Message

func (*Messages) ProtoMessage

func (*Messages) ProtoMessage()

func (*Messages) ProtoReflect

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

func (*Messages) Reset

func (x *Messages) Reset()

func (*Messages) String

func (x *Messages) String() string

type QueueClient

type QueueClient interface {
	SaveMessages(ctx context.Context, in *Messages, opts ...grpc.CallOption) (*ErrorReply, error)
	DeleteMessages(ctx context.Context, in *MessageUids, opts ...grpc.CallOption) (*ErrorReply, error)
	GetMessage(ctx context.Context, in *RequestSingle, opts ...grpc.CallOption) (*Message, error)
	GetMessages(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Messages, error)
	GetStreamMessages(ctx context.Context, in *RequestStream, opts ...grpc.CallOption) (Queue_GetStreamMessagesClient, error)
	GetTopicList(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*TopicListReply, error)
	GetMessageCount(ctx context.Context, in *CountRequest, opts ...grpc.CallOption) (*TopicCount, error)
}

QueueClient is the client API for Queue 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 NewQueueClient

func NewQueueClient(cc grpc.ClientConnInterface) QueueClient

type QueueServer

type QueueServer interface {
	SaveMessages(context.Context, *Messages) (*ErrorReply, error)
	DeleteMessages(context.Context, *MessageUids) (*ErrorReply, error)
	GetMessage(context.Context, *RequestSingle) (*Message, error)
	GetMessages(context.Context, *Request) (*Messages, error)
	GetStreamMessages(*RequestStream, Queue_GetStreamMessagesServer) error
	GetTopicList(context.Context, *EmptyRequest) (*TopicListReply, error)
	GetMessageCount(context.Context, *CountRequest) (*TopicCount, error)
	// contains filtered or unexported methods
}

QueueServer is the server API for Queue service. All implementations must embed UnimplementedQueueServer for forward compatibility

type Queue_GetStreamMessagesClient

type Queue_GetStreamMessagesClient interface {
	Recv() (*Message, error)
	grpc.ClientStream
}

type Queue_GetStreamMessagesServer

type Queue_GetStreamMessagesServer interface {
	Send(*Message) error
	grpc.ServerStream
}

type Request

type Request struct {
	Topic    string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Start    []byte   `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
	Max      uint32   `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"`
	Prefixes [][]byte `protobuf:"bytes,4,rep,name=prefixes,proto3" json:"prefixes,omitempty"`
	Uids     [][]byte `protobuf:"bytes,5,rep,name=uids,proto3" json:"uids,omitempty"`
	Wait     bool     `protobuf:"varint,6,opt,name=wait,proto3" json:"wait,omitempty"`
	Newest   bool     `protobuf:"varint,7,opt,name=newest,proto3" json:"newest,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetMax

func (x *Request) GetMax() uint32

func (*Request) GetNewest

func (x *Request) GetNewest() bool

func (*Request) GetPrefixes

func (x *Request) GetPrefixes() [][]byte

func (*Request) GetStart

func (x *Request) GetStart() []byte

func (*Request) GetTopic

func (x *Request) GetTopic() string

func (*Request) GetUids

func (x *Request) GetUids() [][]byte

func (*Request) GetWait

func (x *Request) GetWait() bool

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type RequestSingle

type RequestSingle struct {
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Uid   []byte `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestSingle) Descriptor deprecated

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

Deprecated: Use RequestSingle.ProtoReflect.Descriptor instead.

func (*RequestSingle) GetTopic

func (x *RequestSingle) GetTopic() string

func (*RequestSingle) GetUid

func (x *RequestSingle) GetUid() []byte

func (*RequestSingle) ProtoMessage

func (*RequestSingle) ProtoMessage()

func (*RequestSingle) ProtoReflect

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

func (*RequestSingle) Reset

func (x *RequestSingle) Reset()

func (*RequestSingle) String

func (x *RequestSingle) String() string

type RequestStream

type RequestStream struct {
	Topic    string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Prefixes [][]byte `protobuf:"bytes,2,rep,name=prefixes,proto3" json:"prefixes,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestStream) Descriptor deprecated

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

Deprecated: Use RequestStream.ProtoReflect.Descriptor instead.

func (*RequestStream) GetPrefixes

func (x *RequestStream) GetPrefixes() [][]byte

func (*RequestStream) GetTopic

func (x *RequestStream) GetTopic() string

func (*RequestStream) ProtoMessage

func (*RequestStream) ProtoMessage()

func (*RequestStream) ProtoReflect

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

func (*RequestStream) Reset

func (x *RequestStream) Reset()

func (*RequestStream) String

func (x *RequestStream) String() string

type Topic

type Topic struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*Topic) Descriptor deprecated

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

Deprecated: Use Topic.ProtoReflect.Descriptor instead.

func (*Topic) GetCount

func (x *Topic) GetCount() uint64

func (*Topic) GetName

func (x *Topic) GetName() string

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) ProtoReflect

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

func (*Topic) Reset

func (x *Topic) Reset()

func (*Topic) String

func (x *Topic) String() string

type TopicCount

type TopicCount struct {
	Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*TopicCount) Descriptor deprecated

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

Deprecated: Use TopicCount.ProtoReflect.Descriptor instead.

func (*TopicCount) GetCount

func (x *TopicCount) GetCount() uint64

func (*TopicCount) ProtoMessage

func (*TopicCount) ProtoMessage()

func (*TopicCount) ProtoReflect

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

func (*TopicCount) Reset

func (x *TopicCount) Reset()

func (*TopicCount) String

func (x *TopicCount) String() string

type TopicListReply

type TopicListReply struct {
	Topics []*Topic `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"`
	// contains filtered or unexported fields
}

func (*TopicListReply) Descriptor deprecated

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

Deprecated: Use TopicListReply.ProtoReflect.Descriptor instead.

func (*TopicListReply) GetTopics

func (x *TopicListReply) GetTopics() []*Topic

func (*TopicListReply) ProtoMessage

func (*TopicListReply) ProtoMessage()

func (*TopicListReply) ProtoReflect

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

func (*TopicListReply) Reset

func (x *TopicListReply) Reset()

func (*TopicListReply) String

func (x *TopicListReply) String() string

type UnimplementedQueueServer

type UnimplementedQueueServer struct {
}

UnimplementedQueueServer must be embedded to have forward compatible implementations.

func (UnimplementedQueueServer) DeleteMessages

func (UnimplementedQueueServer) GetMessage

func (UnimplementedQueueServer) GetMessageCount

func (UnimplementedQueueServer) GetMessages

func (UnimplementedQueueServer) GetStreamMessages

func (UnimplementedQueueServer) GetTopicList

func (UnimplementedQueueServer) SaveMessages

type UnsafeQueueServer

type UnsafeQueueServer interface {
	// contains filtered or unexported methods
}

UnsafeQueueServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueueServer will result in compilation errors.

Jump to

Keyboard shortcuts

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