Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)deprecated
- func (x *HelloReply) GetIp() string
- func (x *HelloReply) GetMessage() string
- func (x *HelloReply) GetNodeName() string
- func (*HelloReply) ProtoMessage()
- func (x *HelloReply) ProtoReflect() protoreflect.Message
- func (x *HelloReply) Reset()
- func (x *HelloReply) String() string
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetCommand() string
- func (x *HelloRequest) GetIp() string
- func (x *HelloRequest) GetMessage() string
- func (x *HelloRequest) GetName() string
- func (x *HelloRequest) GetNodeName() string
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type OSType
- type UnimplementedGreeterServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OSType_name = map[int32]string{ 0: "UNKNOWN_OS", 1: "IOS", 2: "ANDROID", } OSType_value = map[string]int32{ "UNKNOWN_OS": 0, "IOS": 1, "ANDROID": 2, } )
Enum value maps for OSType.
View Source
var File_hello_abi_proto protoreflect.FileDescriptor
View Source
var File_hello_rpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) }
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) }
GreeterServer is the server API for Greeter service.
type HelloReply ¶
type HelloReply struct { NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` Message string `protobuf:"bytes,3,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) GetIp ¶
func (x *HelloReply) GetIp() string
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) GetNodeName ¶
func (x *HelloReply) GetNodeName() 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 HelloRequest ¶
type HelloRequest struct { NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"` // request exec command, and response. Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,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) GetCommand ¶
func (x *HelloRequest) GetCommand() string
func (*HelloRequest) GetIp ¶
func (x *HelloRequest) GetIp() string
func (*HelloRequest) GetMessage ¶
func (x *HelloRequest) GetMessage() string
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) GetNodeName ¶
func (x *HelloRequest) GetNodeName() string
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 OSType ¶
type OSType int32
func (OSType) Descriptor ¶
func (OSType) Descriptor() protoreflect.EnumDescriptor
func (OSType) EnumDescriptor
deprecated
func (OSType) Number ¶
func (x OSType) Number() protoreflect.EnumNumber
func (OSType) Type ¶
func (OSType) Type() protoreflect.EnumType
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer can be embedded to have forward compatible implementations.
func (*UnimplementedGreeterServer) SayHello ¶
func (*UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
Click to show internal directories.
Click to hide internal directories.