Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)
- type Request
- type Response
- type StreamServiceClient
- type StreamServiceServer
- type StreamService_ChannelClient
- type StreamService_ChannelServer
- type UnimplementedStreamServiceServer
- type UnsafeStreamServiceServer
Constants ¶
const (
StreamService_Channel_FullMethodName = "/stream.StreamService/Channel"
)
Variables ¶
var File_stream_proto protoreflect.FileDescriptor
var StreamService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stream.StreamService", HandlerType: (*StreamServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Channel", Handler: _StreamService_Channel_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "stream.proto", }
StreamService_ServiceDesc is the grpc.ServiceDesc for StreamService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStreamServiceServer ¶
func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)
Types ¶
type Request ¶
type Request struct { // int32 id = 1; Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { // string result = 1; Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type StreamServiceClient ¶
type StreamServiceClient interface {
Channel(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Request, Response], error)
}
StreamServiceClient is the client API for StreamService 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 NewStreamServiceClient ¶
func NewStreamServiceClient(cc grpc.ClientConnInterface) StreamServiceClient
type StreamServiceServer ¶
type StreamServiceServer interface { Channel(grpc.BidiStreamingServer[Request, Response]) error // contains filtered or unexported methods }
StreamServiceServer is the server API for StreamService service. All implementations must embed UnimplementedStreamServiceServer for forward compatibility.
type StreamService_ChannelClient ¶
type StreamService_ChannelClient = grpc.BidiStreamingClient[Request, Response]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type StreamService_ChannelServer ¶
type StreamService_ChannelServer = grpc.BidiStreamingServer[Request, Response]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedStreamServiceServer ¶
type UnimplementedStreamServiceServer struct{}
UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedStreamServiceServer) Channel ¶
func (UnimplementedStreamServiceServer) Channel(grpc.BidiStreamingServer[Request, Response]) error
type UnsafeStreamServiceServer ¶
type UnsafeStreamServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStreamServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamServiceServer will result in compilation errors.