Documentation ¶
Index ¶
- Variables
- func RegisterTopicServer(s grpc.ServiceRegistrar, srv TopicServer)
- type AcknowledgementResponse
- func (*AcknowledgementResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AcknowledgementResponse) GetCode() PublishStatusCode
- func (x *AcknowledgementResponse) GetMessage() string
- func (*AcknowledgementResponse) ProtoMessage()
- func (x *AcknowledgementResponse) ProtoReflect() protoreflect.Message
- func (x *AcknowledgementResponse) Reset()
- func (x *AcknowledgementResponse) String() string
- type PublishRequest
- type PublishResponse
- func (*PublishResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublishResponse) GetCode() PublishStatusCode
- func (x *PublishResponse) GetMessage() string
- func (*PublishResponse) ProtoMessage()
- func (x *PublishResponse) ProtoReflect() protoreflect.Message
- func (x *PublishResponse) Reset()
- func (x *PublishResponse) String() string
- type PublishStatusCode
- func (PublishStatusCode) Descriptor() protoreflect.EnumDescriptor
- func (x PublishStatusCode) Enum() *PublishStatusCode
- func (PublishStatusCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x PublishStatusCode) Number() protoreflect.EnumNumber
- func (x PublishStatusCode) String() string
- func (PublishStatusCode) Type() protoreflect.EnumType
- type PublishStreamRequest
- func (*PublishStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishStreamRequest) GetContent() []byte
- func (*PublishStreamRequest) ProtoMessage()
- func (x *PublishStreamRequest) ProtoReflect() protoreflect.Message
- func (x *PublishStreamRequest) Reset()
- func (x *PublishStreamRequest) String() string
- type TopicClient
- type TopicServer
- type Topic_PublishStreamClient
- type Topic_PublishStreamServer
- type Topic_StreamFileClient
- type Topic_StreamFileServer
- type UnimplementedTopicServer
- type UnsafeTopicServer
Constants ¶
This section is empty.
Variables ¶
var ( PublishStatusCode_name = map[int32]string{ 0: "Unknown", 1: "Ok", 2: "Failed", } PublishStatusCode_value = map[string]int32{ "Unknown": 0, "Ok": 1, "Failed": 2, } )
Enum value maps for PublishStatusCode.
var File_topic_proto protoreflect.FileDescriptor
var Topic_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Topic", HandlerType: (*TopicServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Publish", Handler: _Topic_Publish_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "PublishStream", Handler: _Topic_PublishStream_Handler, ClientStreams: true, }, { StreamName: "StreamFile", Handler: _Topic_StreamFile_Handler, ClientStreams: true, }, }, Metadata: "topic.proto", }
Topic_ServiceDesc is the grpc.ServiceDesc for Topic service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTopicServer ¶
func RegisterTopicServer(s grpc.ServiceRegistrar, srv TopicServer)
Types ¶
type AcknowledgementResponse ¶
type AcknowledgementResponse struct { Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` Code PublishStatusCode `protobuf:"varint,2,opt,name=Code,proto3,enum=proto.PublishStatusCode" json:"Code,omitempty"` // contains filtered or unexported fields }
func (*AcknowledgementResponse) Descriptor
deprecated
func (*AcknowledgementResponse) Descriptor() ([]byte, []int)
Deprecated: Use AcknowledgementResponse.ProtoReflect.Descriptor instead.
func (*AcknowledgementResponse) GetCode ¶
func (x *AcknowledgementResponse) GetCode() PublishStatusCode
func (*AcknowledgementResponse) GetMessage ¶
func (x *AcknowledgementResponse) GetMessage() string
func (*AcknowledgementResponse) ProtoMessage ¶
func (*AcknowledgementResponse) ProtoMessage()
func (*AcknowledgementResponse) ProtoReflect ¶
func (x *AcknowledgementResponse) ProtoReflect() protoreflect.Message
func (*AcknowledgementResponse) Reset ¶
func (x *AcknowledgementResponse) Reset()
func (*AcknowledgementResponse) String ¶
func (x *AcknowledgementResponse) String() string
type PublishRequest ¶
type PublishRequest struct { Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetContent ¶
func (x *PublishRequest) GetContent() string
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type PublishResponse ¶
type PublishResponse struct { Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` Code PublishStatusCode `protobuf:"varint,2,opt,name=Code,proto3,enum=proto.PublishStatusCode" json:"Code,omitempty"` // contains filtered or unexported fields }
func (*PublishResponse) Descriptor
deprecated
func (*PublishResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) GetCode ¶
func (x *PublishResponse) GetCode() PublishStatusCode
func (*PublishResponse) GetMessage ¶
func (x *PublishResponse) GetMessage() string
func (*PublishResponse) ProtoMessage ¶
func (*PublishResponse) ProtoMessage()
func (*PublishResponse) ProtoReflect ¶
func (x *PublishResponse) ProtoReflect() protoreflect.Message
func (*PublishResponse) Reset ¶
func (x *PublishResponse) Reset()
func (*PublishResponse) String ¶
func (x *PublishResponse) String() string
type PublishStatusCode ¶
type PublishStatusCode int32
const ( PublishStatusCode_Unknown PublishStatusCode = 0 PublishStatusCode_Ok PublishStatusCode = 1 PublishStatusCode_Failed PublishStatusCode = 2 )
func (PublishStatusCode) Descriptor ¶
func (PublishStatusCode) Descriptor() protoreflect.EnumDescriptor
func (PublishStatusCode) Enum ¶
func (x PublishStatusCode) Enum() *PublishStatusCode
func (PublishStatusCode) EnumDescriptor
deprecated
func (PublishStatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use PublishStatusCode.Descriptor instead.
func (PublishStatusCode) Number ¶
func (x PublishStatusCode) Number() protoreflect.EnumNumber
func (PublishStatusCode) String ¶
func (x PublishStatusCode) String() string
func (PublishStatusCode) Type ¶
func (PublishStatusCode) Type() protoreflect.EnumType
type PublishStreamRequest ¶
type PublishStreamRequest struct { Content []byte `protobuf:"bytes,1,opt,name=Content,proto3" json:"Content,omitempty"` // contains filtered or unexported fields }
func (*PublishStreamRequest) Descriptor
deprecated
func (*PublishStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishStreamRequest.ProtoReflect.Descriptor instead.
func (*PublishStreamRequest) GetContent ¶
func (x *PublishStreamRequest) GetContent() []byte
func (*PublishStreamRequest) ProtoMessage ¶
func (*PublishStreamRequest) ProtoMessage()
func (*PublishStreamRequest) ProtoReflect ¶
func (x *PublishStreamRequest) ProtoReflect() protoreflect.Message
func (*PublishStreamRequest) Reset ¶
func (x *PublishStreamRequest) Reset()
func (*PublishStreamRequest) String ¶
func (x *PublishStreamRequest) String() string
type TopicClient ¶
type TopicClient interface { Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) PublishStream(ctx context.Context, opts ...grpc.CallOption) (Topic_PublishStreamClient, error) StreamFile(ctx context.Context, opts ...grpc.CallOption) (Topic_StreamFileClient, error) }
TopicClient is the client API for Topic 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 NewTopicClient ¶
func NewTopicClient(cc grpc.ClientConnInterface) TopicClient
type TopicServer ¶
type TopicServer interface { Publish(context.Context, *PublishRequest) (*PublishResponse, error) PublishStream(Topic_PublishStreamServer) error StreamFile(Topic_StreamFileServer) error }
TopicServer is the server API for Topic service. All implementations should embed UnimplementedTopicServer for forward compatibility
type Topic_PublishStreamClient ¶
type Topic_PublishStreamClient interface { Send(*PublishStreamRequest) error CloseAndRecv() (*AcknowledgementResponse, error) grpc.ClientStream }
type Topic_PublishStreamServer ¶
type Topic_PublishStreamServer interface { SendAndClose(*AcknowledgementResponse) error Recv() (*PublishStreamRequest, error) grpc.ServerStream }
type Topic_StreamFileClient ¶
type Topic_StreamFileClient interface { Send(*PublishStreamRequest) error CloseAndRecv() (*AcknowledgementResponse, error) grpc.ClientStream }
type Topic_StreamFileServer ¶
type Topic_StreamFileServer interface { SendAndClose(*AcknowledgementResponse) error Recv() (*PublishStreamRequest, error) grpc.ServerStream }
type UnimplementedTopicServer ¶
type UnimplementedTopicServer struct { }
UnimplementedTopicServer should be embedded to have forward compatible implementations.
func (UnimplementedTopicServer) Publish ¶
func (UnimplementedTopicServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error)
func (UnimplementedTopicServer) PublishStream ¶
func (UnimplementedTopicServer) PublishStream(Topic_PublishStreamServer) error
func (UnimplementedTopicServer) StreamFile ¶
func (UnimplementedTopicServer) StreamFile(Topic_StreamFileServer) error
type UnsafeTopicServer ¶
type UnsafeTopicServer interface {
// contains filtered or unexported methods
}
UnsafeTopicServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TopicServer will result in compilation errors.