echopb

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoService_Echo_FullMethodName = "/grpc_echo.v1.EchoService/Echo"
)

Variables

View Source
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)

View Source
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.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL