examplesgrpc

package
v1.3.0-20240412200742-... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Greeter_SayHello_FullMethodName = "/helloworld.Greeter/SayHello"
)

Variables

View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Greeter_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/examples/helloworld.proto",
}

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

Functions

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

Types

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *examples.HelloRequest, opts ...grpc.CallOption) (*examples.HelloReply, error)
}

GreeterClient is the client API for Greeter 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 NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *examples.HelloRequest) (*examples.HelloReply, error)
}

GreeterServer is the server API for Greeter service. All implementations should embed UnimplementedGreeterServer for forward compatibility

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer should be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) SayHello

type UnsafeGreeterServer

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

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

Jump to

Keyboard shortcuts

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