Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proto_spying_echo_proto protoreflect.FileDescriptor
var SpyingEcho_ServiceDesc = grpc.ServiceDesc{ ServiceName: "spyingecho.SpyingEcho", HandlerType: (*SpyingEchoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _SpyingEcho_Echo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Spy", Handler: _SpyingEcho_Spy_Handler, ServerStreams: true, }, }, Metadata: "proto/spying_echo.proto", }
SpyingEcho_ServiceDesc is the grpc.ServiceDesc for SpyingEcho service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSpyingEchoServer ¶
func RegisterSpyingEchoServer(s grpc.ServiceRegistrar, srv SpyingEchoServer)
Types ¶
type EchoReply ¶
type EchoReply struct { Msg string `protobuf:"bytes,1,opt,name=Msg,proto3" json:"Msg,omitempty"` // contains filtered or unexported fields }
EchoReply is the response of an user's request
func (*EchoReply) Descriptor
deprecated
func (*EchoReply) ProtoMessage ¶
func (*EchoReply) ProtoMessage()
func (*EchoReply) ProtoReflect ¶
func (x *EchoReply) ProtoReflect() protoreflect.Message
type EchoRequest ¶
type EchoRequest struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` // contains filtered or unexported fields }
EchoRequest regroup an used and his message
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetMsg ¶
func (x *EchoRequest) GetMsg() string
func (*EchoRequest) GetName ¶
func (x *EchoRequest) GetName() 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 Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type SpyingEchoClient ¶
type SpyingEchoClient interface { // Echo respond the thing you say Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) // Spy send all things that are say Spy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (SpyingEcho_SpyClient, error) }
SpyingEchoClient is the client API for SpyingEcho 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 NewSpyingEchoClient ¶
func NewSpyingEchoClient(cc grpc.ClientConnInterface) SpyingEchoClient
type SpyingEchoServer ¶
type SpyingEchoServer interface { // Echo respond the thing you say Echo(context.Context, *EchoRequest) (*EchoReply, error) // Spy send all things that are say Spy(*Empty, SpyingEcho_SpyServer) error // contains filtered or unexported methods }
SpyingEchoServer is the server API for SpyingEcho service. All implementations must embed UnimplementedSpyingEchoServer for forward compatibility
type SpyingEcho_SpyClient ¶
type SpyingEcho_SpyClient interface { Recv() (*EchoReply, error) grpc.ClientStream }
type SpyingEcho_SpyServer ¶
type SpyingEcho_SpyServer interface { Send(*EchoReply) error grpc.ServerStream }
type UnimplementedSpyingEchoServer ¶
type UnimplementedSpyingEchoServer struct { }
UnimplementedSpyingEchoServer must be embedded to have forward compatible implementations.
func (UnimplementedSpyingEchoServer) Echo ¶
func (UnimplementedSpyingEchoServer) Echo(context.Context, *EchoRequest) (*EchoReply, error)
func (UnimplementedSpyingEchoServer) Spy ¶
func (UnimplementedSpyingEchoServer) Spy(*Empty, SpyingEcho_SpyServer) error
type UnsafeSpyingEchoServer ¶
type UnsafeSpyingEchoServer interface {
// contains filtered or unexported methods
}
UnsafeSpyingEchoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SpyingEchoServer will result in compilation errors.