mq

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_mq_proto protoreflect.FileDescriptor

Functions

func RegisterMQServer

func RegisterMQServer(s *grpc.Server, srv MQServer)

Types

type MQClient

type MQClient interface {
	Pub(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error)
	Sub(ctx context.Context, in *SubRequest, opts ...grpc.CallOption) (MQ_SubClient, error)
}

MQClient is the client API for MQ service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMQClient

func NewMQClient(cc grpc.ClientConnInterface) MQClient

type MQServer

type MQServer interface {
	Pub(context.Context, *PubRequest) (*PubResponse, error)
	Sub(*SubRequest, MQ_SubServer) error
}

MQServer is the server API for MQ service.

type MQ_SubClient

type MQ_SubClient interface {
	Recv() (*SubResponse, error)
	grpc.ClientStream
}

type MQ_SubServer

type MQ_SubServer interface {
	Send(*SubResponse) error
	grpc.ServerStream
}

type PubRequest

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

func (*PubRequest) Descriptor deprecated

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

Deprecated: Use PubRequest.ProtoReflect.Descriptor instead.

func (*PubRequest) GetPayload

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

func (*PubRequest) GetTopic

func (x *PubRequest) GetTopic() string

func (*PubRequest) ProtoMessage

func (*PubRequest) ProtoMessage()

func (*PubRequest) ProtoReflect

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

func (*PubRequest) Reset

func (x *PubRequest) Reset()

func (*PubRequest) String

func (x *PubRequest) String() string

type PubResponse

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

func (*PubResponse) Descriptor deprecated

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

Deprecated: Use PubResponse.ProtoReflect.Descriptor instead.

func (*PubResponse) ProtoMessage

func (*PubResponse) ProtoMessage()

func (*PubResponse) ProtoReflect

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

func (*PubResponse) Reset

func (x *PubResponse) Reset()

func (*PubResponse) String

func (x *PubResponse) String() string

type SubRequest

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

func (*SubRequest) Descriptor deprecated

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

Deprecated: Use SubRequest.ProtoReflect.Descriptor instead.

func (*SubRequest) GetTopic

func (x *SubRequest) GetTopic() string

func (*SubRequest) ProtoMessage

func (*SubRequest) ProtoMessage()

func (*SubRequest) ProtoReflect

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

func (*SubRequest) Reset

func (x *SubRequest) Reset()

func (*SubRequest) String

func (x *SubRequest) String() string

type SubResponse

type SubResponse struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*SubResponse) Descriptor deprecated

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

Deprecated: Use SubResponse.ProtoReflect.Descriptor instead.

func (*SubResponse) GetPayload

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

func (*SubResponse) ProtoMessage

func (*SubResponse) ProtoMessage()

func (*SubResponse) ProtoReflect

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

func (*SubResponse) Reset

func (x *SubResponse) Reset()

func (*SubResponse) String

func (x *SubResponse) String() string

type UnimplementedMQServer

type UnimplementedMQServer struct {
}

UnimplementedMQServer can be embedded to have forward compatible implementations.

func (*UnimplementedMQServer) Pub

func (*UnimplementedMQServer) Sub

Jump to

Keyboard shortcuts

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