Documentation ¶
Index ¶
- type DBApi
- type DBClient
- func (this *DBClient) Del(key string) error
- func (this *DBClient) Get(key string) (string, error)
- func (this *DBClient) GetWithChild(key string) ([]KeyValue, error)
- func (this *DBClient) KeepLease(leaseID int64) error
- func (this *DBClient) NewLeaseID(ttl int64) (int64, error)
- func (this *DBClient) Put(key string, value string) error
- func (this *DBClient) PutWithLease(key string, value string, leaseID int64) error
- func (this *DBClient) PutWithTTL(key string, value string, ttl int) error
- func (this *DBClient) Watch(key string) <-chan WatchEvent
- type EVENT_TYPE
- type KeyValue
- type WatchEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBApi ¶
type DBApi interface { NewLeaseID(ttl int64) (int64, error) KeepLease(leaseID int64) error PutWithLease(key string, value string, leaseID int64) error Put(key string, value string) error PutWithTTL(key string, value string, ttl int) error Get(key string) (string, error) GetWithChild(key string) ([]KeyValue, error) Del(key string) error Watch(key string) <-chan WatchEvent }
var DB DBApi
type DBClient ¶
type DBClient struct {
// contains filtered or unexported fields
}
func (*DBClient) PutWithLease ¶
func (*DBClient) PutWithTTL ¶
func (*DBClient) Watch ¶
func (this *DBClient) Watch(key string) <-chan WatchEvent
type EVENT_TYPE ¶
type EVENT_TYPE int
const ( EVENT_ADD EVENT_TYPE EVENT_UPDATE EVENT_DELETE EVENT_EXPIRE )
type WatchEvent ¶
type WatchEvent struct { Event EVENT_TYPE KeyValue }
Click to show internal directories.
Click to hide internal directories.