echo

package
v0.0.0-...-b87209e Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 DRPCRegisterEcho

func DRPCRegisterEcho(mux drpc.Mux, impl DRPCEchoServer) error

func OrbRegister

func OrbRegister(handler EchoServer) server.RegistrationFunc

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

func RegisterEchoServer

func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)

Types

type DRPCEchoClient

type DRPCEchoClient interface {
	DRPCConn() drpc.Conn

	Echo(ctx context.Context, in *Req) (*Resp, error)
}

func NewDRPCEchoClient

func NewDRPCEchoClient(cc drpc.Conn) DRPCEchoClient

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 interface {
	Echo(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, 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 EchoServer

type EchoServer interface {
	Echo(context.Context, *Req) (*Resp, error)
	// contains filtered or unexported methods
}

EchoServer is the server API for Echo service. All implementations must 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 must be embedded to have forward compatible implementations.

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