Documentation ¶
Index ¶
- func AcquireLock(c *Client, key string, ttl uint64) error
- func Create(c *Client, key, value string, ttl uint64)
- func Get(c *Client, key string) string
- func GetHTTPEtcdUrls(host, etcdPeers string) []string
- func GetList(c *Client, key string) []string
- func Mkdir(c *Client, path string)
- func PublishService(client *Client, etcdPath string, host string, externalPort int, ttl uint64, ...)
- func ReleaseLock(c *Client)
- func Set(c *Client, key, value string, ttl uint64)
- func SetDefault(client *Client, key, value string)
- func WaitForKeys(c *Client, keys []string, ttl time.Duration) error
- type Client
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireLock ¶
AcquireLock creates a pseudo lock in etcd with a specific ttl
func GetHTTPEtcdUrls ¶
GetHTTPEtcdUrls returns an array of urls that contains at least one host
func PublishService ¶
func PublishService( client *Client, etcdPath string, host string, externalPort int, ttl uint64, timeout time.Duration)
PublishService publish a service to etcd periodically
func Set ¶
Set sets the value of a key. If the ttl is bigger than 0 it will expire after the specified time
func SetDefault ¶
SetDefault sets the value of a key without expiration
Types ¶
Click to show internal directories.
Click to hide internal directories.