hello

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

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_stream_hello_hello_proto protoreflect.FileDescriptor
View Source
var Hello_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "stream.hello.Hello",
	HandlerType: (*HelloServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetNumber",
			Handler:       _Hello_GetNumber_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "UploadLog",
			Handler:       _Hello_UploadLog_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Chat",
			Handler:       _Hello_Chat_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "stream/hello/hello.proto",
}

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

Functions

func RegisterHelloServer

func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer)

Types

type ChatReply

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

func (*ChatReply) Descriptor deprecated

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

Deprecated: Use ChatReply.ProtoReflect.Descriptor instead.

func (*ChatReply) GetDownMsg

func (x *ChatReply) GetDownMsg() string

func (*ChatReply) ProtoMessage

func (*ChatReply) ProtoMessage()

func (*ChatReply) ProtoReflect

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

func (*ChatReply) Reset

func (x *ChatReply) Reset()

func (*ChatReply) String

func (x *ChatReply) String() string

type ChatRequest

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

func (*ChatRequest) Descriptor deprecated

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

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetUpMsg

func (x *ChatRequest) GetUpMsg() string

func (*ChatRequest) ProtoMessage

func (*ChatRequest) ProtoMessage()

func (*ChatRequest) ProtoReflect

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

func (*ChatRequest) Reset

func (x *ChatRequest) Reset()

func (*ChatRequest) String

func (x *ChatRequest) String() string

type GetNumberReply

type GetNumberReply struct {
	Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func (*GetNumberReply) Descriptor deprecated

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

Deprecated: Use GetNumberReply.ProtoReflect.Descriptor instead.

func (*GetNumberReply) GetNumber

func (x *GetNumberReply) GetNumber() int64

func (*GetNumberReply) ProtoMessage

func (*GetNumberReply) ProtoMessage()

func (*GetNumberReply) ProtoReflect

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

func (*GetNumberReply) Reset

func (x *GetNumberReply) Reset()

func (*GetNumberReply) String

func (x *GetNumberReply) String() string

type GetNumberRequest

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

func (*GetNumberRequest) Descriptor deprecated

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

Deprecated: Use GetNumberRequest.ProtoReflect.Descriptor instead.

func (*GetNumberRequest) GetData

func (x *GetNumberRequest) GetData() string

func (*GetNumberRequest) ProtoMessage

func (*GetNumberRequest) ProtoMessage()

func (*GetNumberRequest) ProtoReflect

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

func (*GetNumberRequest) Reset

func (x *GetNumberRequest) Reset()

func (*GetNumberRequest) String

func (x *GetNumberRequest) String() string

type HelloClient

type HelloClient interface {
	GetNumber(ctx context.Context, in *GetNumberRequest, opts ...grpc.CallOption) (Hello_GetNumberClient, error)
	UploadLog(ctx context.Context, opts ...grpc.CallOption) (Hello_UploadLogClient, error)
	Chat(ctx context.Context, opts ...grpc.CallOption) (Hello_ChatClient, error)
}

HelloClient is the client API for Hello 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 NewHelloClient

func NewHelloClient(cc grpc.ClientConnInterface) HelloClient

type HelloServer

type HelloServer interface {
	GetNumber(*GetNumberRequest, Hello_GetNumberServer) error
	UploadLog(Hello_UploadLogServer) error
	Chat(Hello_ChatServer) error
	// contains filtered or unexported methods
}

HelloServer is the service API for Hello service. All implementations must embed UnimplementedHelloServer for forward compatibility

type Hello_ChatClient

type Hello_ChatClient interface {
	Send(*ChatRequest) error
	Recv() (*ChatReply, error)
	grpc.ClientStream
}

type Hello_ChatServer

type Hello_ChatServer interface {
	Send(*ChatReply) error
	Recv() (*ChatRequest, error)
	grpc.ServerStream
}

type Hello_GetNumberClient

type Hello_GetNumberClient interface {
	Recv() (*GetNumberReply, error)
	grpc.ClientStream
}

type Hello_GetNumberServer

type Hello_GetNumberServer interface {
	Send(*GetNumberReply) error
	grpc.ServerStream
}

type Hello_UploadLogClient

type Hello_UploadLogClient interface {
	Send(*UploadLogRequest) error
	CloseAndRecv() (*UploadLogReply, error)
	grpc.ClientStream
}

type Hello_UploadLogServer

type Hello_UploadLogServer interface {
	SendAndClose(*UploadLogReply) error
	Recv() (*UploadLogRequest, error)
	grpc.ServerStream
}

type UnimplementedHelloServer

type UnimplementedHelloServer struct {
}

UnimplementedHelloServer must be embedded to have forward compatible implementations.

func (UnimplementedHelloServer) Chat

func (UnimplementedHelloServer) GetNumber

func (UnimplementedHelloServer) UploadLog

type UnsafeHelloServer

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

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

type UploadLogReply

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

func (*UploadLogReply) Descriptor deprecated

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

Deprecated: Use UploadLogReply.ProtoReflect.Descriptor instead.

func (*UploadLogReply) GetRes

func (x *UploadLogReply) GetRes() string

func (*UploadLogReply) ProtoMessage

func (*UploadLogReply) ProtoMessage()

func (*UploadLogReply) ProtoReflect

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

func (*UploadLogReply) Reset

func (x *UploadLogReply) Reset()

func (*UploadLogReply) String

func (x *UploadLogReply) String() string

type UploadLogRequest

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

func (*UploadLogRequest) Descriptor deprecated

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

Deprecated: Use UploadLogRequest.ProtoReflect.Descriptor instead.

func (*UploadLogRequest) GetLog

func (x *UploadLogRequest) GetLog() string

func (*UploadLogRequest) ProtoMessage

func (*UploadLogRequest) ProtoMessage()

func (*UploadLogRequest) ProtoReflect

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

func (*UploadLogRequest) Reset

func (x *UploadLogRequest) Reset()

func (*UploadLogRequest) String

func (x *UploadLogRequest) String() string

Jump to

Keyboard shortcuts

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