Documentation ¶
Index ¶
- Variables
- func TimestampGet() string
- func UUID() string
- type AbsPath
- func (this *AbsPath) Coder(kv *KeyValue) *KeyValue
- func (this *AbsPath) CoderKey(key string) string
- func (this *AbsPath) Decoder(kv *KeyValue) *KeyValue
- func (this *AbsPath) DecoderKey(key string) string
- func (this *AbsPath) ListCoder(kv []KeyValue) []KeyValue
- func (this *AbsPath) ListDecoder(kv []KeyValue) []KeyValue
- type BaseAPI
- type Client
- func (this *Client) Del(key string) error
- func (this *Client) Get(key string) (*KeyValue, error)
- func (this *Client) GetWithChild(key string) ([]KeyValue, error)
- func (this *Client) KeepLeaseID(leaseID int64) error
- func (this *Client) Lock(ctx context.Context, key string) error
- func (this *Client) NewLeaseID(ttl int) (int64, error)
- func (this *Client) Put(kv KeyValue) (*KeyValue, error)
- func (this *Client) PutWithLease(kv KeyValue, leaseID int64) (*KeyValue, error)
- func (this *Client) PutWithTTL(kv KeyValue, ttl int) (*KeyValue, error)
- func (this *Client) Ulock(ctx context.Context, key string) error
- func (this *Client) Watch(key string) <-chan WatchEvent
- type DBAPI
- type DBClient
- type EVENT_TYPE
- type KeyValue
- type TableAPI
- type WatchEvent
- type WatchItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ERR_NOT_NEWEST = fmt.Errorf("version is not newest")
View Source
var ERR_PARAM_INVALID = fmt.Errorf("input param is invalid")
Functions ¶
func TimestampGet ¶
func TimestampGet() string
Types ¶
type AbsPath ¶
type AbsPath struct {
// contains filtered or unexported fields
}
func NewAbsPath ¶
func (*AbsPath) DecoderKey ¶
func (*AbsPath) ListDecoder ¶
type BaseAPI ¶
type BaseAPI interface { NewLeaseID(ttl int) (int64, error) KeepLeaseID(leaseID int64) error PutWithLease(kv KeyValue, leaseID int64) (*KeyValue, error) PutWithTTL(kv KeyValue, ttl int) (*KeyValue, error) Put(kv KeyValue) (*KeyValue, error) Get(key string) (*KeyValue, error) GetWithChild(key string) ([]KeyValue, error) Del(key string) error Watch(key string) <-chan WatchEvent Lock(ctx context.Context, key string) error Ulock(ctx context.Context, key string) error }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) KeepLeaseID ¶
func (*Client) PutWithLease ¶
func (*Client) Watch ¶
func (this *Client) 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 }
type WatchItem ¶
type WatchItem struct { Event EVENT_TYPE KeyValue }
Click to show internal directories.
Click to hide internal directories.