Documentation ¶
Index ¶
- Variables
- func Close()
- func Compact(rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
- func Delete(key string) (int64, error)
- func DeleteWithPrefix(prefix string) (int64, error)
- func Get(key string) (string, error)
- func GetWithPrefix(prefix string) (map[string]string, error)
- func GrantLease(timeout int64) (clientv3.LeaseID, error)
- func Init(endpoint string) error
- func KeepAliveLease(leaseID clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
- func Put(key string, value string) error
- func PutWithLease(key string, value string, leaseID clientv3.LeaseID) error
- func Watch(key string) clientv3.WatchChan
- func WatchLoop(rch clientv3.WatchChan, cb WatchCallback)
- func WatchWithPrefix(prefix string) clientv3.WatchChan
- type ErrNotFoundKey
- type WatchCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Endpoint string = "ip:12379"
)
Functions ¶
func Compact ¶
func Compact(rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func DeleteWithPrefix ¶
func GrantLease ¶
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// minimum lease TTL is 5-second
func KeepAliveLease ¶
func KeepAliveLease(leaseID clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
func WatchLoop ¶
func WatchLoop(rch clientv3.WatchChan, cb WatchCallback)
func WatchWithPrefix ¶
Types ¶
type ErrNotFoundKey ¶
type ErrNotFoundKey struct {
Key string
}
func (ErrNotFoundKey) Error ¶
func (e ErrNotFoundKey) Error() string
type WatchCallback ¶
Click to show internal directories.
Click to hide internal directories.