Documentation ¶
Overview ¶
Package protodb is a generated protocol buffer package.
It is generated from these files:
defs.proto
It has these top-level messages:
Batch Operation Entity Nothing Domain Iterator Stats Init
Index ¶
- Variables
- func RegisterDBServer(s *grpc.Server, srv DBServer)
- type Batch
- type DBClient
- type DBServer
- type DB_GetStreamClient
- type DB_GetStreamServer
- type DB_IteratorClient
- type DB_IteratorServer
- type DB_ReverseIteratorClient
- type DB_ReverseIteratorServer
- type Domain
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)
- func (m *Entity) GetCreatedAt() int64
- func (m *Entity) GetEnd() []byte
- func (m *Entity) GetErr() string
- func (m *Entity) GetExists() bool
- func (m *Entity) GetId() int32
- func (m *Entity) GetKey() []byte
- func (m *Entity) GetStart() []byte
- func (m *Entity) GetValue() []byte
- func (*Entity) ProtoMessage()
- func (m *Entity) Reset()
- func (m *Entity) String() string
- type Init
- type Iterator
- type Nothing
- type Operation
- type Operation_Type
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var Operation_Type_name = map[int32]string{
0: "SET",
1: "DELETE",
}
View Source
var Operation_Type_value = map[string]int32{
"SET": 0,
"DELETE": 1,
}
Functions ¶
func RegisterDBServer ¶
Types ¶
type Batch ¶
type Batch struct {
Ops []*Operation `protobuf:"bytes,1,rep,name=ops" json:"ops,omitempty"`
}
func (*Batch) Descriptor ¶
func (*Batch) ProtoMessage ¶
func (*Batch) ProtoMessage()
type DBClient ¶
type DBClient interface { Init(ctx context.Context, in *Init, opts ...grpc.CallOption) (*Entity, error) Get(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) GetStream(ctx context.Context, opts ...grpc.CallOption) (DB_GetStreamClient, error) Has(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) Set(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) SetSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) Delete(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) DeleteSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) Iterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_IteratorClient, error) ReverseIterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_ReverseIteratorClient, error) // rpc print(Nothing) returns (Entity) {} Stats(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*Stats, error) BatchWrite(ctx context.Context, in *Batch, opts ...grpc.CallOption) (*Nothing, error) BatchWriteSync(ctx context.Context, in *Batch, opts ...grpc.CallOption) (*Nothing, error) }
func NewDBClient ¶
func NewDBClient(cc *grpc.ClientConn) DBClient
type DBServer ¶
type DBServer interface { Init(context.Context, *Init) (*Entity, error) Get(context.Context, *Entity) (*Entity, error) GetStream(DB_GetStreamServer) error Has(context.Context, *Entity) (*Entity, error) Set(context.Context, *Entity) (*Nothing, error) SetSync(context.Context, *Entity) (*Nothing, error) Delete(context.Context, *Entity) (*Nothing, error) DeleteSync(context.Context, *Entity) (*Nothing, error) Iterator(*Entity, DB_IteratorServer) error ReverseIterator(*Entity, DB_ReverseIteratorServer) error // rpc print(Nothing) returns (Entity) {} Stats(context.Context, *Nothing) (*Stats, error) BatchWrite(context.Context, *Batch) (*Nothing, error) BatchWriteSync(context.Context, *Batch) (*Nothing, error) }
type DB_GetStreamClient ¶
type DB_GetStreamServer ¶
type DB_IteratorClient ¶
type DB_IteratorClient interface { Recv() (*Iterator, error) grpc.ClientStream }
type DB_IteratorServer ¶
type DB_IteratorServer interface { Send(*Iterator) error grpc.ServerStream }
type DB_ReverseIteratorClient ¶
type DB_ReverseIteratorClient interface { Recv() (*Iterator, error) grpc.ClientStream }
type DB_ReverseIteratorServer ¶
type DB_ReverseIteratorServer interface { Send(*Iterator) error grpc.ServerStream }
type Domain ¶
type Domain struct { Start []byte `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` }
func (*Domain) Descriptor ¶
func (*Domain) ProtoMessage ¶
func (*Domain) ProtoMessage()
type Entity ¶
type Entity struct { Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` Exists bool `protobuf:"varint,4,opt,name=exists" json:"exists,omitempty"` Start []byte `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"` End []byte `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"` Err string `protobuf:"bytes,7,opt,name=err" json:"err,omitempty"` CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` }
func (*Entity) Descriptor ¶
func (*Entity) GetCreatedAt ¶
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
type Init ¶
type Init struct { Type string `protobuf:"bytes,1,opt,name=Type" json:"Type,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"` Dir string `protobuf:"bytes,3,opt,name=Dir" json:"Dir,omitempty"` }
func (*Init) Descriptor ¶
func (*Init) ProtoMessage ¶
func (*Init) ProtoMessage()
type Iterator ¶
type Iterator struct { Domain *Domain `protobuf:"bytes,1,opt,name=domain" json:"domain,omitempty"` Valid bool `protobuf:"varint,2,opt,name=valid" json:"valid,omitempty"` Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` }
func (*Iterator) Descriptor ¶
func (*Iterator) ProtoMessage ¶
func (*Iterator) ProtoMessage()
type Nothing ¶
type Nothing struct { }
func (*Nothing) Descriptor ¶
func (*Nothing) ProtoMessage ¶
func (*Nothing) ProtoMessage()
type Operation ¶
type Operation struct { Entity *Entity `protobuf:"bytes,1,opt,name=entity" json:"entity,omitempty"` Type Operation_Type `protobuf:"varint,2,opt,name=type,enum=protodb.Operation_Type" json:"type,omitempty"` }
func (*Operation) Descriptor ¶
func (*Operation) GetType ¶
func (m *Operation) GetType() Operation_Type
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
type Operation_Type ¶
type Operation_Type int32
const ( Operation_SET Operation_Type = 0 Operation_DELETE Operation_Type = 1 )
func (Operation_Type) EnumDescriptor ¶
func (Operation_Type) EnumDescriptor() ([]byte, []int)
func (Operation_Type) String ¶
func (x Operation_Type) String() string
type Stats ¶
type Stats struct { Data map[string]string `` /* 128-byte string literal not displayed */ TimeAt int64 `protobuf:"varint,2,opt,name=time_at,json=timeAt" json:"time_at,omitempty"` }
func (*Stats) Descriptor ¶
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.