Documentation ¶
Index ¶
- Variables
- func RegisterKVServer(s grpc.ServiceRegistrar, srv KVServer)
- type Cursor
- func (*Cursor) Descriptor() ([]byte, []int)deprecated
- func (x *Cursor) GetBucketName() []byte
- func (x *Cursor) GetCursor() uint32
- func (x *Cursor) GetK() []byte
- func (x *Cursor) GetOp() Op
- func (x *Cursor) GetV() []byte
- func (*Cursor) ProtoMessage()
- func (x *Cursor) ProtoReflect() protoreflect.Message
- func (x *Cursor) Reset()
- func (x *Cursor) String() string
- type KVClient
- type KVServer
- type KV_TxClient
- type KV_TxServer
- type Op
- type Pair
- func (*Pair) Descriptor() ([]byte, []int)deprecated
- func (x *Pair) GetCursorId() uint32
- func (x *Pair) GetK() []byte
- func (x *Pair) GetTxId() uint64
- func (x *Pair) GetV() []byte
- func (x *Pair) GetViewId() uint64
- func (*Pair) ProtoMessage()
- func (x *Pair) ProtoReflect() protoreflect.Message
- func (x *Pair) Reset()
- func (x *Pair) String() string
- type UnimplementedKVServer
- type UnsafeKVServer
- type VersionReply
- func (*VersionReply) Descriptor() ([]byte, []int)deprecated
- func (x *VersionReply) GetMajor() uint32
- func (x *VersionReply) GetMinor() uint32
- func (x *VersionReply) GetPatch() uint32
- func (*VersionReply) ProtoMessage()
- func (x *VersionReply) ProtoReflect() protoreflect.Message
- func (x *VersionReply) Reset()
- func (x *VersionReply) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Op_name = map[int32]string{ 0: "FIRST", 1: "SEEK", 4: "CURRENT", 8: "NEXT", 15: "SEEK_EXACT", 30: "OPEN", 31: "CLOSE", 64: "GET", } Op_value = map[string]int32{ "FIRST": 0, "SEEK": 1, "CURRENT": 4, "NEXT": 8, "SEEK_EXACT": 15, "OPEN": 30, "CLOSE": 31, "GET": 64, } )
Enum value maps for Op.
var File_kv_proto protoreflect.FileDescriptor
var KV_ServiceDesc = grpc.ServiceDesc{ ServiceName: "database.KV", HandlerType: (*KVServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _KV_Version_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Tx", Handler: _KV_Tx_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "kv.proto", }
KV_ServiceDesc is the grpc.ServiceDesc for KV service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKVServer ¶
func RegisterKVServer(s grpc.ServiceRegistrar, srv KVServer)
Types ¶
type Cursor ¶
type Cursor struct { Op Op `protobuf:"varint,1,opt,name=op,proto3,enum=database.Op" json:"op,omitempty"` BucketName []byte `protobuf:"bytes,2,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"` Cursor uint32 `protobuf:"varint,3,opt,name=cursor,proto3" json:"cursor,omitempty"` K []byte `protobuf:"bytes,4,opt,name=k,proto3" json:"k,omitempty"` V []byte `protobuf:"bytes,5,opt,name=v,proto3" json:"v,omitempty"` // not used // contains filtered or unexported fields }
func (*Cursor) Descriptor
deprecated
func (*Cursor) GetBucketName ¶
func (*Cursor) ProtoMessage ¶
func (*Cursor) ProtoMessage()
func (*Cursor) ProtoReflect ¶
func (x *Cursor) ProtoReflect() protoreflect.Message
type KVClient ¶
type KVClient interface { Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionReply, error) Tx(ctx context.Context, opts ...grpc.CallOption) (KV_TxClient, error) }
KVClient is the client API for KV 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 NewKVClient ¶
func NewKVClient(cc grpc.ClientConnInterface) KVClient
type KVServer ¶
type KVServer interface { Version(context.Context, *emptypb.Empty) (*VersionReply, error) Tx(KV_TxServer) error // contains filtered or unexported methods }
KVServer is the server API for KV service. All implementations must embed UnimplementedKVServer for forward compatibility
type KV_TxClient ¶
type KV_TxServer ¶
type Op ¶
type Op int32
values from https://github.com/ledgerwatch/interfaces/blob/master/remote/kv.proto#L68
func (Op) Descriptor ¶
func (Op) Descriptor() protoreflect.EnumDescriptor
func (Op) EnumDescriptor
deprecated
func (Op) Number ¶
func (x Op) Number() protoreflect.EnumNumber
func (Op) Type ¶
func (Op) Type() protoreflect.EnumType
type Pair ¶
type Pair struct { K []byte `protobuf:"bytes,1,opt,name=k,proto3" json:"k,omitempty"` V []byte `protobuf:"bytes,2,opt,name=v,proto3" json:"v,omitempty"` CursorId uint32 `protobuf:"varint,3,opt,name=cursor_id,json=cursorId,proto3" json:"cursor_id,omitempty"` ViewId uint64 `protobuf:"varint,4,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"` // not used TxId uint64 `protobuf:"varint,5,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // not used // contains filtered or unexported fields }
func (*Pair) Descriptor
deprecated
func (*Pair) GetCursorId ¶
func (*Pair) ProtoMessage ¶
func (*Pair) ProtoMessage()
func (*Pair) ProtoReflect ¶
func (x *Pair) ProtoReflect() protoreflect.Message
type UnimplementedKVServer ¶
type UnimplementedKVServer struct { }
UnimplementedKVServer must be embedded to have forward compatible implementations.
func (UnimplementedKVServer) Tx ¶
func (UnimplementedKVServer) Tx(KV_TxServer) error
func (UnimplementedKVServer) Version ¶
func (UnimplementedKVServer) Version(context.Context, *emptypb.Empty) (*VersionReply, error)
type UnsafeKVServer ¶
type UnsafeKVServer interface {
// contains filtered or unexported methods
}
UnsafeKVServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KVServer will result in compilation errors.
type VersionReply ¶
type VersionReply struct { Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` // contains filtered or unexported fields }
func (*VersionReply) Descriptor
deprecated
func (*VersionReply) Descriptor() ([]byte, []int)
Deprecated: Use VersionReply.ProtoReflect.Descriptor instead.
func (*VersionReply) GetMajor ¶
func (x *VersionReply) GetMajor() uint32
func (*VersionReply) GetMinor ¶
func (x *VersionReply) GetMinor() uint32
func (*VersionReply) GetPatch ¶
func (x *VersionReply) GetPatch() uint32
func (*VersionReply) ProtoMessage ¶
func (*VersionReply) ProtoMessage()
func (*VersionReply) ProtoReflect ¶
func (x *VersionReply) ProtoReflect() protoreflect.Message
func (*VersionReply) Reset ¶
func (x *VersionReply) Reset()
func (*VersionReply) String ¶
func (x *VersionReply) String() string