Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Echo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.Echo", HandlerType: (*EchoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Echo_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.proto", }
Echo_ServiceDesc is the grpc.ServiceDesc for Echo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServer ¶
func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
Types ¶
type EchoClient ¶
type EchoClient interface {
Ping(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
}
EchoClient is the client API for Echo 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 NewEchoClient ¶
func NewEchoClient(cc grpc.ClientConnInterface) EchoClient
type EchoServer ¶
type EchoServer interface { Ping(context.Context, *Message) (*Message, error) // contains filtered or unexported methods }
EchoServer is the server API for Echo service. All implementations must embed UnimplementedEchoServer for forward compatibility
type Message ¶
type Message struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer must be embedded to have forward compatible implementations.
type UnsafeEchoServer ¶
type UnsafeEchoServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServer will result in compilation errors.