echo

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoService_Echo_FullMethodName           = "/echo.EchoService/Echo"
	EchoService_EchoStream_FullMethodName     = "/echo.EchoService/EchoStream"
	EchoService_EchoBidiStream_FullMethodName = "/echo.EchoService/EchoBidiStream"
)

Variables

View Source
var EchoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "echo.EchoService",
	HandlerType: (*EchoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _EchoService_Echo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "EchoStream",
			Handler:       _EchoService_EchoStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "EchoBidiStream",
			Handler:       _EchoService_EchoBidiStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/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_proto_echo_proto protoreflect.FileDescriptor

Functions

func RegisterEchoServiceServer

func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)

Types

type EchoRequest

type EchoRequest struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMessage

func (x *EchoRequest) GetMessage() 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 {
	Message  string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Sequence int32  `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoResponse) Descriptor deprecated

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetMessage

func (x *EchoResponse) GetMessage() string

func (*EchoResponse) GetSequence

func (x *EchoResponse) GetSequence() int32

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 struct {
	UnimplementedEchoServiceServer
	// contains filtered or unexported fields
}

func NewEchoServer

func NewEchoServer() *EchoServer

func (*EchoServer) Echo

func (s *EchoServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error)

Unary call implementation

func (*EchoServer) EchoBidiStream

func (s *EchoServer) EchoBidiStream(stream EchoService_EchoBidiStreamServer) error

Bidirectional streaming implementation

func (*EchoServer) EchoStream

func (s *EchoServer) EchoStream(req *EchoRequest, stream EchoService_EchoStreamServer) error

Server streaming implementation

type EchoServiceClient

type EchoServiceClient interface {
	// Unary call
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	// Server streaming
	EchoStream(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (EchoService_EchoStreamClient, error)
	// Bidirectional streaming
	EchoBidiStream(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoBidiStreamClient, 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 {
	// Unary call
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	// Server streaming
	EchoStream(*EchoRequest, EchoService_EchoStreamServer) error
	// Bidirectional streaming
	EchoBidiStream(EchoService_EchoBidiStreamServer) error
	// contains filtered or unexported methods
}

EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility

type EchoService_EchoBidiStreamClient

type EchoService_EchoBidiStreamClient interface {
	Send(*EchoRequest) error
	Recv() (*EchoResponse, error)
	grpc.ClientStream
}

type EchoService_EchoBidiStreamServer

type EchoService_EchoBidiStreamServer interface {
	Send(*EchoResponse) error
	Recv() (*EchoRequest, error)
	grpc.ServerStream
}

type EchoService_EchoStreamClient

type EchoService_EchoStreamClient interface {
	Recv() (*EchoResponse, error)
	grpc.ClientStream
}

type EchoService_EchoStreamServer

type EchoService_EchoStreamServer interface {
	Send(*EchoResponse) error
	grpc.ServerStream
}

type UnimplementedEchoServiceServer

type UnimplementedEchoServiceServer struct {
}

UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEchoServiceServer) Echo

func (UnimplementedEchoServiceServer) EchoBidiStream

func (UnimplementedEchoServiceServer) EchoStream

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.

Directories

Path Synopsis
grpc_bridge
net_bridge
pty

Jump to

Keyboard shortcuts

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