grpcapi

package
v0.0.0-...-d0c7a0f Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpcapi.RedisRep",
	HandlerType: (*CacheServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetRandomDataStream",
			Handler:       _Cache_GetRandomDataStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/proto/grpcapi.proto",
}

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

View Source
var File_api_proto_grpcapi_proto protoreflect.FileDescriptor

Functions

func RegisterCacheServer

func RegisterCacheServer(s grpc.ServiceRegistrar, srv CacheServer)

Types

type CacheClient

type CacheClient interface {
	GetRandomDataStream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Cache_GetRandomDataStreamClient, error)
}

CacheClient is the client API for RedisRep 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 NewCacheClient

func NewCacheClient(cc grpc.ClientConnInterface) CacheClient

type CacheServer

type CacheServer interface {
	GetRandomDataStream(*Empty, Cache_GetRandomDataStreamServer) error
	// contains filtered or unexported methods
}

CacheServer is the server API for RedisRep service. All implementations must embed UnimplementedCacheServer for forward compatibility

type Cache_GetRandomDataStreamClient

type Cache_GetRandomDataStreamClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type Cache_GetRandomDataStreamServer

type Cache_GetRandomDataStreamServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedCacheServer

type UnimplementedCacheServer struct {
}

UnimplementedCacheServer must be embedded to have forward compatible implementations.

func (UnimplementedCacheServer) GetRandomDataStream

type UnsafeCacheServer

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

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

Jump to

Keyboard shortcuts

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