Documentation ¶
Index ¶
- Variables
- func RegisterAnswerServerStreamServiceServer(s grpc.ServiceRegistrar, srv AnswerServerStreamServiceServer)
- func RegisterAnswerServiceServer(s grpc.ServiceRegistrar, srv AnswerServiceServer)
- type Answer
- type AnswerServerStreamServiceClient
- type AnswerServerStreamServiceServer
- type AnswerServerStreamService_StreamGreetingClient
- type AnswerServerStreamService_StreamGreetingServer
- type AnswerServiceClient
- type AnswerServiceServer
- type Question
- type UnimplementedAnswerServerStreamServiceServer
- type UnimplementedAnswerServiceServer
- type UnsafeAnswerServerStreamServiceServer
- type UnsafeAnswerServiceServer
Constants ¶
This section is empty.
Variables ¶
var AnswerServerStreamService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "test.AnswerServerStreamService", HandlerType: (*AnswerServerStreamServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamGreeting", Handler: _AnswerServerStreamService_StreamGreeting_Handler, ServerStreams: true, }, }, Metadata: "test.proto", }
AnswerServerStreamService_ServiceDesc is the grpc.ServiceDesc for AnswerServerStreamService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var AnswerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "test.AnswerService", HandlerType: (*AnswerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greeting", Handler: _AnswerService_Greeting_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "test.proto", }
AnswerService_ServiceDesc is the grpc.ServiceDesc for AnswerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_test_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAnswerServerStreamServiceServer ¶ added in v1.0.8
func RegisterAnswerServerStreamServiceServer(s grpc.ServiceRegistrar, srv AnswerServerStreamServiceServer)
func RegisterAnswerServiceServer ¶
func RegisterAnswerServiceServer(s grpc.ServiceRegistrar, srv AnswerServiceServer)
Types ¶
type Answer ¶
type Answer struct { Answer string `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` // contains filtered or unexported fields }
func (*Answer) Descriptor
deprecated
func (*Answer) ProtoMessage ¶
func (*Answer) ProtoMessage()
func (*Answer) ProtoReflect ¶
func (x *Answer) ProtoReflect() protoreflect.Message
type AnswerServerStreamServiceClient ¶ added in v1.0.8
type AnswerServerStreamServiceClient interface {
StreamGreeting(ctx context.Context, in *Question, opts ...grpc.CallOption) (AnswerServerStreamService_StreamGreetingClient, error)
}
AnswerServerStreamServiceClient is the client API for AnswerServerStreamService 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 NewAnswerServerStreamServiceClient ¶ added in v1.0.8
func NewAnswerServerStreamServiceClient(cc grpc.ClientConnInterface) AnswerServerStreamServiceClient
type AnswerServerStreamServiceServer ¶ added in v1.0.8
type AnswerServerStreamServiceServer interface { StreamGreeting(*Question, AnswerServerStreamService_StreamGreetingServer) error // contains filtered or unexported methods }
AnswerServerStreamServiceServer is the server API for AnswerServerStreamService service. All implementations must embed UnimplementedAnswerServerStreamServiceServer for forward compatibility
type AnswerServerStreamService_StreamGreetingClient ¶ added in v1.0.8
type AnswerServerStreamService_StreamGreetingClient interface { Recv() (*Answer, error) grpc.ClientStream }
type AnswerServerStreamService_StreamGreetingServer ¶ added in v1.0.8
type AnswerServerStreamService_StreamGreetingServer interface { Send(*Answer) error grpc.ServerStream }
type AnswerServiceClient ¶
type AnswerServiceClient interface {
Greeting(ctx context.Context, in *Question, opts ...grpc.CallOption) (*Answer, error)
}
AnswerServiceClient is the client API for AnswerService 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 NewAnswerServiceClient ¶
func NewAnswerServiceClient(cc grpc.ClientConnInterface) AnswerServiceClient
type AnswerServiceServer ¶
type AnswerServiceServer interface { Greeting(context.Context, *Question) (*Answer, error) // contains filtered or unexported methods }
AnswerServiceServer is the server API for AnswerService service. All implementations must embed UnimplementedAnswerServiceServer for forward compatibility
type Question ¶
type Question struct { Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` // contains filtered or unexported fields }
func (*Question) Descriptor
deprecated
func (*Question) GetQuestion ¶
func (*Question) ProtoMessage ¶
func (*Question) ProtoMessage()
func (*Question) ProtoReflect ¶
func (x *Question) ProtoReflect() protoreflect.Message
type UnimplementedAnswerServerStreamServiceServer ¶ added in v1.0.8
type UnimplementedAnswerServerStreamServiceServer struct { }
UnimplementedAnswerServerStreamServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAnswerServerStreamServiceServer) StreamGreeting ¶ added in v1.0.8
func (UnimplementedAnswerServerStreamServiceServer) StreamGreeting(*Question, AnswerServerStreamService_StreamGreetingServer) error
type UnimplementedAnswerServiceServer ¶
type UnimplementedAnswerServiceServer struct { }
UnimplementedAnswerServiceServer must be embedded to have forward compatible implementations.
type UnsafeAnswerServerStreamServiceServer ¶ added in v1.0.8
type UnsafeAnswerServerStreamServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAnswerServerStreamServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AnswerServerStreamServiceServer will result in compilation errors.
type UnsafeAnswerServiceServer ¶ added in v1.0.7
type UnsafeAnswerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAnswerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AnswerServiceServer will result in compilation errors.