Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
- type EchoClient
- type EchoPayload
- type EchoRequest
- func (*EchoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EchoRequest) GetIsError() bool
- func (x *EchoRequest) GetLatency() *durationpb.Duration
- func (m *EchoRequest) GetOptions() isEchoRequest_Options
- func (x *EchoRequest) GetPayload() *EchoPayload
- func (x *EchoRequest) GetRepeat() uint32
- func (*EchoRequest) ProtoMessage()
- func (x *EchoRequest) ProtoReflect() protoreflect.Message
- func (x *EchoRequest) Reset()
- func (x *EchoRequest) String() string
- type EchoRequest_IsError
- type EchoRequest_Repeat
- type EchoResponse
- type EchoServer
- type Echo_BiStreamClient
- type Echo_BiStreamServer
- type Echo_InnerStreamClient
- type Echo_InnerStreamServer
- type Echo_OuterStreamClient
- type Echo_OuterStreamServer
- type UnimplementedEchoServer
- func (UnimplementedEchoServer) BiStream(Echo_BiStreamServer) error
- func (UnimplementedEchoServer) InnerStream(*EchoRequest, Echo_InnerStreamServer) error
- func (UnimplementedEchoServer) OuterStream(Echo_OuterStreamServer) error
- func (UnimplementedEchoServer) Unary(context.Context, *EchoRequest) (*EchoResponse, error)
- type UnsafeEchoServer
Constants ¶
const ( Echo_Unary_FullMethodName = "/ext_kit.test.pb.Echo/Unary" Echo_InnerStream_FullMethodName = "/ext_kit.test.pb.Echo/InnerStream" Echo_OuterStream_FullMethodName = "/ext_kit.test.pb.Echo/OuterStream" Echo_BiStream_FullMethodName = "/ext_kit.test.pb.Echo/BiStream" )
Variables ¶
var Echo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ext_kit.test.pb.Echo", HandlerType: (*EchoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Unary", Handler: _Echo_Unary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "InnerStream", Handler: _Echo_InnerStream_Handler, ServerStreams: true, }, { StreamName: "OuterStream", Handler: _Echo_OuterStream_Handler, ClientStreams: true, }, { StreamName: "BiStream", Handler: _Echo_BiStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "echo.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_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServer ¶
func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
Types ¶
type EchoClient ¶
type EchoClient interface { Unary(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) InnerStream(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (Echo_InnerStreamClient, error) OuterStream(ctx context.Context, opts ...grpc.CallOption) (Echo_OuterStreamClient, error) BiStream(ctx context.Context, opts ...grpc.CallOption) (Echo_BiStreamClient, 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 EchoPayload ¶
type EchoPayload struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*EchoPayload) Descriptor
deprecated
func (*EchoPayload) Descriptor() ([]byte, []int)
Deprecated: Use EchoPayload.ProtoReflect.Descriptor instead.
func (*EchoPayload) GetMsg ¶
func (x *EchoPayload) GetMsg() string
func (*EchoPayload) ProtoMessage ¶
func (*EchoPayload) ProtoMessage()
func (*EchoPayload) ProtoReflect ¶
func (x *EchoPayload) ProtoReflect() protoreflect.Message
func (*EchoPayload) Reset ¶
func (x *EchoPayload) Reset()
func (*EchoPayload) String ¶
func (x *EchoPayload) String() string
type EchoRequest ¶
type EchoRequest struct { Payload *EchoPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Latency *durationpb.Duration `protobuf:"bytes,2,opt,name=latency,proto3" json:"latency,omitempty"` // Types that are assignable to Options: // // *EchoRequest_IsError // *EchoRequest_Repeat Options isEchoRequest_Options `protobuf_oneof:"options"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetIsError ¶
func (x *EchoRequest) GetIsError() bool
func (*EchoRequest) GetLatency ¶
func (x *EchoRequest) GetLatency() *durationpb.Duration
func (*EchoRequest) GetOptions ¶
func (m *EchoRequest) GetOptions() isEchoRequest_Options
func (*EchoRequest) GetPayload ¶
func (x *EchoRequest) GetPayload() *EchoPayload
func (*EchoRequest) GetRepeat ¶
func (x *EchoRequest) GetRepeat() uint32
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 EchoRequest_IsError ¶
type EchoRequest_IsError struct {
IsError bool `protobuf:"varint,3,opt,name=is_error,json=isError,proto3,oneof"`
}
type EchoRequest_Repeat ¶
type EchoRequest_Repeat struct {
Repeat uint32 `protobuf:"varint,4,opt,name=repeat,proto3,oneof"`
}
type EchoResponse ¶
type EchoResponse struct { Payloads []*EchoPayload `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"` // contains filtered or unexported fields }
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetPayloads ¶
func (x *EchoResponse) GetPayloads() []*EchoPayload
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) ProtoReflect ¶
func (x *EchoResponse) ProtoReflect() protoreflect.Message
func (*EchoResponse) Reset ¶
func (x *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (x *EchoResponse) String() string
type EchoServer ¶
type EchoServer interface { Unary(context.Context, *EchoRequest) (*EchoResponse, error) InnerStream(*EchoRequest, Echo_InnerStreamServer) error OuterStream(Echo_OuterStreamServer) error BiStream(Echo_BiStreamServer) error // contains filtered or unexported methods }
EchoServer is the server API for Echo service. All implementations must embed UnimplementedEchoServer for forward compatibility
type Echo_BiStreamClient ¶
type Echo_BiStreamClient interface { Send(*EchoRequest) error Recv() (*EchoResponse, error) grpc.ClientStream }
type Echo_BiStreamServer ¶
type Echo_BiStreamServer interface { Send(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream }
type Echo_InnerStreamClient ¶
type Echo_InnerStreamClient interface { Recv() (*EchoResponse, error) grpc.ClientStream }
type Echo_InnerStreamServer ¶
type Echo_InnerStreamServer interface { Send(*EchoResponse) error grpc.ServerStream }
type Echo_OuterStreamClient ¶
type Echo_OuterStreamClient interface { Send(*EchoRequest) error CloseAndRecv() (*EchoResponse, error) grpc.ClientStream }
type Echo_OuterStreamServer ¶
type Echo_OuterStreamServer interface { SendAndClose(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream }
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServer) BiStream ¶
func (UnimplementedEchoServer) BiStream(Echo_BiStreamServer) error
func (UnimplementedEchoServer) InnerStream ¶
func (UnimplementedEchoServer) InnerStream(*EchoRequest, Echo_InnerStreamServer) error
func (UnimplementedEchoServer) OuterStream ¶
func (UnimplementedEchoServer) OuterStream(Echo_OuterStreamServer) error
func (UnimplementedEchoServer) Unary ¶
func (UnimplementedEchoServer) Unary(context.Context, *EchoRequest) (*EchoResponse, error)
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.