testgrpc

package
v1.0.5238-3f09522 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpc_internal_testgrpc_test_proto protoreflect.FileDescriptor
View Source
var PingPong_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testgrpc.PingPong",
	HandlerType: (*PingPongServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _PingPong_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/internal/testgrpc/test.proto",
}

PingPong_ServiceDesc is the grpc.ServiceDesc for PingPong service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPingPongServer

func RegisterPingPongServer(s grpc.ServiceRegistrar, srv PingPongServer)

Types

type PingPongClient

type PingPongClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error)
}

PingPongClient is the client API for PingPong 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 NewPingPongClient

func NewPingPongClient(cc grpc.ClientConnInterface) PingPongClient

type PingPongServer

type PingPongServer interface {
	Ping(context.Context, *PingRequest) (*PingReply, error)
	// contains filtered or unexported methods
}

PingPongServer is the server API for PingPong service. All implementations must embed UnimplementedPingPongServer for forward compatibility

type PingReply

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

func (*PingReply) Descriptor deprecated

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

Deprecated: Use PingReply.ProtoReflect.Descriptor instead.

func (*PingReply) GetMessage

func (x *PingReply) GetMessage() string

func (*PingReply) ProtoMessage

func (*PingReply) ProtoMessage()

func (*PingReply) ProtoReflect

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

func (*PingReply) Reset

func (x *PingReply) Reset()

func (*PingReply) String

func (x *PingReply) String() string

type PingRequest

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

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetCaller

func (x *PingRequest) GetCaller() string

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type UnimplementedPingPongServer

type UnimplementedPingPongServer struct {
}

UnimplementedPingPongServer must be embedded to have forward compatible implementations.

func (UnimplementedPingPongServer) Ping

type UnsafePingPongServer

type UnsafePingPongServer interface {
	// contains filtered or unexported methods
}

UnsafePingPongServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PingPongServer will result in compilation errors.

Jump to

Keyboard shortcuts

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