Documentation
¶
Index ¶
- Variables
- func RegisterDBServer(s *grpc.Server, srv DBServer)
- type Batch
- func (*Batch) Descriptor() ([]byte, []int)
- func (this *Batch) Equal(that interface{}) bool
- func (m *Batch) GetOps() []*Operation
- func (*Batch) ProtoMessage()
- func (m *Batch) Reset()
- func (m *Batch) String() string
- func (m *Batch) XXX_DiscardUnknown()
- func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Batch) XXX_Merge(src proto.Message)
- func (m *Batch) XXX_Size() int
- func (m *Batch) XXX_Unmarshal(b []byte) error
- type DBClient
- type DBServer
- type DB_GetStreamClient
- type DB_GetStreamServer
- type DB_IteratorClient
- type DB_IteratorServer
- type DB_ReverseIteratorClient
- type DB_ReverseIteratorServer
- type Domain
- func (*Domain) Descriptor() ([]byte, []int)
- func (this *Domain) Equal(that interface{}) bool
- func (m *Domain) GetEnd() []byte
- func (m *Domain) GetStart() []byte
- func (*Domain) ProtoMessage()
- func (m *Domain) Reset()
- func (m *Domain) String() string
- func (m *Domain) XXX_DiscardUnknown()
- func (m *Domain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Domain) XXX_Merge(src proto.Message)
- func (m *Domain) XXX_Size() int
- func (m *Domain) XXX_Unmarshal(b []byte) error
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)
- func (this *Entity) Equal(that interface{}) bool
- 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
- func (m *Entity) XXX_DiscardUnknown()
- func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Entity) XXX_Merge(src proto.Message)
- func (m *Entity) XXX_Size() int
- func (m *Entity) XXX_Unmarshal(b []byte) error
- type Init
- func (*Init) Descriptor() ([]byte, []int)
- func (this *Init) Equal(that interface{}) bool
- func (m *Init) GetDir() string
- func (m *Init) GetName() string
- func (m *Init) GetType() string
- func (*Init) ProtoMessage()
- func (m *Init) Reset()
- func (m *Init) String() string
- func (m *Init) XXX_DiscardUnknown()
- func (m *Init) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Init) XXX_Merge(src proto.Message)
- func (m *Init) XXX_Size() int
- func (m *Init) XXX_Unmarshal(b []byte) error
- type Iterator
- func (*Iterator) Descriptor() ([]byte, []int)
- func (this *Iterator) Equal(that interface{}) bool
- func (m *Iterator) GetDomain() *Domain
- func (m *Iterator) GetKey() []byte
- func (m *Iterator) GetValid() bool
- func (m *Iterator) GetValue() []byte
- func (*Iterator) ProtoMessage()
- func (m *Iterator) Reset()
- func (m *Iterator) String() string
- func (m *Iterator) XXX_DiscardUnknown()
- func (m *Iterator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Iterator) XXX_Merge(src proto.Message)
- func (m *Iterator) XXX_Size() int
- func (m *Iterator) XXX_Unmarshal(b []byte) error
- type Nothing
- func (*Nothing) Descriptor() ([]byte, []int)
- func (this *Nothing) Equal(that interface{}) bool
- func (*Nothing) ProtoMessage()
- func (m *Nothing) Reset()
- func (m *Nothing) String() string
- func (m *Nothing) XXX_DiscardUnknown()
- func (m *Nothing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Nothing) XXX_Merge(src proto.Message)
- func (m *Nothing) XXX_Size() int
- func (m *Nothing) XXX_Unmarshal(b []byte) error
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)
- func (this *Operation) Equal(that interface{}) bool
- func (m *Operation) GetEntity() *Entity
- func (m *Operation) GetType() Operation_Type
- func (*Operation) ProtoMessage()
- func (m *Operation) Reset()
- func (m *Operation) String() string
- func (m *Operation) XXX_DiscardUnknown()
- func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Operation) XXX_Merge(src proto.Message)
- func (m *Operation) XXX_Size() int
- func (m *Operation) XXX_Unmarshal(b []byte) error
- type Operation_Type
- type Stats
- func (*Stats) Descriptor() ([]byte, []int)
- func (this *Stats) Equal(that interface{}) bool
- func (m *Stats) GetData() map[string]string
- func (m *Stats) GetTimeAt() int64
- func (*Stats) ProtoMessage()
- func (m *Stats) Reset()
- func (m *Stats) String() string
- func (m *Stats) XXX_DiscardUnknown()
- func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stats) XXX_Merge(src proto.Message)
- func (m *Stats) XXX_Size() int
- func (m *Stats) XXX_Unmarshal(b []byte) error
- type UnimplementedDBServer
- func (*UnimplementedDBServer) BatchWrite(ctx context.Context, req *Batch) (*Nothing, error)
- func (*UnimplementedDBServer) BatchWriteSync(ctx context.Context, req *Batch) (*Nothing, error)
- func (*UnimplementedDBServer) Delete(ctx context.Context, req *Entity) (*Nothing, error)
- func (*UnimplementedDBServer) DeleteSync(ctx context.Context, req *Entity) (*Nothing, error)
- func (*UnimplementedDBServer) Get(ctx context.Context, req *Entity) (*Entity, error)
- func (*UnimplementedDBServer) GetStream(srv DB_GetStreamServer) error
- func (*UnimplementedDBServer) Has(ctx context.Context, req *Entity) (*Entity, error)
- func (*UnimplementedDBServer) Init(ctx context.Context, req *Init) (*Entity, error)
- func (*UnimplementedDBServer) Iterator(req *Entity, srv DB_IteratorServer) error
- func (*UnimplementedDBServer) ReverseIterator(req *Entity, srv DB_ReverseIteratorServer) error
- func (*UnimplementedDBServer) Set(ctx context.Context, req *Entity) (*Nothing, error)
- func (*UnimplementedDBServer) SetSync(ctx context.Context, req *Entity) (*Nothing, error)
- func (*UnimplementedDBServer) Stats(ctx context.Context, req *Nothing) (*Stats, error)
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,proto3" json:"ops,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedBatch ¶
func (*Batch) Descriptor ¶
func (*Batch) ProtoMessage ¶
func (*Batch) ProtoMessage()
func (*Batch) XXX_DiscardUnknown ¶
func (m *Batch) XXX_DiscardUnknown()
func (*Batch) XXX_Marshal ¶
func (*Batch) XXX_Unmarshal ¶
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)
}
DBClient is the client API for DB service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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)
}
DBServer is the server API for DB service.
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedDomain ¶
func (*Domain) Descriptor ¶
func (*Domain) ProtoMessage ¶
func (*Domain) ProtoMessage()
func (*Domain) XXX_DiscardUnknown ¶
func (m *Domain) XXX_DiscardUnknown()
func (*Domain) XXX_Marshal ¶
func (*Domain) XXX_Unmarshal ¶
type Entity ¶
type Entity struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" 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,proto3" 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,proto3" json:"err,omitempty"`
CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedEntity ¶
func (*Entity) Descriptor ¶
func (*Entity) GetCreatedAt ¶
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
func (*Entity) XXX_DiscardUnknown ¶
func (m *Entity) XXX_DiscardUnknown()
func (*Entity) XXX_Marshal ¶
func (*Entity) XXX_Unmarshal ¶
type Init ¶
type Init struct {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Dir string `protobuf:"bytes,3,opt,name=Dir,proto3" json:"Dir,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedInit ¶
func (*Init) Descriptor ¶
func (*Init) ProtoMessage ¶
func (*Init) ProtoMessage()
func (*Init) XXX_DiscardUnknown ¶
func (m *Init) XXX_DiscardUnknown()
func (*Init) XXX_Unmarshal ¶
type Iterator ¶
type Iterator struct {
Domain *Domain `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
Valid bool `protobuf:"varint,2,opt,name=valid,proto3" 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedIterator ¶
func (*Iterator) Descriptor ¶
func (*Iterator) ProtoMessage ¶
func (*Iterator) ProtoMessage()
func (*Iterator) XXX_DiscardUnknown ¶
func (m *Iterator) XXX_DiscardUnknown()
func (*Iterator) XXX_Marshal ¶
func (*Iterator) XXX_Unmarshal ¶
type Nothing ¶
type Nothing struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedNothing ¶
func (*Nothing) Descriptor ¶
func (*Nothing) ProtoMessage ¶
func (*Nothing) ProtoMessage()
func (*Nothing) XXX_DiscardUnknown ¶
func (m *Nothing) XXX_DiscardUnknown()
func (*Nothing) XXX_Marshal ¶
func (*Nothing) XXX_Unmarshal ¶
type Operation ¶
type Operation struct {
Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
Type Operation_Type `protobuf:"varint,2,opt,name=type,proto3,enum=protodb.Operation_Type" json:"type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedOperation ¶
func (*Operation) Descriptor ¶
func (*Operation) GetType ¶
func (m *Operation) GetType() Operation_Type
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) XXX_DiscardUnknown ¶
func (m *Operation) XXX_DiscardUnknown()
func (*Operation) XXX_Marshal ¶
func (*Operation) XXX_Unmarshal ¶
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 `` /* 149-byte string literal not displayed */
TimeAt int64 `protobuf:"varint,2,opt,name=time_at,json=timeAt,proto3" json:"time_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func NewPopulatedStats ¶
func (*Stats) Descriptor ¶
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
func (*Stats) XXX_DiscardUnknown ¶
func (m *Stats) XXX_DiscardUnknown()
func (*Stats) XXX_Marshal ¶
func (*Stats) XXX_Unmarshal ¶
type UnimplementedDBServer ¶
type UnimplementedDBServer struct {
}
UnimplementedDBServer can be embedded to have forward compatible implementations.
func (*UnimplementedDBServer) BatchWrite ¶
func (*UnimplementedDBServer) BatchWriteSync ¶
func (*UnimplementedDBServer) DeleteSync ¶
func (*UnimplementedDBServer) GetStream ¶
func (*UnimplementedDBServer) GetStream(srv DB_GetStreamServer) error
func (*UnimplementedDBServer) Iterator ¶
func (*UnimplementedDBServer) Iterator(req *Entity, srv DB_IteratorServer) error
func (*UnimplementedDBServer) ReverseIterator ¶
func (*UnimplementedDBServer) ReverseIterator(req *Entity, srv DB_ReverseIteratorServer) error
Click to show internal directories.
Click to hide internal directories.