Documentation ¶
Index ¶
- Variables
- func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- type EchoReply
- func (*EchoReply) Descriptor() ([]byte, []int)deprecated
- func (x *EchoReply) GetApplicationName() string
- func (x *EchoReply) GetParam() string
- func (x *EchoReply) GetSleepTime() string
- func (*EchoReply) ProtoMessage()
- func (x *EchoReply) ProtoReflect() protoreflect.Message
- func (x *EchoReply) Reset()
- func (x *EchoReply) String() string
- type EchoRequest
- type GreeterClient
- type GreeterHTTPClient
- type GreeterHTTPClientImpl
- func (c *GreeterHTTPClientImpl) Echo(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)
- func (c *GreeterHTTPClientImpl) EchoError(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)
- func (c *GreeterHTTPClientImpl) EchoSlow(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)
- func (c *GreeterHTTPClientImpl) Hello(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*HelloReply, error)
- type GreeterHTTPServer
- type GreeterServer
- type HelloReply
- type UnimplementedGreeterServer
- func (UnimplementedGreeterServer) Echo(context.Context, *EchoRequest) (*EchoReply, error)
- func (UnimplementedGreeterServer) EchoError(context.Context, *EchoRequest) (*EchoReply, error)
- func (UnimplementedGreeterServer) EchoSlow(context.Context, *EchoRequest) (*EchoReply, error)
- func (UnimplementedGreeterServer) Hello(context.Context, *emptypb.Empty) (*HelloReply, error)
- type UnsafeGreeterServer
Constants ¶
This section is empty.
Variables ¶
var File_atom_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "atom.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _Greeter_Hello_Handler, }, { MethodName: "Echo", Handler: _Greeter_Echo_Handler, }, { MethodName: "EchoError", Handler: _Greeter_EchoError_Handler, }, { MethodName: "EchoSlow", Handler: _Greeter_EchoSlow_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "atom.proto", }
Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreeterHTTPServer ¶
func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
Types ¶
type EchoReply ¶
type EchoReply struct { Param string `protobuf:"bytes,1,opt,name=param,proto3" json:"param,omitempty"` ApplicationName string `protobuf:"bytes,2,opt,name=applicationName,proto3" json:"applicationName,omitempty"` SleepTime string `protobuf:"bytes,3,opt,name=sleepTime,proto3" json:"sleepTime,omitempty"` // contains filtered or unexported fields }
func (*EchoReply) Descriptor
deprecated
func (*EchoReply) GetApplicationName ¶
func (*EchoReply) GetSleepTime ¶
func (*EchoReply) ProtoMessage ¶
func (*EchoReply) ProtoMessage()
func (*EchoReply) ProtoReflect ¶
func (x *EchoReply) ProtoReflect() protoreflect.Message
type EchoRequest ¶
type EchoRequest struct { Param string `protobuf:"bytes,1,opt,name=param,proto3" json:"param,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetParam ¶
func (x *EchoRequest) GetParam() string
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) ProtoReflect ¶
func (x *EchoRequest) ProtoReflect() protoreflect.Message
func (*EchoRequest) Reset ¶
func (x *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (x *EchoRequest) String() string
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting Hello(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HelloReply, error) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) EchoError(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) EchoSlow(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) }
GreeterClient is the client API for Greeter 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 NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterHTTPClient ¶
type GreeterHTTPClient interface { Echo(ctx context.Context, req *EchoRequest, opts ...http.CallOption) (rsp *EchoReply, err error) EchoError(ctx context.Context, req *EchoRequest, opts ...http.CallOption) (rsp *EchoReply, err error) EchoSlow(ctx context.Context, req *EchoRequest, opts ...http.CallOption) (rsp *EchoReply, err error) Hello(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *HelloReply, err error) }
func NewGreeterHTTPClient ¶
func NewGreeterHTTPClient(client *http.Client) GreeterHTTPClient
type GreeterHTTPClientImpl ¶
type GreeterHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GreeterHTTPClientImpl) Echo ¶
func (c *GreeterHTTPClientImpl) Echo(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)
func (*GreeterHTTPClientImpl) EchoError ¶
func (c *GreeterHTTPClientImpl) EchoError(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)
func (*GreeterHTTPClientImpl) EchoSlow ¶
func (c *GreeterHTTPClientImpl) EchoSlow(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)
func (*GreeterHTTPClientImpl) Hello ¶
func (c *GreeterHTTPClientImpl) Hello(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*HelloReply, error)
type GreeterHTTPServer ¶
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting Hello(context.Context, *emptypb.Empty) (*HelloReply, error) Echo(context.Context, *EchoRequest) (*EchoReply, error) EchoError(context.Context, *EchoRequest) (*EchoReply, error) EchoSlow(context.Context, *EchoRequest) (*EchoReply, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) Echo ¶
func (UnimplementedGreeterServer) Echo(context.Context, *EchoRequest) (*EchoReply, error)
func (UnimplementedGreeterServer) EchoError ¶
func (UnimplementedGreeterServer) EchoError(context.Context, *EchoRequest) (*EchoReply, error)
func (UnimplementedGreeterServer) EchoSlow ¶
func (UnimplementedGreeterServer) EchoSlow(context.Context, *EchoRequest) (*EchoReply, error)
func (UnimplementedGreeterServer) Hello ¶
func (UnimplementedGreeterServer) Hello(context.Context, *emptypb.Empty) (*HelloReply, error)
type UnsafeGreeterServer ¶
type UnsafeGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.