Documentation
¶
Index ¶
- Variables
- func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
- type GreetRequest
- type GreetResponse
- type GreetServiceClient
- type GreetServiceServer
- type GreetService_GreetAllClient
- type GreetService_GreetAllServer
- type GreetService_GreetLongStreamClient
- type GreetService_GreetLongStreamServer
- type GreetService_GreetStreamClient
- type GreetService_GreetStreamServer
- type UnimplementedGreetServiceServer
- func (UnimplementedGreetServiceServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
- func (UnimplementedGreetServiceServer) GreetAll(GreetService_GreetAllServer) error
- func (UnimplementedGreetServiceServer) GreetLongStream(GreetService_GreetLongStreamServer) error
- func (UnimplementedGreetServiceServer) GreetStream(*GreetRequest, GreetService_GreetStreamServer) error
- func (UnimplementedGreetServiceServer) GreetTimed(context.Context, *GreetRequest) (*GreetResponse, error)
- type UnsafeGreetServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_greet_proto protoreflect.FileDescriptor
var GreetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greet.GreetService", HandlerType: (*GreetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greet", Handler: _GreetService_Greet_Handler, }, { MethodName: "GreetTimed", Handler: _GreetService_GreetTimed_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GreetStream", Handler: _GreetService_GreetStream_Handler, ServerStreams: true, }, { StreamName: "GreetLongStream", Handler: _GreetService_GreetLongStream_Handler, ClientStreams: true, }, { StreamName: "GreetAll", Handler: _GreetService_GreetAll_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "greet.proto", }
GreetService_ServiceDesc is the grpc.ServiceDesc for GreetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetServiceServer ¶
func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
Types ¶
type GreetRequest ¶
type GreetRequest struct {
FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
// contains filtered or unexported fields
}
func (*GreetRequest) Descriptor
deprecated
func (*GreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetRequest.ProtoReflect.Descriptor instead.
func (*GreetRequest) GetFirstName ¶
func (x *GreetRequest) GetFirstName() string
func (*GreetRequest) ProtoMessage ¶
func (*GreetRequest) ProtoMessage()
func (*GreetRequest) ProtoReflect ¶
func (x *GreetRequest) ProtoReflect() protoreflect.Message
func (*GreetRequest) Reset ¶
func (x *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (x *GreetRequest) String() string
type GreetResponse ¶
type GreetResponse struct {
Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*GreetResponse) Descriptor
deprecated
func (*GreetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetResponse.ProtoReflect.Descriptor instead.
func (*GreetResponse) GetResult ¶
func (x *GreetResponse) GetResult() string
func (*GreetResponse) ProtoMessage ¶
func (*GreetResponse) ProtoMessage()
func (*GreetResponse) ProtoReflect ¶
func (x *GreetResponse) ProtoReflect() protoreflect.Message
func (*GreetResponse) Reset ¶
func (x *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (x *GreetResponse) String() string
type GreetServiceClient ¶
type GreetServiceClient interface {
Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error)
GreetStream(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (GreetService_GreetStreamClient, error)
GreetLongStream(ctx context.Context, opts ...grpc.CallOption) (GreetService_GreetLongStreamClient, error)
GreetAll(ctx context.Context, opts ...grpc.CallOption) (GreetService_GreetAllClient, error)
GreetTimed(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error)
}
GreetServiceClient is the client API for GreetService 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 NewGreetServiceClient ¶
func NewGreetServiceClient(cc grpc.ClientConnInterface) GreetServiceClient
type GreetServiceServer ¶
type GreetServiceServer interface {
Greet(context.Context, *GreetRequest) (*GreetResponse, error)
GreetStream(*GreetRequest, GreetService_GreetStreamServer) error
GreetLongStream(GreetService_GreetLongStreamServer) error
GreetAll(GreetService_GreetAllServer) error
GreetTimed(context.Context, *GreetRequest) (*GreetResponse, error)
// contains filtered or unexported methods
}
GreetServiceServer is the server API for GreetService service. All implementations must embed UnimplementedGreetServiceServer for forward compatibility
type GreetService_GreetAllClient ¶
type GreetService_GreetAllClient interface {
Send(*GreetRequest) error
Recv() (*GreetResponse, error)
grpc.ClientStream
}
type GreetService_GreetAllServer ¶
type GreetService_GreetAllServer interface {
Send(*GreetResponse) error
Recv() (*GreetRequest, error)
grpc.ServerStream
}
type GreetService_GreetLongStreamClient ¶
type GreetService_GreetLongStreamClient interface {
Send(*GreetRequest) error
CloseAndRecv() (*GreetResponse, error)
grpc.ClientStream
}
type GreetService_GreetLongStreamServer ¶
type GreetService_GreetLongStreamServer interface {
SendAndClose(*GreetResponse) error
Recv() (*GreetRequest, error)
grpc.ServerStream
}
type GreetService_GreetStreamClient ¶
type GreetService_GreetStreamClient interface {
Recv() (*GreetResponse, error)
grpc.ClientStream
}
type GreetService_GreetStreamServer ¶
type GreetService_GreetStreamServer interface {
Send(*GreetResponse) error
grpc.ServerStream
}
type UnimplementedGreetServiceServer ¶
type UnimplementedGreetServiceServer struct {
}
UnimplementedGreetServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGreetServiceServer) Greet ¶
func (UnimplementedGreetServiceServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
func (UnimplementedGreetServiceServer) GreetAll ¶
func (UnimplementedGreetServiceServer) GreetAll(GreetService_GreetAllServer) error
func (UnimplementedGreetServiceServer) GreetLongStream ¶
func (UnimplementedGreetServiceServer) GreetLongStream(GreetService_GreetLongStreamServer) error
func (UnimplementedGreetServiceServer) GreetStream ¶
func (UnimplementedGreetServiceServer) GreetStream(*GreetRequest, GreetService_GreetStreamServer) error
func (UnimplementedGreetServiceServer) GreetTimed ¶
func (UnimplementedGreetServiceServer) GreetTimed(context.Context, *GreetRequest) (*GreetResponse, error)
type UnsafeGreetServiceServer ¶
type UnsafeGreetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetServiceServer will result in compilation errors.