echopb

package
v0.0.0-...-5412d06 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package echopb contains generated protobuf code.

Index

Constants

View Source
const (
	Echo_Echo_FullMethodName = "/echopb.Echo/Echo"
)

Variables

View Source
var (
	ServerAction_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "RETURN_CONTEXT_DEADLINE_EXCEEDED",
		2: "RETURN_CONTEXT_CANCELED",
	}
	ServerAction_value = map[string]int32{
		"UNSPECIFIED":                      0,
		"RETURN_CONTEXT_DEADLINE_EXCEEDED": 1,
		"RETURN_CONTEXT_CANCELED":          2,
	}
)

Enum value maps for ServerAction.

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

Functions

func RegisterEchoServer

func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)

Types

type EchoClient

type EchoClient interface {
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, 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 EchoRequest

type EchoRequest struct {
	Input       string               `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
	ServerSleep *durationpb.Duration `protobuf:"bytes,2,opt,name=server_sleep,json=serverSleep,proto3" json:"server_sleep,omitempty"`
	Action      ServerAction         `protobuf:"varint,3,opt,name=action,proto3,enum=echopb.ServerAction" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetAction

func (x *EchoRequest) GetAction() ServerAction

func (*EchoRequest) GetInput

func (x *EchoRequest) GetInput() string

func (*EchoRequest) GetServerSleep

func (x *EchoRequest) GetServerSleep() *durationpb.Duration

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 {
	Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoResponse) Descriptor deprecated

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetOutput

func (x *EchoResponse) GetOutput() string

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 interface {
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	// contains filtered or unexported methods
}

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

type ServerAction

type ServerAction int32
const (
	ServerAction_UNSPECIFIED                      ServerAction = 0
	ServerAction_RETURN_CONTEXT_DEADLINE_EXCEEDED ServerAction = 1
	ServerAction_RETURN_CONTEXT_CANCELED          ServerAction = 2
)

func (ServerAction) Descriptor

func (ServerAction) Enum

func (x ServerAction) Enum() *ServerAction

func (ServerAction) EnumDescriptor deprecated

func (ServerAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServerAction.Descriptor instead.

func (ServerAction) Number

func (ServerAction) String

func (x ServerAction) String() string

func (ServerAction) Type

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