Esempio n. 1
0
func NewClient(key string) *Client {
	etcd := etcd.NewClient([]string{etcdMachine})

	etcd.SyncCluster()

	return &Client{Key: key, etcd: etcd}
}
Esempio n. 2
0
func NewRegistry(config Config, hosts []string) *Registry {
	return &Registry{
		etcdClient: etcd.NewClient(hosts),
		config:     config,
	}
}
Esempio n. 3
0
func (s *ClientSuite) SetUpSuite(c *C) {
	machines := []string{"http://127.0.0.1:4001"}
	s.etcd = etcd.NewClient(machines)
	s.client = NewClient("clienttest")
}
Esempio n. 4
0
func NewRegistry(config Config) *Registry {
	return &Registry{
		etcdClient: etcd.NewClient([]string{"http://127.0.0.1:4001"}),
		config:     config,
	}
}