v1

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_protobuf_spec_grpcserverpb_v1_grpcserver_proto protoreflect.FileDescriptor

Functions

func RegisterDemoServer

func RegisterDemoServer(s *grpc.Server, srv DemoServer)

Types

type Chunk

type Chunk struct {
	Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

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

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetData

func (x *Chunk) GetData() []byte

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

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

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type DemoClient

type DemoClient interface {
	// Echo unary RPC: echoes the request message, demonstrating the
	// transport -> endpoint -> middleware -> service -> store pipeline.
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	// Download server-streaming RPC: sends data in ChunkSize chunks, demonstrating transport.StreamSendMsg.
	Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (Demo_DownloadClient, error)
}

DemoClient is the client API for Demo service.

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

func NewDemoClient

func NewDemoClient(cc grpc.ClientConnInterface) DemoClient

type DemoServer

type DemoServer interface {
	// Echo unary RPC: echoes the request message, demonstrating the
	// transport -> endpoint -> middleware -> service -> store pipeline.
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	// Download server-streaming RPC: sends data in ChunkSize chunks, demonstrating transport.StreamSendMsg.
	Download(*DownloadRequest, Demo_DownloadServer) error
}

DemoServer is the server API for Demo service.

type Demo_DownloadClient

type Demo_DownloadClient interface {
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type Demo_DownloadServer

type Demo_DownloadServer interface {
	Send(*Chunk) error
	grpc.ServerStream
}

type DownloadRequest

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

func (*DownloadRequest) Descriptor deprecated

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

Deprecated: Use DownloadRequest.ProtoReflect.Descriptor instead.

func (*DownloadRequest) GetKey

func (x *DownloadRequest) GetKey() string

func (*DownloadRequest) ProtoMessage

func (*DownloadRequest) ProtoMessage()

func (*DownloadRequest) ProtoReflect

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

func (*DownloadRequest) Reset

func (x *DownloadRequest) Reset()

func (*DownloadRequest) String

func (x *DownloadRequest) String() string

type EchoRequest

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

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMessage

func (x *EchoRequest) GetMessage() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset

func (x *EchoRequest) Reset()

func (*EchoRequest) String

func (x *EchoRequest) String() string

type EchoResponse

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

func (*EchoResponse) Descriptor deprecated

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetMessage

func (x *EchoResponse) GetMessage() string

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) ProtoReflect

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

func (*EchoResponse) Reset

func (x *EchoResponse) Reset()

func (*EchoResponse) String

func (x *EchoResponse) String() string

type UnimplementedDemoServer

type UnimplementedDemoServer struct {
}

UnimplementedDemoServer can be embedded to have forward compatible implementations.

func (*UnimplementedDemoServer) Download

func (*UnimplementedDemoServer) Echo

Jump to

Keyboard shortcuts

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