echo

package
v0.0.0-...-b63e24e Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Echo_Echo_FullMethodName = "/echo.Echo/Echo"
)
View Source
const HandlerEcho = "echo.Echo"

HandlerEcho is the name of a service, it's here to static type/reference.

Variables

View Source
var Echo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "echo.Echo",
	HandlerType: (*EchoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _Echo_Echo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "echo/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)

View Source
var File_echo_echo_proto protoreflect.FileDescriptor

Functions

func RegisterEchoHandler

func RegisterEchoHandler(handler EchoHandler) server.RegistrationFunc

RegisterEchoHandler will return a registration function that can be provided to entrypoints as a handler registration.

Types

type DRPCEchoDescription

type DRPCEchoDescription struct{}

func (DRPCEchoDescription) Method

func (DRPCEchoDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool)

func (DRPCEchoDescription) NumMethods

func (DRPCEchoDescription) NumMethods() int

type DRPCEchoServer

type DRPCEchoServer interface {
	Echo(context.Context, *Req) (*Resp, error)
}

type DRPCEchoUnimplementedServer

type DRPCEchoUnimplementedServer struct{}

func (*DRPCEchoUnimplementedServer) Echo

type DRPCEcho_EchoStream

type DRPCEcho_EchoStream interface {
	drpc.Stream
	SendAndClose(*Resp) error
}

type EchoClient

type EchoClient struct {
	// contains filtered or unexported fields
}

EchoClient is the client for echo.Echo

func NewEchoClient

func NewEchoClient(client client.Client) *EchoClient

NewEchoClient creates a new client for echo.Echo

func (*EchoClient) Echo

func (c *EchoClient) Echo(ctx context.Context, service string, req *Req, opts ...client.CallOption) (*Resp, error)

Echo calls Echo.

type EchoHandler

type EchoHandler interface {
	Echo(ctx context.Context, req *Req) (*Resp, error)
}

EchoHandler is the Handler for echo.Echo

type EchoServer

type EchoServer interface {
	Echo(context.Context, *Req) (*Resp, error)
}

EchoServer is the server API for Echo service. All implementations should embed UnimplementedEchoServer for forward compatibility.

type Req

type Req struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Req) Descriptor deprecated

func (*Req) Descriptor() ([]byte, []int)

Deprecated: Use Req.ProtoReflect.Descriptor instead.

func (*Req) GetPayload

func (x *Req) GetPayload() []byte

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) ProtoReflect

func (x *Req) ProtoReflect() protoreflect.Message

func (*Req) Reset

func (x *Req) Reset()

func (*Req) String

func (x *Req) String() string

type Resp

type Resp struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Resp) Descriptor deprecated

func (*Resp) Descriptor() ([]byte, []int)

Deprecated: Use Resp.ProtoReflect.Descriptor instead.

func (*Resp) GetPayload

func (x *Resp) GetPayload() []byte

func (*Resp) ProtoMessage

func (*Resp) ProtoMessage()

func (*Resp) ProtoReflect

func (x *Resp) ProtoReflect() protoreflect.Message

func (*Resp) Reset

func (x *Resp) Reset()

func (*Resp) String

func (x *Resp) String() string

type UnimplementedEchoServer

type UnimplementedEchoServer struct{}

UnimplementedEchoServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedEchoServer) Echo

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.

Jump to

Keyboard shortcuts

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