pbnetkv

package
v0.0.0-...-2f13118 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNetKVServer

func RegisterNetKVServer(s *grpc.Server, srv NetKVServer)

Types

type BatchPrefixRequest

type BatchPrefixRequest struct {
	Prefixes             [][]byte     `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"`
	LimitPerPrefix       uint64       `protobuf:"varint,2,opt,name=limit_per_prefix,json=limitPerPrefix,proto3" json:"limit_per_prefix,omitempty"`
	Options              *ReadOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*BatchPrefixRequest) Descriptor

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

func (*BatchPrefixRequest) GetLimitPerPrefix

func (m *BatchPrefixRequest) GetLimitPerPrefix() uint64

func (*BatchPrefixRequest) GetOptions

func (m *BatchPrefixRequest) GetOptions() *ReadOptions

func (*BatchPrefixRequest) GetPrefixes

func (m *BatchPrefixRequest) GetPrefixes() [][]byte

func (*BatchPrefixRequest) ProtoMessage

func (*BatchPrefixRequest) ProtoMessage()

func (*BatchPrefixRequest) Reset

func (m *BatchPrefixRequest) Reset()

func (*BatchPrefixRequest) String

func (m *BatchPrefixRequest) String() string

func (*BatchPrefixRequest) XXX_DiscardUnknown

func (m *BatchPrefixRequest) XXX_DiscardUnknown()

func (*BatchPrefixRequest) XXX_Marshal

func (m *BatchPrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BatchPrefixRequest) XXX_Merge

func (m *BatchPrefixRequest) XXX_Merge(src proto.Message)

func (*BatchPrefixRequest) XXX_Size

func (m *BatchPrefixRequest) XXX_Size() int

func (*BatchPrefixRequest) XXX_Unmarshal

func (m *BatchPrefixRequest) XXX_Unmarshal(b []byte) error

type BatchScanRequest

type BatchScanRequest struct {
	Start                [][]byte `protobuf:"bytes,1,rep,name=start,proto3" json:"start,omitempty"`
	ExclusiveEnd         [][]byte `protobuf:"bytes,2,rep,name=exclusive_end,json=exclusiveEnd,proto3" json:"exclusive_end,omitempty"`
	LimitPerScan         uint64   `protobuf:"varint,3,opt,name=limit_per_scan,json=limitPerScan,proto3" json:"limit_per_scan,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BatchScanRequest) Descriptor

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

func (*BatchScanRequest) GetExclusiveEnd

func (m *BatchScanRequest) GetExclusiveEnd() [][]byte

func (*BatchScanRequest) GetLimitPerScan

func (m *BatchScanRequest) GetLimitPerScan() uint64

func (*BatchScanRequest) GetStart

func (m *BatchScanRequest) GetStart() [][]byte

func (*BatchScanRequest) ProtoMessage

func (*BatchScanRequest) ProtoMessage()

func (*BatchScanRequest) Reset

func (m *BatchScanRequest) Reset()

func (*BatchScanRequest) String

func (m *BatchScanRequest) String() string

func (*BatchScanRequest) XXX_DiscardUnknown

func (m *BatchScanRequest) XXX_DiscardUnknown()

func (*BatchScanRequest) XXX_Marshal

func (m *BatchScanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BatchScanRequest) XXX_Merge

func (m *BatchScanRequest) XXX_Merge(src proto.Message)

func (*BatchScanRequest) XXX_Size

func (m *BatchScanRequest) XXX_Size() int

func (*BatchScanRequest) XXX_Unmarshal

func (m *BatchScanRequest) XXX_Unmarshal(b []byte) error

type EmptyResponse

type EmptyResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmptyResponse) Descriptor

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

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

func (*EmptyResponse) XXX_DiscardUnknown

func (m *EmptyResponse) XXX_DiscardUnknown()

func (*EmptyResponse) XXX_Marshal

func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmptyResponse) XXX_Merge

func (m *EmptyResponse) XXX_Merge(src proto.Message)

func (*EmptyResponse) XXX_Size

func (m *EmptyResponse) XXX_Size() int

func (*EmptyResponse) XXX_Unmarshal

func (m *EmptyResponse) XXX_Unmarshal(b []byte) error

type KeyValue

type KeyValue 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KeyValue) Descriptor

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

func (*KeyValue) GetKey

func (m *KeyValue) GetKey() []byte

func (*KeyValue) GetValue

func (m *KeyValue) GetValue() []byte

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset

func (m *KeyValue) Reset()

func (*KeyValue) String

func (m *KeyValue) String() string

func (*KeyValue) XXX_DiscardUnknown

func (m *KeyValue) XXX_DiscardUnknown()

func (*KeyValue) XXX_Marshal

func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyValue) XXX_Merge

func (m *KeyValue) XXX_Merge(src proto.Message)

func (*KeyValue) XXX_Size

func (m *KeyValue) XXX_Size() int

func (*KeyValue) XXX_Unmarshal

func (m *KeyValue) XXX_Unmarshal(b []byte) error

type KeyValues

type KeyValues struct {
	Kvs                  []*KeyValue `protobuf:"bytes,1,rep,name=kvs,proto3" json:"kvs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*KeyValues) Descriptor

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

func (*KeyValues) GetKvs

func (m *KeyValues) GetKvs() []*KeyValue

func (*KeyValues) ProtoMessage

func (*KeyValues) ProtoMessage()

func (*KeyValues) Reset

func (m *KeyValues) Reset()

func (*KeyValues) String

func (m *KeyValues) String() string

func (*KeyValues) XXX_DiscardUnknown

func (m *KeyValues) XXX_DiscardUnknown()

func (*KeyValues) XXX_Marshal

func (m *KeyValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyValues) XXX_Merge

func (m *KeyValues) XXX_Merge(src proto.Message)

func (*KeyValues) XXX_Size

func (m *KeyValues) XXX_Size() int

func (*KeyValues) XXX_Unmarshal

func (m *KeyValues) XXX_Unmarshal(b []byte) error

type Keys

type Keys struct {
	Keys                 [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Keys) Descriptor

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

func (*Keys) GetKeys

func (m *Keys) GetKeys() [][]byte

func (*Keys) ProtoMessage

func (*Keys) ProtoMessage()

func (*Keys) Reset

func (m *Keys) Reset()

func (*Keys) String

func (m *Keys) String() string

func (*Keys) XXX_DiscardUnknown

func (m *Keys) XXX_DiscardUnknown()

func (*Keys) XXX_Marshal

func (m *Keys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Keys) XXX_Merge

func (m *Keys) XXX_Merge(src proto.Message)

func (*Keys) XXX_Size

func (m *Keys) XXX_Size() int

func (*Keys) XXX_Unmarshal

func (m *Keys) XXX_Unmarshal(b []byte) error

type NetKVClient

type NetKVClient interface {
	BatchPut(ctx context.Context, in *KeyValues, opts ...grpc.CallOption) (*EmptyResponse, error)
	// TODO: we need to be able to get individual responses
	// regarding Not-Foundness of each key, otherwise, we'll have
	// a hard time knowing which key was not found, etc..
	// This will happen more with sparse trxdb.
	BatchGet(ctx context.Context, in *Keys, opts ...grpc.CallOption) (NetKV_BatchGetClient, error)
	Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (NetKV_ScanClient, error)
	BatchScan(ctx context.Context, in *BatchScanRequest, opts ...grpc.CallOption) (NetKV_BatchScanClient, error)
	BatchDelete(ctx context.Context, in *Keys, opts ...grpc.CallOption) (*EmptyResponse, error)
	Prefix(ctx context.Context, in *PrefixRequest, opts ...grpc.CallOption) (NetKV_PrefixClient, error)
	BatchPrefix(ctx context.Context, in *BatchPrefixRequest, opts ...grpc.CallOption) (NetKV_BatchPrefixClient, error)
}

NetKVClient is the client API for NetKV service.

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

func NewNetKVClient

func NewNetKVClient(cc *grpc.ClientConn) NetKVClient

type NetKVServer

type NetKVServer interface {
	BatchPut(context.Context, *KeyValues) (*EmptyResponse, error)
	// TODO: we need to be able to get individual responses
	// regarding Not-Foundness of each key, otherwise, we'll have
	// a hard time knowing which key was not found, etc..
	// This will happen more with sparse trxdb.
	BatchGet(*Keys, NetKV_BatchGetServer) error
	Scan(*ScanRequest, NetKV_ScanServer) error
	BatchScan(*BatchScanRequest, NetKV_BatchScanServer) error
	BatchDelete(context.Context, *Keys) (*EmptyResponse, error)
	Prefix(*PrefixRequest, NetKV_PrefixServer) error
	BatchPrefix(*BatchPrefixRequest, NetKV_BatchPrefixServer) error
}

NetKVServer is the server API for NetKV service.

type NetKV_BatchGetClient

type NetKV_BatchGetClient interface {
	Recv() (*KeyValue, error)
	grpc.ClientStream
}

type NetKV_BatchGetServer

type NetKV_BatchGetServer interface {
	Send(*KeyValue) error
	grpc.ServerStream
}

type NetKV_BatchPrefixClient

type NetKV_BatchPrefixClient interface {
	Recv() (*KeyValue, error)
	grpc.ClientStream
}

type NetKV_BatchPrefixServer

type NetKV_BatchPrefixServer interface {
	Send(*KeyValue) error
	grpc.ServerStream
}

type NetKV_BatchScanClient

type NetKV_BatchScanClient interface {
	Recv() (*KeyValue, error)
	grpc.ClientStream
}

type NetKV_BatchScanServer

type NetKV_BatchScanServer interface {
	Send(*KeyValue) error
	grpc.ServerStream
}

type NetKV_PrefixClient

type NetKV_PrefixClient interface {
	Recv() (*KeyValue, error)
	grpc.ClientStream
}

type NetKV_PrefixServer

type NetKV_PrefixServer interface {
	Send(*KeyValue) error
	grpc.ServerStream
}

type NetKV_ScanClient

type NetKV_ScanClient interface {
	Recv() (*KeyValue, error)
	grpc.ClientStream
}

type NetKV_ScanServer

type NetKV_ScanServer interface {
	Send(*KeyValue) error
	grpc.ServerStream
}

type PrefixRequest

type PrefixRequest struct {
	Prefix               []byte       `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Limit                uint64       `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Options              *ReadOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*PrefixRequest) Descriptor

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

func (*PrefixRequest) GetLimit

func (m *PrefixRequest) GetLimit() uint64

func (*PrefixRequest) GetOptions

func (m *PrefixRequest) GetOptions() *ReadOptions

func (*PrefixRequest) GetPrefix

func (m *PrefixRequest) GetPrefix() []byte

func (*PrefixRequest) ProtoMessage

func (*PrefixRequest) ProtoMessage()

func (*PrefixRequest) Reset

func (m *PrefixRequest) Reset()

func (*PrefixRequest) String

func (m *PrefixRequest) String() string

func (*PrefixRequest) XXX_DiscardUnknown

func (m *PrefixRequest) XXX_DiscardUnknown()

func (*PrefixRequest) XXX_Marshal

func (m *PrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrefixRequest) XXX_Merge

func (m *PrefixRequest) XXX_Merge(src proto.Message)

func (*PrefixRequest) XXX_Size

func (m *PrefixRequest) XXX_Size() int

func (*PrefixRequest) XXX_Unmarshal

func (m *PrefixRequest) XXX_Unmarshal(b []byte) error

type ReadOptions

type ReadOptions struct {
	KeyOnly              bool     `protobuf:"varint,1,opt,name=key_only,json=keyOnly,proto3" json:"key_only,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadOptions) Descriptor

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

func (*ReadOptions) GetKeyOnly

func (m *ReadOptions) GetKeyOnly() bool

func (*ReadOptions) ProtoMessage

func (*ReadOptions) ProtoMessage()

func (*ReadOptions) Reset

func (m *ReadOptions) Reset()

func (*ReadOptions) String

func (m *ReadOptions) String() string

func (*ReadOptions) XXX_DiscardUnknown

func (m *ReadOptions) XXX_DiscardUnknown()

func (*ReadOptions) XXX_Marshal

func (m *ReadOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadOptions) XXX_Merge

func (m *ReadOptions) XXX_Merge(src proto.Message)

func (*ReadOptions) XXX_Size

func (m *ReadOptions) XXX_Size() int

func (*ReadOptions) XXX_Unmarshal

func (m *ReadOptions) XXX_Unmarshal(b []byte) error

type ScanRequest

type ScanRequest struct {
	Start                []byte       `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	ExclusiveEnd         []byte       `protobuf:"bytes,2,opt,name=exclusive_end,json=exclusiveEnd,proto3" json:"exclusive_end,omitempty"`
	Limit                uint64       `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Options              *ReadOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*ScanRequest) Descriptor

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

func (*ScanRequest) GetExclusiveEnd

func (m *ScanRequest) GetExclusiveEnd() []byte

func (*ScanRequest) GetLimit

func (m *ScanRequest) GetLimit() uint64

func (*ScanRequest) GetOptions

func (m *ScanRequest) GetOptions() *ReadOptions

func (*ScanRequest) GetStart

func (m *ScanRequest) GetStart() []byte

func (*ScanRequest) ProtoMessage

func (*ScanRequest) ProtoMessage()

func (*ScanRequest) Reset

func (m *ScanRequest) Reset()

func (*ScanRequest) String

func (m *ScanRequest) String() string

func (*ScanRequest) XXX_DiscardUnknown

func (m *ScanRequest) XXX_DiscardUnknown()

func (*ScanRequest) XXX_Marshal

func (m *ScanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ScanRequest) XXX_Merge

func (m *ScanRequest) XXX_Merge(src proto.Message)

func (*ScanRequest) XXX_Size

func (m *ScanRequest) XXX_Size() int

func (*ScanRequest) XXX_Unmarshal

func (m *ScanRequest) XXX_Unmarshal(b []byte) error

type UnimplementedNetKVServer

type UnimplementedNetKVServer struct {
}

UnimplementedNetKVServer can be embedded to have forward compatible implementations.

func (*UnimplementedNetKVServer) BatchDelete

func (*UnimplementedNetKVServer) BatchDelete(ctx context.Context, req *Keys) (*EmptyResponse, error)

func (*UnimplementedNetKVServer) BatchGet

func (*UnimplementedNetKVServer) BatchPrefix

func (*UnimplementedNetKVServer) BatchPut

func (*UnimplementedNetKVServer) BatchScan

func (*UnimplementedNetKVServer) Prefix

func (*UnimplementedNetKVServer) Scan

type Values

type Values struct {
	Values               [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Values) Descriptor

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

func (*Values) GetValues

func (m *Values) GetValues() [][]byte

func (*Values) ProtoMessage

func (*Values) ProtoMessage()

func (*Values) Reset

func (m *Values) Reset()

func (*Values) String

func (m *Values) String() string

func (*Values) XXX_DiscardUnknown

func (m *Values) XXX_DiscardUnknown()

func (*Values) XXX_Marshal

func (m *Values) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Values) XXX_Merge

func (m *Values) XXX_Merge(src proto.Message)

func (*Values) XXX_Size

func (m *Values) XXX_Size() int

func (*Values) XXX_Unmarshal

func (m *Values) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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