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

	etcd.SyncCluster()

	return &Client{Key: key, etcd: etcd}
}
Beispiel #2
0
func NewRegistry(config Config, hosts []string) *Registry {
	return &Registry{
		etcdClient: etcd.NewClient(hosts),
		config:     config,
	}
}
Beispiel #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")
}
Beispiel #4
0
func NewRegistry(config Config) *Registry {
	return &Registry{
		etcdClient: etcd.NewClient([]string{"http://127.0.0.1:4001"}),
		config:     config,
	}
}