Documentation ¶
Index ¶
- Variables
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetName() string
- func (x *HelloRequest) GetTimestamp() *timestamppb.Timestamp
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type HelloResponse
- func (*HelloResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HelloResponse) GetMessage() string
- func (x *HelloResponse) GetTimestamp() *timestamppb.Timestamp
- func (*HelloResponse) ProtoMessage()
- func (x *HelloResponse) ProtoReflect() protoreflect.Message
- func (x *HelloResponse) Reset()
- func (x *HelloResponse) String() string
- type HelloServiceClient
- type HelloServiceServer
- type UnimplementedHelloServiceServer
- type UnsafeHelloServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_timeout_hello_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "unary.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _HelloService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "timeout/hello.proto", }
HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
Types ¶
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) GetTimestamp ¶
func (x *HelloRequest) GetTimestamp() *timestamppb.Timestamp
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetMessage ¶
func (x *HelloResponse) GetMessage() string
func (*HelloResponse) GetTimestamp ¶
func (x *HelloResponse) GetTimestamp() *timestamppb.Timestamp
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type HelloServiceClient ¶
type HelloServiceClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) }
HelloServiceClient is the client API for HelloService 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 NewHelloServiceClient ¶
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloResponse, error) // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServiceServer) SayHello ¶
func (UnimplementedHelloServiceServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
type UnsafeHelloServiceServer ¶
type UnsafeHelloServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServiceServer will result in compilation errors.