rpc

package
v0.0.0-...-1070708 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_mq_service_proto protoreflect.FileDescriptor
View Source
var Mq_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Mq",
	HandlerType: (*MqServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Publish",
			Handler:       _Mq_Publish_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Subscribe",
			Handler:       _Mq_Subscribe_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/mq_service.proto",
}

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

Functions

func NewMqServiceClient

func NewMqServiceClient() *grpc.ClientConn

func RegisterMqServer

func RegisterMqServer(s grpc.ServiceRegistrar, srv MqServer)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type MqClient

type MqClient interface {
	Publish(ctx context.Context, opts ...grpc.CallOption) (Mq_PublishClient, error)
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (Mq_SubscribeClient, error)
}

MqClient is the client API for Mq 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 NewMqClient

func NewMqClient(cc grpc.ClientConnInterface) MqClient

type MqHandler

type MqHandler struct {
	UnimplementedMqServer
	Conn *amqp.Connection
}

func (*MqHandler) Publish

func (h *MqHandler) Publish(srv Mq_PublishServer) error

func (*MqHandler) Subscribe

func (h *MqHandler) Subscribe(srv Mq_SubscribeServer) error

type MqServer

type MqServer interface {
	Publish(Mq_PublishServer) error
	Subscribe(Mq_SubscribeServer) error
	// contains filtered or unexported methods
}

MqServer is the server API for Mq service. All implementations must embed UnimplementedMqServer for forward compatibility

type Mq_PublishClient

type Mq_PublishClient interface {
	Send(*PubRequest) error
	Recv() (*Empty, error)
	grpc.ClientStream
}

type Mq_PublishServer

type Mq_PublishServer interface {
	Send(*Empty) error
	Recv() (*PubRequest, error)
	grpc.ServerStream
}

type Mq_SubscribeClient

type Mq_SubscribeClient interface {
	Send(*SubRequestOrAck) error
	Recv() (*SubResponse, error)
	grpc.ClientStream
}

type Mq_SubscribeServer

type Mq_SubscribeServer interface {
	Send(*SubResponse) error
	Recv() (*SubRequestOrAck, error)
	grpc.ServerStream
}

type PubRequest

type PubRequest struct {
	QueueName string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3" json:"queue_name,omitempty"`
	Content   []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*PubRequest) Descriptor deprecated

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

Deprecated: Use PubRequest.ProtoReflect.Descriptor instead.

func (*PubRequest) GetContent

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

func (*PubRequest) GetQueueName

func (x *PubRequest) GetQueueName() 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 SubRequestOrAck

type SubRequestOrAck struct {
	QueueName *string `protobuf:"bytes,1,opt,name=queue_name,json=queueName,proto3,oneof" json:"queue_name,omitempty"`
	// contains filtered or unexported fields
}

func (*SubRequestOrAck) Descriptor deprecated

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

Deprecated: Use SubRequestOrAck.ProtoReflect.Descriptor instead.

func (*SubRequestOrAck) GetQueueName

func (x *SubRequestOrAck) GetQueueName() string

func (*SubRequestOrAck) ProtoMessage

func (*SubRequestOrAck) ProtoMessage()

func (*SubRequestOrAck) ProtoReflect

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

func (*SubRequestOrAck) Reset

func (x *SubRequestOrAck) Reset()

func (*SubRequestOrAck) String

func (x *SubRequestOrAck) String() string

type SubResponse

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

func (*SubResponse) Descriptor deprecated

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

Deprecated: Use SubResponse.ProtoReflect.Descriptor instead.

func (*SubResponse) GetContent

func (x *SubResponse) GetContent() []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 must be embedded to have forward compatible implementations.

func (UnimplementedMqServer) Publish

func (UnimplementedMqServer) Subscribe

type UnsafeMqServer

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

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

Jump to

Keyboard shortcuts

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