go_grpc

package
v0.0.0-...-1f99fff Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_gopher_gopher_proto protoreflect.FileDescriptor
View Source
var Gopher_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gopher.Gopher",
	HandlerType: (*GopherServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetGopher",
			Handler:    _Gopher_GetGopher_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/gopher/gopher.proto",
}

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

Functions

func RegisterGopherServer

func RegisterGopherServer(s grpc.ServiceRegistrar, srv GopherServer)

Types

type GopherClient

type GopherClient interface {
	// Get Gopher URL
	GetGopher(ctx context.Context, in *GopherRequest, opts ...grpc.CallOption) (*GopherReply, error)
}

GopherClient is the client API for Gopher 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 NewGopherClient

func NewGopherClient(cc grpc.ClientConnInterface) GopherClient

type GopherReply

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

The response message containing the greetings

func (*GopherReply) Descriptor deprecated

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

Deprecated: Use GopherReply.ProtoReflect.Descriptor instead.

func (*GopherReply) GetMessage

func (x *GopherReply) GetMessage() string

func (*GopherReply) ProtoMessage

func (*GopherReply) ProtoMessage()

func (*GopherReply) ProtoReflect

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

func (*GopherReply) Reset

func (x *GopherReply) Reset()

func (*GopherReply) String

func (x *GopherReply) String() string

type GopherRequest

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

The request message containing the user's name.

func (*GopherRequest) Descriptor deprecated

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

Deprecated: Use GopherRequest.ProtoReflect.Descriptor instead.

func (*GopherRequest) GetName

func (x *GopherRequest) GetName() string

func (*GopherRequest) ProtoMessage

func (*GopherRequest) ProtoMessage()

func (*GopherRequest) ProtoReflect

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

func (*GopherRequest) Reset

func (x *GopherRequest) Reset()

func (*GopherRequest) String

func (x *GopherRequest) String() string

type GopherServer

type GopherServer interface {
	// Get Gopher URL
	GetGopher(context.Context, *GopherRequest) (*GopherReply, error)
	// contains filtered or unexported methods
}

GopherServer is the server API for Gopher service. All implementations must embed UnimplementedGopherServer for forward compatibility

type UnimplementedGopherServer

type UnimplementedGopherServer struct {
}

UnimplementedGopherServer must be embedded to have forward compatible implementations.

func (UnimplementedGopherServer) GetGopher

type UnsafeGopherServer

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

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

Jump to

Keyboard shortcuts

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