Documentation ¶
Index ¶
Constants ¶
const (
Hello_Greet_FullMethodName = "/infraboard.mcube.example.Hello/Greet"
)
Variables ¶
var File_mcube_examples_rpc_grpc_pb_rpc_proto protoreflect.FileDescriptor
var Hello_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infraboard.mcube.example.Hello", HandlerType: (*HelloServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greet", Handler: _Hello_Greet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "mcube/examples/rpc_grpc/pb/rpc.proto", }
Hello_ServiceDesc is the grpc.ServiceDesc for Hello service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServer ¶
func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer)
Types ¶
type GreetRequest ¶
type GreetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*GreetRequest) Descriptor
deprecated
func (*GreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetRequest.ProtoReflect.Descriptor instead.
func (*GreetRequest) GetName ¶
func (x *GreetRequest) GetName() 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 { Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*GreetResponse) Descriptor
deprecated
func (*GreetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetResponse.ProtoReflect.Descriptor instead.
func (*GreetResponse) GetMsg ¶
func (x *GreetResponse) GetMsg() 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 HelloClient ¶
type HelloClient interface {
Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error)
}
HelloClient is the client API for Hello 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 NewHelloClient ¶
func NewHelloClient(cc grpc.ClientConnInterface) HelloClient
type HelloServer ¶
type HelloServer interface { Greet(context.Context, *GreetRequest) (*GreetResponse, error) // contains filtered or unexported methods }
HelloServer is the server API for Hello service. All implementations must embed UnimplementedHelloServer for forward compatibility
type UnimplementedHelloServer ¶
type UnimplementedHelloServer struct { }
UnimplementedHelloServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServer) Greet ¶
func (UnimplementedHelloServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
type UnsafeHelloServer ¶
type UnsafeHelloServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServer will result in compilation errors.