client_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_client_stream_proto protoreflect.FileDescriptor

Functions

func RegisterGreetServer

func RegisterGreetServer(s *grpc.Server, srv GreetServer)

Types

type GreetClient

type GreetClient interface {
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Greet_SayHelloClient, error)
}

GreetClient is the client API for Greet service.

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

func NewGreetClient

func NewGreetClient(cc grpc.ClientConnInterface) GreetClient

type GreetServer

type GreetServer interface {
	SayHello(*HelloRequest, Greet_SayHelloServer) error
}

GreetServer is the server API for Greet service.

type Greet_SayHelloClient

type Greet_SayHelloClient interface {
	Recv() (*HelloReply, error)
	grpc.ClientStream
}

type Greet_SayHelloServer

type Greet_SayHelloServer interface {
	Send(*HelloReply) 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 UnimplementedGreetServer

type UnimplementedGreetServer struct {
}

UnimplementedGreetServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreetServer) SayHello

Jump to

Keyboard shortcuts

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