Documentation ¶
Index ¶
- Variables
- func RegisterEchoServer(s *grpc.Server, srv EchoServer)
- func RegisterGreatingServer(s *grpc.Server, srv GreatingServer)
- type ClientRequest
- type EchoClient
- type EchoServer
- type Format
- type Format_Greeting
- func (Format_Greeting) Descriptor() protoreflect.EnumDescriptor
- func (x Format_Greeting) Enum() *Format_Greeting
- func (Format_Greeting) EnumDescriptor() ([]byte, []int)deprecated
- func (x Format_Greeting) Number() protoreflect.EnumNumber
- func (x Format_Greeting) String() string
- func (Format_Greeting) Type() protoreflect.EnumType
- type GreatingClient
- type GreatingClientRequest
- func (*GreatingClientRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GreatingClientRequest) GetClientGreeting() Format_Greeting
- func (*GreatingClientRequest) ProtoMessage()
- func (x *GreatingClientRequest) ProtoReflect() protoreflect.Message
- func (x *GreatingClientRequest) Reset()
- func (x *GreatingClientRequest) String() string
- type GreatingServer
- type ServerGreatingResponse
- func (*ServerGreatingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServerGreatingResponse) GetCreateTime() *timestamppb.Timestamp
- func (x *ServerGreatingResponse) GetFormat() *Format
- func (x *ServerGreatingResponse) GetName() string
- func (*ServerGreatingResponse) ProtoMessage()
- func (x *ServerGreatingResponse) ProtoReflect() protoreflect.Message
- func (x *ServerGreatingResponse) Reset()
- func (x *ServerGreatingResponse) String() string
- type ServerResponse
- func (*ServerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServerResponse) GetCreateTime() *timestamppb.Timestamp
- func (x *ServerResponse) GetMessage() string
- func (x *ServerResponse) GetName() string
- func (*ServerResponse) ProtoMessage()
- func (x *ServerResponse) ProtoReflect() protoreflect.Message
- func (x *ServerResponse) Reset()
- func (x *ServerResponse) String() string
- type UnimplementedEchoServer
- type UnimplementedGreatingServer
Constants ¶
This section is empty.
Variables ¶
var ( Format_Greeting_name = map[int32]string{ 0: "Unknown", 1: "Formal", 2: "Normal", 3: "Casual", } Format_Greeting_value = map[string]int32{ "Unknown": 0, "Formal": 1, "Normal": 2, "Casual": 3, } )
Enum value maps for Format_Greeting.
var File_grpc_echo_server_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServer ¶
func RegisterEchoServer(s *grpc.Server, srv EchoServer)
func RegisterGreatingServer ¶
func RegisterGreatingServer(s *grpc.Server, srv GreatingServer)
Types ¶
type ClientRequest ¶
type ClientRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ClientRequest) Descriptor
deprecated
func (*ClientRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClientRequest.ProtoReflect.Descriptor instead.
func (*ClientRequest) GetMessage ¶
func (x *ClientRequest) GetMessage() string
func (*ClientRequest) ProtoMessage ¶
func (*ClientRequest) ProtoMessage()
func (*ClientRequest) ProtoReflect ¶
func (x *ClientRequest) ProtoReflect() protoreflect.Message
func (*ClientRequest) Reset ¶
func (x *ClientRequest) Reset()
func (*ClientRequest) String ¶
func (x *ClientRequest) String() string
type EchoClient ¶
type EchoClient interface {
Reply(ctx context.Context, in *ClientRequest, opts ...grpc.CallOption) (*ServerResponse, error)
}
EchoClient is the client API for Echo service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEchoClient ¶
func NewEchoClient(cc grpc.ClientConnInterface) EchoClient
type EchoServer ¶
type EchoServer interface {
Reply(context.Context, *ClientRequest) (*ServerResponse, error)
}
EchoServer is the server API for Echo service.
type Format ¶
type Format struct { Echo string `protobuf:"bytes,1,opt,name=echo,proto3" json:"echo,omitempty"` // contains filtered or unexported fields }
func (*Format) Descriptor
deprecated
func (*Format) ProtoMessage ¶
func (*Format) ProtoMessage()
func (*Format) ProtoReflect ¶
func (x *Format) ProtoReflect() protoreflect.Message
type Format_Greeting ¶
type Format_Greeting int32
const ( Format_Unknown Format_Greeting = 0 Format_Formal Format_Greeting = 1 Format_Normal Format_Greeting = 2 Format_Casual Format_Greeting = 3 )
func (Format_Greeting) Descriptor ¶
func (Format_Greeting) Descriptor() protoreflect.EnumDescriptor
func (Format_Greeting) Enum ¶
func (x Format_Greeting) Enum() *Format_Greeting
func (Format_Greeting) EnumDescriptor
deprecated
func (Format_Greeting) EnumDescriptor() ([]byte, []int)
Deprecated: Use Format_Greeting.Descriptor instead.
func (Format_Greeting) Number ¶
func (x Format_Greeting) Number() protoreflect.EnumNumber
func (Format_Greeting) String ¶
func (x Format_Greeting) String() string
func (Format_Greeting) Type ¶
func (Format_Greeting) Type() protoreflect.EnumType
type GreatingClient ¶
type GreatingClient interface {
Reply(ctx context.Context, in *GreatingClientRequest, opts ...grpc.CallOption) (*ServerGreatingResponse, error)
}
GreatingClient is the client API for Greating service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreatingClient ¶
func NewGreatingClient(cc grpc.ClientConnInterface) GreatingClient
type GreatingClientRequest ¶
type GreatingClientRequest struct { ClientGreeting Format_Greeting `` /* 129-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GreatingClientRequest) Descriptor
deprecated
func (*GreatingClientRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreatingClientRequest.ProtoReflect.Descriptor instead.
func (*GreatingClientRequest) GetClientGreeting ¶
func (x *GreatingClientRequest) GetClientGreeting() Format_Greeting
func (*GreatingClientRequest) ProtoMessage ¶
func (*GreatingClientRequest) ProtoMessage()
func (*GreatingClientRequest) ProtoReflect ¶
func (x *GreatingClientRequest) ProtoReflect() protoreflect.Message
func (*GreatingClientRequest) Reset ¶
func (x *GreatingClientRequest) Reset()
func (*GreatingClientRequest) String ¶
func (x *GreatingClientRequest) String() string
type GreatingServer ¶
type GreatingServer interface {
Reply(context.Context, *GreatingClientRequest) (*ServerGreatingResponse, error)
}
GreatingServer is the server API for Greating service.
type ServerGreatingResponse ¶
type ServerGreatingResponse struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Format *Format `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // contains filtered or unexported fields }
func (*ServerGreatingResponse) Descriptor
deprecated
func (*ServerGreatingResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServerGreatingResponse.ProtoReflect.Descriptor instead.
func (*ServerGreatingResponse) GetCreateTime ¶
func (x *ServerGreatingResponse) GetCreateTime() *timestamppb.Timestamp
func (*ServerGreatingResponse) GetFormat ¶
func (x *ServerGreatingResponse) GetFormat() *Format
func (*ServerGreatingResponse) GetName ¶
func (x *ServerGreatingResponse) GetName() string
func (*ServerGreatingResponse) ProtoMessage ¶
func (*ServerGreatingResponse) ProtoMessage()
func (*ServerGreatingResponse) ProtoReflect ¶
func (x *ServerGreatingResponse) ProtoReflect() protoreflect.Message
func (*ServerGreatingResponse) Reset ¶
func (x *ServerGreatingResponse) Reset()
func (*ServerGreatingResponse) String ¶
func (x *ServerGreatingResponse) String() string
type ServerResponse ¶
type ServerResponse struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // contains filtered or unexported fields }
func (*ServerResponse) Descriptor
deprecated
func (*ServerResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServerResponse.ProtoReflect.Descriptor instead.
func (*ServerResponse) GetCreateTime ¶
func (x *ServerResponse) GetCreateTime() *timestamppb.Timestamp
func (*ServerResponse) GetMessage ¶
func (x *ServerResponse) GetMessage() string
func (*ServerResponse) GetName ¶
func (x *ServerResponse) GetName() string
func (*ServerResponse) ProtoMessage ¶
func (*ServerResponse) ProtoMessage()
func (*ServerResponse) ProtoReflect ¶
func (x *ServerResponse) ProtoReflect() protoreflect.Message
func (*ServerResponse) Reset ¶
func (x *ServerResponse) Reset()
func (*ServerResponse) String ¶
func (x *ServerResponse) String() string
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer can be embedded to have forward compatible implementations.
func (*UnimplementedEchoServer) Reply ¶
func (*UnimplementedEchoServer) Reply(context.Context, *ClientRequest) (*ServerResponse, error)
type UnimplementedGreatingServer ¶
type UnimplementedGreatingServer struct { }
UnimplementedGreatingServer can be embedded to have forward compatible implementations.
func (*UnimplementedGreatingServer) Reply ¶
func (*UnimplementedGreatingServer) Reply(context.Context, *GreatingClientRequest) (*ServerGreatingResponse, error)