hello

package
v0.0.0-...-52bee24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_hello_hello_proto protoreflect.FileDescriptor
View Source
var HelloService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hello.HelloService",
	HandlerType: (*HelloServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _HelloService_SayHello_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "LotsOfReplies",
			Handler:       _HelloService_LotsOfReplies_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "LotsOfGreetings",
			Handler:       _HelloService_LotsOfGreetings_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "BidiHello",
			Handler:       _HelloService_BidiHello_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "hello/hello.proto",
}

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

Functions

func RegisterHelloServiceServer

func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)

Types

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age  int32  `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetAge

func (x *HelloRequest) GetAge() int32

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type HelloResponse

type HelloResponse struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloResponse) Descriptor deprecated

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

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetCode

func (x *HelloResponse) GetCode() int32

func (*HelloResponse) GetMsg

func (x *HelloResponse) GetMsg() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

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

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

type HelloServiceClient

type HelloServiceClient interface {
	// 一元 RPC
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
	// 服务端流式RPC
	LotsOfReplies(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (HelloService_LotsOfRepliesClient, error)
	// 客户端流式RPC
	LotsOfGreetings(ctx context.Context, opts ...grpc.CallOption) (HelloService_LotsOfGreetingsClient, error)
	// 双向流式RPC
	BidiHello(ctx context.Context, opts ...grpc.CallOption) (HelloService_BidiHelloClient, error)
}

HelloServiceClient is the client API for HelloService 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 HelloServiceServer

type HelloServiceServer interface {
	// 一元 RPC
	SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
	// 服务端流式RPC
	LotsOfReplies(*HelloRequest, HelloService_LotsOfRepliesServer) error
	// 客户端流式RPC
	LotsOfGreetings(HelloService_LotsOfGreetingsServer) error
	// 双向流式RPC
	BidiHello(HelloService_BidiHelloServer) error
	// contains filtered or unexported methods
}

HelloServiceServer is the register API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility

type HelloService_BidiHelloClient

type HelloService_BidiHelloClient interface {
	Send(*HelloRequest) error
	Recv() (*HelloResponse, error)
	grpc.ClientStream
}

type HelloService_BidiHelloServer

type HelloService_BidiHelloServer interface {
	Send(*HelloResponse) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type HelloService_LotsOfGreetingsClient

type HelloService_LotsOfGreetingsClient interface {
	Send(*HelloRequest) error
	CloseAndRecv() (*HelloResponse, error)
	grpc.ClientStream
}

type HelloService_LotsOfGreetingsServer

type HelloService_LotsOfGreetingsServer interface {
	SendAndClose(*HelloResponse) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type HelloService_LotsOfRepliesClient

type HelloService_LotsOfRepliesClient interface {
	Recv() (*HelloResponse, error)
	grpc.ClientStream
}

type HelloService_LotsOfRepliesServer

type HelloService_LotsOfRepliesServer interface {
	Send(*HelloResponse) error
	grpc.ServerStream
}

type UnimplementedHelloServiceServer

type UnimplementedHelloServiceServer struct {
}

UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedHelloServiceServer) BidiHello

func (UnimplementedHelloServiceServer) LotsOfGreetings

func (UnimplementedHelloServiceServer) LotsOfReplies

func (UnimplementedHelloServiceServer) SayHello

type UnsafeHelloServiceServer

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

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

Jump to

Keyboard shortcuts

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