server_stream

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

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

Go to latest
Published: Mar 1, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_server_stream_proto protoreflect.FileDescriptor

Functions

func RegisterGreetsServer

func RegisterGreetsServer(s *grpc.Server, srv GreetsServer)

Types

type GreetsClient

type GreetsClient interface {
	SayHello(ctx context.Context, opts ...grpc.CallOption) (Greets_SayHelloClient, error)
}

GreetsClient is the client API for Greets service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGreetsClient

func NewGreetsClient(cc grpc.ClientConnInterface) GreetsClient

type GreetsServer

type GreetsServer interface {
	SayHello(Greets_SayHelloServer) error
}

GreetsServer is the server API for Greets service.

type Greets_SayHelloClient

type Greets_SayHelloClient interface {
	Send(*HelloRequest) error
	CloseAndRecv() (*HelloReply, error)
	grpc.ClientStream
}

type Greets_SayHelloServer

type Greets_SayHelloServer interface {
	SendAndClose(*HelloReply) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type HelloReply

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

HelloReply协议内容

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) GetName

func (x *HelloReply) GetName() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloRequest

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

HelloRequest协议

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetMessage

func (x *HelloRequest) GetMessage() string

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 UnimplementedGreetsServer

type UnimplementedGreetsServer struct {
}

UnimplementedGreetsServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreetsServer) SayHello

Jump to

Keyboard shortcuts

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