Documentation ¶
Index ¶
- Constants
- type Etcd
- func (etcd *Etcd) CheckKey(client string, prefix PrefixEnum, keyPath string) (bool, error)
- func (etcd *Etcd) Delete(client string, prefix PrefixEnum, keyPath string) error
- func (etcd *Etcd) DeleteByKey(key string) error
- func (etcd *Etcd) EscapeUnauthenticated(errGet error) error
- func (etcd *Etcd) Get(client string, prefix PrefixEnum, keyPath string) (string, error)
- func (etcd *Etcd) GetBytes(client string, prefix PrefixEnum, keyPath string) ([]byte, error)
- func (etcd *Etcd) GetClient() *clientv3.Client
- func (etcd *Etcd) GetKey(client string, prefix PrefixEnum, key string) string
- func (etcd *Etcd) GetList(client string, prefix PrefixEnum, keyPath string) ([]*EtcdItem, error)
- func (etcd *Etcd) LeaseGrant(ttl int64) (*clientv3.LeaseGrantResponse, error)
- func (etcd *Etcd) LeaseKeepLive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
- func (etcd *Etcd) LeaseKeepLiveOnce(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error)
- func (etcd *Etcd) LeaseRevoke(id clientv3.LeaseID) error
- func (etcd *Etcd) Put(client string, prefix PrefixEnum, keyPath, value string) error
- func (etcd *Etcd) PutWithTTL(client string, prefix PrefixEnum, keyPath, value string, ttl int64) error
- func (etcd *Etcd) PutWithTTLId(client string, prefix PrefixEnum, keyPath, value string, ...) error
- func (etcd *Etcd) WatchKey(client string, prefix PrefixEnum, key string) clientv3.WatchChan
- func (etcd *Etcd) WatchPath(client string, prefix PrefixEnum, keyPath string) clientv3.WatchChan
- type EtcdConf
- type EtcdItem
- type PrefixEnum
Constants ¶
View Source
const TIMEOUT = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Etcd ¶
type Etcd struct {
// contains filtered or unexported fields
}
func GetDefaultEtcdService ¶
func GetDefaultEtcdService() *Etcd
func (*Etcd) Delete ¶
func (etcd *Etcd) Delete(client string, prefix PrefixEnum, keyPath string) error
func (*Etcd) DeleteByKey ¶
func (*Etcd) EscapeUnauthenticated ¶
func (*Etcd) LeaseGrant ¶
func (etcd *Etcd) LeaseGrant(ttl int64) (*clientv3.LeaseGrantResponse, error)
func (*Etcd) LeaseKeepLive ¶
func (*Etcd) LeaseKeepLiveOnce ¶
func (*Etcd) Put ¶
func (etcd *Etcd) Put(client string, prefix PrefixEnum, keyPath, value string) error
func (*Etcd) PutWithTTL ¶
func (*Etcd) PutWithTTLId ¶
type PrefixEnum ¶
type PrefixEnum string
const ( PrefixEnumConfig PrefixEnum = "config" PrefixEnumWorker PrefixEnum = "worker" PrefixEnumMaster PrefixEnum = "master" PrefixEnumJob PrefixEnum = "job" PrefixEnumFlow PrefixEnum = "flow" )
Click to show internal directories.
Click to hide internal directories.