Documentation ¶
Index ¶
- Variables
- func RegisterStreamGreeterServer(s grpc.ServiceRegistrar, srv StreamGreeterServer)
- type CommonReq
- type StreamGreeterClient
- type StreamGreeterServer
- type StreamReq
- func (*StreamReq) Descriptor() ([]byte, []int)deprecated
- func (x *StreamReq) GetCommon() *CommonReq
- func (x *StreamReq) GetIp() string
- func (x *StreamReq) GetName() string
- func (*StreamReq) ProtoMessage()
- func (x *StreamReq) ProtoReflect() protoreflect.Message
- func (x *StreamReq) Reset()
- func (x *StreamReq) String() string
- type StreamResp
- type UnimplementedStreamGreeterServer
- type UnsafeStreamGreeterServer
Constants ¶
This section is empty.
Variables ¶
var File_common_proto protoreflect.FileDescriptor
var File_hello_proto protoreflect.FileDescriptor
var ProtoSetCommon []byte
var ProtoSetHello []byte
var StreamGreeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.StreamGreeter", HandlerType: (*StreamGreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greet", Handler: _StreamGreeter_Greet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hello.proto", }
StreamGreeter_ServiceDesc is the grpc.ServiceDesc for StreamGreeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStreamGreeterServer ¶
func RegisterStreamGreeterServer(s grpc.ServiceRegistrar, srv StreamGreeterServer)
Types ¶
type CommonReq ¶
type CommonReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CommonReq) Descriptor
deprecated
func (*CommonReq) ProtoMessage ¶
func (*CommonReq) ProtoMessage()
func (*CommonReq) ProtoReflect ¶
func (x *CommonReq) ProtoReflect() protoreflect.Message
type StreamGreeterClient ¶
type StreamGreeterClient interface {
Greet(ctx context.Context, in *StreamReq, opts ...grpc.CallOption) (*StreamResp, error)
}
StreamGreeterClient is the client API for StreamGreeter 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 NewStreamGreeterClient ¶
func NewStreamGreeterClient(cc grpc.ClientConnInterface) StreamGreeterClient
type StreamGreeterServer ¶
type StreamGreeterServer interface { Greet(context.Context, *StreamReq) (*StreamResp, error) // contains filtered or unexported methods }
StreamGreeterServer is the server API for StreamGreeter service. All implementations must embed UnimplementedStreamGreeterServer for forward compatibility
type StreamReq ¶
type StreamReq struct { Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Common *CommonReq `protobuf:"bytes,3,opt,name=common,proto3" json:"common,omitempty"` // contains filtered or unexported fields }
func (*StreamReq) Descriptor
deprecated
func (*StreamReq) ProtoMessage ¶
func (*StreamReq) ProtoMessage()
func (*StreamReq) ProtoReflect ¶
func (x *StreamReq) ProtoReflect() protoreflect.Message
type StreamResp ¶
type StreamResp struct { Greet string `protobuf:"bytes,1,opt,name=greet,proto3" json:"greet,omitempty"` FailedReason string `protobuf:"bytes,2,opt,name=failedReason,proto3" json:"failedReason,omitempty"` // contains filtered or unexported fields }
func (*StreamResp) Descriptor
deprecated
func (*StreamResp) Descriptor() ([]byte, []int)
Deprecated: Use StreamResp.ProtoReflect.Descriptor instead.
func (*StreamResp) GetFailedReason ¶
func (x *StreamResp) GetFailedReason() string
func (*StreamResp) GetGreet ¶
func (x *StreamResp) GetGreet() string
func (*StreamResp) ProtoMessage ¶
func (*StreamResp) ProtoMessage()
func (*StreamResp) ProtoReflect ¶
func (x *StreamResp) ProtoReflect() protoreflect.Message
func (*StreamResp) Reset ¶
func (x *StreamResp) Reset()
func (*StreamResp) String ¶
func (x *StreamResp) String() string
type UnimplementedStreamGreeterServer ¶
type UnimplementedStreamGreeterServer struct { }
UnimplementedStreamGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedStreamGreeterServer) Greet ¶
func (UnimplementedStreamGreeterServer) Greet(context.Context, *StreamReq) (*StreamResp, error)
type UnsafeStreamGreeterServer ¶
type UnsafeStreamGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeStreamGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamGreeterServer will result in compilation errors.