Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRiverServer(s grpc.ServiceRegistrar, srv RiverServer)
- type BatchDelOption
- func (*BatchDelOption) Descriptor() ([]byte, []int)deprecated
- func (x *BatchDelOption) GetBatchSize() int64
- func (x *BatchDelOption) GetKeys() [][]byte
- func (*BatchDelOption) ProtoMessage()
- func (x *BatchDelOption) ProtoReflect() protoreflect.Message
- func (x *BatchDelOption) Reset()
- func (x *BatchDelOption) String() string
- type BatchPutOption
- func (*BatchPutOption) Descriptor() ([]byte, []int)deprecated
- func (x *BatchPutOption) GetBatchSize() int64
- func (x *BatchPutOption) GetRecords() []*Record
- func (*BatchPutOption) ProtoMessage()
- func (x *BatchPutOption) ProtoReflect() protoreflect.Message
- func (x *BatchPutOption) Reset()
- func (x *BatchPutOption) String() string
- type BatchResult
- type DataResult
- type ExpRecord
- type InfoResult
- type RangeOption
- func (*RangeOption) Descriptor() ([]byte, []int)deprecated
- func (x *RangeOption) GetDescend() bool
- func (x *RangeOption) GetMaxKey() []byte
- func (x *RangeOption) GetMinKey() []byte
- func (x *RangeOption) GetPattern() []byte
- func (*RangeOption) ProtoMessage()
- func (x *RangeOption) ProtoReflect() protoreflect.Message
- func (x *RangeOption) Reset()
- func (x *RangeOption) String() string
- type RangeResult
- type RawData
- type Record
- type RiverClient
- type RiverServer
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetDatasize() int64
- func (x *Status) GetHintsize() int64
- func (x *Status) GetKeys() int64
- func (x *Status) GetRecords() int64
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
- type TTLResult
- type UnimplementedRiverServer
- func (UnimplementedRiverServer) Del(context.Context, *RawData) (*InfoResult, error)
- func (UnimplementedRiverServer) DelInBatch(context.Context, *BatchDelOption) (*BatchResult, error)
- func (UnimplementedRiverServer) Exp(context.Context, *ExpRecord) (*InfoResult, error)
- func (UnimplementedRiverServer) Get(context.Context, *RawData) (*DataResult, error)
- func (UnimplementedRiverServer) Put(context.Context, *Record) (*InfoResult, error)
- func (UnimplementedRiverServer) PutInBatch(context.Context, *BatchPutOption) (*BatchResult, error)
- func (UnimplementedRiverServer) Range(context.Context, *RangeOption) (*RangeResult, error)
- func (UnimplementedRiverServer) Stat(context.Context, *emptypb.Empty) (*Status, error)
- func (UnimplementedRiverServer) TTL(context.Context, *RawData) (*TTLResult, error)
- type UnsafeRiverServer
Constants ¶
const ( River_Get_FullMethodName = "/River/Get" River_TTL_FullMethodName = "/River/TTL" River_Put_FullMethodName = "/River/Put" River_PutInBatch_FullMethodName = "/River/PutInBatch" River_Exp_FullMethodName = "/River/Exp" River_Del_FullMethodName = "/River/Del" River_DelInBatch_FullMethodName = "/River/DelInBatch" River_Stat_FullMethodName = "/River/Stat" River_Range_FullMethodName = "/River/Range" )
Variables ¶
var File_riverpb_river_proto protoreflect.FileDescriptor
var River_ServiceDesc = grpc.ServiceDesc{ ServiceName: "River", HandlerType: (*RiverServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _River_Get_Handler, }, { MethodName: "TTL", Handler: _River_TTL_Handler, }, { MethodName: "Put", Handler: _River_Put_Handler, }, { MethodName: "PutInBatch", Handler: _River_PutInBatch_Handler, }, { MethodName: "Exp", Handler: _River_Exp_Handler, }, { MethodName: "Del", Handler: _River_Del_Handler, }, { MethodName: "DelInBatch", Handler: _River_DelInBatch_Handler, }, { MethodName: "Stat", Handler: _River_Stat_Handler, }, { MethodName: "Range", Handler: _River_Range_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "riverpb/river.proto", }
River_ServiceDesc is the grpc.ServiceDesc for River service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRiverServer ¶
func RegisterRiverServer(s grpc.ServiceRegistrar, srv RiverServer)
Types ¶
type BatchDelOption ¶
type BatchDelOption struct { Keys [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` BatchSize int64 `protobuf:"varint,2,opt,name=batchSize,proto3" json:"batchSize,omitempty"` // contains filtered or unexported fields }
func (*BatchDelOption) Descriptor
deprecated
func (*BatchDelOption) Descriptor() ([]byte, []int)
Deprecated: Use BatchDelOption.ProtoReflect.Descriptor instead.
func (*BatchDelOption) GetBatchSize ¶
func (x *BatchDelOption) GetBatchSize() int64
func (*BatchDelOption) GetKeys ¶
func (x *BatchDelOption) GetKeys() [][]byte
func (*BatchDelOption) ProtoMessage ¶
func (*BatchDelOption) ProtoMessage()
func (*BatchDelOption) ProtoReflect ¶
func (x *BatchDelOption) ProtoReflect() protoreflect.Message
func (*BatchDelOption) Reset ¶
func (x *BatchDelOption) Reset()
func (*BatchDelOption) String ¶
func (x *BatchDelOption) String() string
type BatchPutOption ¶
type BatchPutOption struct { Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` BatchSize int64 `protobuf:"varint,2,opt,name=batchSize,proto3" json:"batchSize,omitempty"` // contains filtered or unexported fields }
func (*BatchPutOption) Descriptor
deprecated
func (*BatchPutOption) Descriptor() ([]byte, []int)
Deprecated: Use BatchPutOption.ProtoReflect.Descriptor instead.
func (*BatchPutOption) GetBatchSize ¶
func (x *BatchPutOption) GetBatchSize() int64
func (*BatchPutOption) GetRecords ¶
func (x *BatchPutOption) GetRecords() []*Record
func (*BatchPutOption) ProtoMessage ¶
func (*BatchPutOption) ProtoMessage()
func (*BatchPutOption) ProtoReflect ¶
func (x *BatchPutOption) ProtoReflect() protoreflect.Message
func (*BatchPutOption) Reset ¶
func (x *BatchPutOption) Reset()
func (*BatchPutOption) String ¶
func (x *BatchPutOption) String() string
type BatchResult ¶
type BatchResult struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Effected int64 `protobuf:"varint,2,opt,name=effected,proto3" json:"effected,omitempty"` // contains filtered or unexported fields }
func (*BatchResult) Descriptor
deprecated
func (*BatchResult) Descriptor() ([]byte, []int)
Deprecated: Use BatchResult.ProtoReflect.Descriptor instead.
func (*BatchResult) GetEffected ¶
func (x *BatchResult) GetEffected() int64
func (*BatchResult) GetOk ¶
func (x *BatchResult) GetOk() bool
func (*BatchResult) ProtoMessage ¶
func (*BatchResult) ProtoMessage()
func (*BatchResult) ProtoReflect ¶
func (x *BatchResult) ProtoReflect() protoreflect.Message
func (*BatchResult) Reset ¶
func (x *BatchResult) Reset()
func (*BatchResult) String ¶
func (x *BatchResult) String() string
type DataResult ¶
type DataResult struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*DataResult) Descriptor
deprecated
func (*DataResult) Descriptor() ([]byte, []int)
Deprecated: Use DataResult.ProtoReflect.Descriptor instead.
func (*DataResult) GetData ¶
func (x *DataResult) GetData() []byte
func (*DataResult) GetOk ¶
func (x *DataResult) GetOk() bool
func (*DataResult) ProtoMessage ¶
func (*DataResult) ProtoMessage()
func (*DataResult) ProtoReflect ¶
func (x *DataResult) ProtoReflect() protoreflect.Message
func (*DataResult) Reset ¶
func (x *DataResult) Reset()
func (*DataResult) String ¶
func (x *DataResult) String() string
type ExpRecord ¶
type ExpRecord struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Ttl int64 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"` // contains filtered or unexported fields }
func (*ExpRecord) Descriptor
deprecated
func (*ExpRecord) ProtoMessage ¶
func (*ExpRecord) ProtoMessage()
func (*ExpRecord) ProtoReflect ¶
func (x *ExpRecord) ProtoReflect() protoreflect.Message
type InfoResult ¶
type InfoResult struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
func (*InfoResult) Descriptor
deprecated
func (*InfoResult) Descriptor() ([]byte, []int)
Deprecated: Use InfoResult.ProtoReflect.Descriptor instead.
func (*InfoResult) GetOk ¶
func (x *InfoResult) GetOk() bool
func (*InfoResult) ProtoMessage ¶
func (*InfoResult) ProtoMessage()
func (*InfoResult) ProtoReflect ¶
func (x *InfoResult) ProtoReflect() protoreflect.Message
func (*InfoResult) Reset ¶
func (x *InfoResult) Reset()
func (*InfoResult) String ¶
func (x *InfoResult) String() string
type RangeOption ¶
type RangeOption struct { MinKey []byte `protobuf:"bytes,1,opt,name=minKey,proto3" json:"minKey,omitempty"` MaxKey []byte `protobuf:"bytes,2,opt,name=maxKey,proto3" json:"maxKey,omitempty"` Pattern []byte `protobuf:"bytes,3,opt,name=pattern,proto3" json:"pattern,omitempty"` Descend bool `protobuf:"varint,4,opt,name=descend,proto3" json:"descend,omitempty"` // contains filtered or unexported fields }
func (*RangeOption) Descriptor
deprecated
func (*RangeOption) Descriptor() ([]byte, []int)
Deprecated: Use RangeOption.ProtoReflect.Descriptor instead.
func (*RangeOption) GetDescend ¶
func (x *RangeOption) GetDescend() bool
func (*RangeOption) GetMaxKey ¶
func (x *RangeOption) GetMaxKey() []byte
func (*RangeOption) GetMinKey ¶
func (x *RangeOption) GetMinKey() []byte
func (*RangeOption) GetPattern ¶
func (x *RangeOption) GetPattern() []byte
func (*RangeOption) ProtoMessage ¶
func (*RangeOption) ProtoMessage()
func (*RangeOption) ProtoReflect ¶
func (x *RangeOption) ProtoReflect() protoreflect.Message
func (*RangeOption) Reset ¶
func (x *RangeOption) Reset()
func (*RangeOption) String ¶
func (x *RangeOption) String() string
type RangeResult ¶
type RangeResult struct { Keys [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*RangeResult) Descriptor
deprecated
func (*RangeResult) Descriptor() ([]byte, []int)
Deprecated: Use RangeResult.ProtoReflect.Descriptor instead.
func (*RangeResult) GetCount ¶
func (x *RangeResult) GetCount() int64
func (*RangeResult) GetKeys ¶
func (x *RangeResult) GetKeys() [][]byte
func (*RangeResult) ProtoMessage ¶
func (*RangeResult) ProtoMessage()
func (*RangeResult) ProtoReflect ¶
func (x *RangeResult) ProtoReflect() protoreflect.Message
func (*RangeResult) Reset ¶
func (x *RangeResult) Reset()
func (*RangeResult) String ¶
func (x *RangeResult) String() string
type RawData ¶
type RawData struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*RawData) Descriptor
deprecated
func (*RawData) ProtoMessage ¶
func (*RawData) ProtoMessage()
func (*RawData) ProtoReflect ¶
func (x *RawData) ProtoReflect() protoreflect.Message
type Record ¶
type Record struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Ttl int64 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"` // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type RiverClient ¶
type RiverClient interface { Get(ctx context.Context, in *RawData, opts ...grpc.CallOption) (*DataResult, error) TTL(ctx context.Context, in *RawData, opts ...grpc.CallOption) (*TTLResult, error) Put(ctx context.Context, in *Record, opts ...grpc.CallOption) (*InfoResult, error) PutInBatch(ctx context.Context, in *BatchPutOption, opts ...grpc.CallOption) (*BatchResult, error) Exp(ctx context.Context, in *ExpRecord, opts ...grpc.CallOption) (*InfoResult, error) Del(ctx context.Context, in *RawData, opts ...grpc.CallOption) (*InfoResult, error) DelInBatch(ctx context.Context, in *BatchDelOption, opts ...grpc.CallOption) (*BatchResult, error) Stat(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Status, error) Range(ctx context.Context, in *RangeOption, opts ...grpc.CallOption) (*RangeResult, error) }
RiverClient is the client API for River 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 NewRiverClient ¶
func NewRiverClient(cc grpc.ClientConnInterface) RiverClient
type RiverServer ¶
type RiverServer interface { Get(context.Context, *RawData) (*DataResult, error) TTL(context.Context, *RawData) (*TTLResult, error) Put(context.Context, *Record) (*InfoResult, error) PutInBatch(context.Context, *BatchPutOption) (*BatchResult, error) Exp(context.Context, *ExpRecord) (*InfoResult, error) Del(context.Context, *RawData) (*InfoResult, error) DelInBatch(context.Context, *BatchDelOption) (*BatchResult, error) Stat(context.Context, *emptypb.Empty) (*Status, error) Range(context.Context, *RangeOption) (*RangeResult, error) // contains filtered or unexported methods }
RiverServer is the server API for River service. All implementations must embed UnimplementedRiverServer for forward compatibility
type Status ¶
type Status struct { Keys int64 `protobuf:"varint,1,opt,name=keys,proto3" json:"keys,omitempty"` Records int64 `protobuf:"varint,2,opt,name=records,proto3" json:"records,omitempty"` Datasize int64 `protobuf:"varint,3,opt,name=datasize,proto3" json:"datasize,omitempty"` Hintsize int64 `protobuf:"varint,4,opt,name=hintsize,proto3" json:"hintsize,omitempty"` // contains filtered or unexported fields }
func (*Status) Descriptor
deprecated
func (*Status) GetDatasize ¶
func (*Status) GetHintsize ¶
func (*Status) GetRecords ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type TTLResult ¶
type TTLResult struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Ttl int64 `protobuf:"varint,2,opt,name=ttl,proto3" json:"ttl,omitempty"` // contains filtered or unexported fields }
func (*TTLResult) Descriptor
deprecated
func (*TTLResult) ProtoMessage ¶
func (*TTLResult) ProtoMessage()
func (*TTLResult) ProtoReflect ¶
func (x *TTLResult) ProtoReflect() protoreflect.Message
type UnimplementedRiverServer ¶
type UnimplementedRiverServer struct { }
UnimplementedRiverServer must be embedded to have forward compatible implementations.
func (UnimplementedRiverServer) Del ¶
func (UnimplementedRiverServer) Del(context.Context, *RawData) (*InfoResult, error)
func (UnimplementedRiverServer) DelInBatch ¶
func (UnimplementedRiverServer) DelInBatch(context.Context, *BatchDelOption) (*BatchResult, error)
func (UnimplementedRiverServer) Exp ¶
func (UnimplementedRiverServer) Exp(context.Context, *ExpRecord) (*InfoResult, error)
func (UnimplementedRiverServer) Get ¶
func (UnimplementedRiverServer) Get(context.Context, *RawData) (*DataResult, error)
func (UnimplementedRiverServer) Put ¶
func (UnimplementedRiverServer) Put(context.Context, *Record) (*InfoResult, error)
func (UnimplementedRiverServer) PutInBatch ¶
func (UnimplementedRiverServer) PutInBatch(context.Context, *BatchPutOption) (*BatchResult, error)
func (UnimplementedRiverServer) Range ¶
func (UnimplementedRiverServer) Range(context.Context, *RangeOption) (*RangeResult, error)
type UnsafeRiverServer ¶
type UnsafeRiverServer interface {
// contains filtered or unexported methods
}
UnsafeRiverServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RiverServer will result in compilation errors.