hello_grpc

package
v0.0.0-...-5c86377 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelloGRPC_SayHi_FullMethodName = "/hello_grpc.HelloGRPC/SayHi"
)

Variables

View Source
var File_hello_proto protoreflect.FileDescriptor
View Source
var HelloGRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hello_grpc.HelloGRPC",
	HandlerType: (*HelloGRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHi",
			Handler:    _HelloGRPC_SayHi_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hello.proto",
}

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

Functions

func RegisterHelloGRPCServer

func RegisterHelloGRPCServer(s grpc.ServiceRegistrar, srv HelloGRPCServer)

Types

type HelloGRPCClient

type HelloGRPCClient interface {
	SayHi(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
}

HelloGRPCClient is the client API for HelloGRPC 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 NewHelloGRPCClient

func NewHelloGRPCClient(cc grpc.ClientConnInterface) HelloGRPCClient

type HelloGRPCServer

type HelloGRPCServer interface {
	SayHi(context.Context, *Req) (*Res, error)
	// contains filtered or unexported methods
}

HelloGRPCServer is the server API for HelloGRPC service. All implementations must embed UnimplementedHelloGRPCServer for forward compatibility

type Req

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

func (*Req) Descriptor deprecated

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

Deprecated: Use Req.ProtoReflect.Descriptor instead.

func (*Req) GetMessage

func (x *Req) GetMessage() string

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) ProtoReflect

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

func (*Req) Reset

func (x *Req) Reset()

func (*Req) String

func (x *Req) String() string

type Res

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

func (*Res) Descriptor deprecated

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

Deprecated: Use Res.ProtoReflect.Descriptor instead.

func (*Res) GetMessage

func (x *Res) GetMessage() string

func (*Res) ProtoMessage

func (*Res) ProtoMessage()

func (*Res) ProtoReflect

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

func (*Res) Reset

func (x *Res) Reset()

func (*Res) String

func (x *Res) String() string

type UnimplementedHelloGRPCServer

type UnimplementedHelloGRPCServer struct {
}

UnimplementedHelloGRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedHelloGRPCServer) SayHi

type UnsafeHelloGRPCServer

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

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

Jump to

Keyboard shortcuts

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