Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
- type EchoRequest
- type EchoResponse
- func (*EchoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResponse) GetBody() string
- func (x *EchoResponse) GetHandlerReachedAt() *timestamppb.Timestamp
- func (x *EchoResponse) GetHandlerRespondedAt() *timestamppb.Timestamp
- func (x *EchoResponse) GetHeaders() map[string]string
- func (x *EchoResponse) GetReceivedAt() *timestamppb.Timestamp
- func (x *EchoResponse) GetRemoteAddr() string
- func (x *EchoResponse) GetSentAt() *timestamppb.Timestamp
- func (*EchoResponse) ProtoMessage()
- func (x *EchoResponse) ProtoReflect() protoreflect.Message
- func (x *EchoResponse) Reset()
- func (x *EchoResponse) String() string
- type EchoServiceClient
- type EchoServiceServer
- type UnimplementedEchoServiceServer
- type UnsafeEchoServiceServer
Constants ¶
const (
EchoService_Echo_FullMethodName = "/grpc_echo.v1.EchoService/Echo"
)
Variables ¶
var EchoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc_echo.v1.EchoService", HandlerType: (*EchoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _EchoService_Echo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "echopb/echo.proto", }
EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_echopb_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
Types ¶
type EchoRequest ¶
type EchoRequest struct { Ping string `protobuf:"bytes,1,opt,name=ping,proto3" json:"ping,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetPing ¶
func (x *EchoRequest) GetPing() 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 EchoResponse ¶
type EchoResponse struct { Headers map[string]string `` /* 155-byte string literal not displayed */ Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` RemoteAddr string `protobuf:"bytes,3,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` HandlerReachedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=handler_reached_at,json=handlerReachedAt,proto3" json:"handler_reached_at,omitempty"` HandlerRespondedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=handler_responded_at,json=handlerRespondedAt,proto3" json:"handler_responded_at,omitempty"` SentAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` // contains filtered or unexported fields }
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetBody ¶
func (x *EchoResponse) GetBody() string
func (*EchoResponse) GetHandlerReachedAt ¶
func (x *EchoResponse) GetHandlerReachedAt() *timestamppb.Timestamp
func (*EchoResponse) GetHandlerRespondedAt ¶
func (x *EchoResponse) GetHandlerRespondedAt() *timestamppb.Timestamp
func (*EchoResponse) GetHeaders ¶
func (x *EchoResponse) GetHeaders() map[string]string
func (*EchoResponse) GetReceivedAt ¶
func (x *EchoResponse) GetReceivedAt() *timestamppb.Timestamp
func (*EchoResponse) GetRemoteAddr ¶
func (x *EchoResponse) GetRemoteAddr() string
func (*EchoResponse) GetSentAt ¶
func (x *EchoResponse) GetSentAt() *timestamppb.Timestamp
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 EchoServiceClient ¶
type EchoServiceClient interface {
Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
}
EchoServiceClient is the client API for EchoService 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 NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface { Echo(context.Context, *EchoRequest) (*EchoResponse, error) // contains filtered or unexported methods }
EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct { }
UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServiceServer) Echo ¶
func (UnimplementedEchoServiceServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error)
type UnsafeEchoServiceServer ¶
type UnsafeEchoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.