testpb

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoService_Echo_FullMethodName       = "/testpb.EchoService/Echo"
	EchoService_EchoStream_FullMethodName = "/testpb.EchoService/EchoStream"
)

Variables

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

Functions

func RegisterEchoServiceServer

func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)

Types

type EchoServiceClient

type EchoServiceClient interface {
	Echo(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
	EchoStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Message, Message], 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, *Message) (*Message, error)
	EchoStream(grpc.BidiStreamingServer[Message, Message]) error
}

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

type EchoService_EchoStreamClient

type EchoService_EchoStreamClient = grpc.BidiStreamingClient[Message, Message]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type EchoService_EchoStreamServer

type EchoService_EchoStreamServer = grpc.BidiStreamingServer[Message, Message]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Message

type Message 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 (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetMessage

func (x *Message) GetMessage() string

func (*Message) GetSequence

func (x *Message) GetSequence() int32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type UnimplementedEchoServiceServer

type UnimplementedEchoServiceServer struct{}

UnimplementedEchoServiceServer 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 (UnimplementedEchoServiceServer) Echo

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.

Jump to

Keyboard shortcuts

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