Exemplo n.º 1
0
func checkUpdateRequired() bool {

	// find etcd server list from args
	etcdServers := findEtcdServersFromArgs(os.Args)

	// create etcd client
	etcdClient := etcd.NewClient(etcdServers)
	etcdClient.SetConsistency(etcd.STRONG_CONSISTENCY)

	_, err := etcdClient.Get(KEY_ENABLE_CODE_REFRESH, false, false)
	if err != nil {
		// if we got an error, assume key not there
		return false
	}

	return true

}
Exemplo n.º 2
0
func (c *CouchbaseFleet) ConnectToEtcd() {

	c.etcdClient = etcd.NewClient(c.EtcdServers)
	c.etcdClient.SetConsistency(etcd.STRONG_CONSISTENCY)
}
Exemplo n.º 3
0
func (s *SyncGwCluster) ConnectToEtcd() {

	s.etcdClient = etcd.NewClient(s.EtcdServers)
	s.etcdClient.SetConsistency(etcd.STRONG_CONSISTENCY)
}