Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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)
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) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedCacheServer ¶
type UnimplementedCacheServer struct { }
UnimplementedCacheServer must be embedded to have forward compatible implementations.
func (UnimplementedCacheServer) GetRandomDataStream ¶
func (UnimplementedCacheServer) GetRandomDataStream(*Empty, Cache_GetRandomDataStreamServer) error
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.