riverpb

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_riverpb_river_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use ExpRecord.ProtoReflect.Descriptor instead.

func (*ExpRecord) GetKey

func (x *ExpRecord) GetKey() []byte

func (*ExpRecord) GetTtl

func (x *ExpRecord) GetTtl() int64

func (*ExpRecord) ProtoMessage

func (*ExpRecord) ProtoMessage()

func (*ExpRecord) ProtoReflect

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

func (*ExpRecord) Reset

func (x *ExpRecord) Reset()

func (*ExpRecord) String

func (x *ExpRecord) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use RawData.ProtoReflect.Descriptor instead.

func (*RawData) GetData

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

func (*RawData) ProtoMessage

func (*RawData) ProtoMessage()

func (*RawData) ProtoReflect

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

func (*RawData) Reset

func (x *RawData) Reset()

func (*RawData) String

func (x *RawData) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetKey

func (x *Record) GetKey() []byte

func (*Record) GetTtl

func (x *Record) GetTtl() int64

func (*Record) GetValue

func (x *Record) GetValue() []byte

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetDatasize

func (x *Status) GetDatasize() int64

func (*Status) GetHintsize

func (x *Status) GetHintsize() int64

func (*Status) GetKeys

func (x *Status) GetKeys() int64

func (*Status) GetRecords

func (x *Status) GetRecords() int64

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TTLResult.ProtoReflect.Descriptor instead.

func (*TTLResult) GetOk

func (x *TTLResult) GetOk() bool

func (*TTLResult) GetTtl

func (x *TTLResult) GetTtl() int64

func (*TTLResult) ProtoMessage

func (*TTLResult) ProtoMessage()

func (*TTLResult) ProtoReflect

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

func (*TTLResult) Reset

func (x *TTLResult) Reset()

func (*TTLResult) String

func (x *TTLResult) String() string

type UnimplementedRiverServer

type UnimplementedRiverServer struct {
}

UnimplementedRiverServer must be embedded to have forward compatible implementations.

func (UnimplementedRiverServer) Del

func (UnimplementedRiverServer) DelInBatch

func (UnimplementedRiverServer) Exp

func (UnimplementedRiverServer) Get

func (UnimplementedRiverServer) Put

func (UnimplementedRiverServer) PutInBatch

func (UnimplementedRiverServer) Range

func (UnimplementedRiverServer) Stat

func (UnimplementedRiverServer) TTL

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.

Jump to

Keyboard shortcuts

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