예제 #1
0
파일: nginx.go 프로젝트: yiqguo/interlock
func NewNginxLoadBalancer(c *config.ExtensionConfig, client *dockerclient.DockerClient) (*NginxLoadBalancer, error) {
	// parse config base dir
	c.ConfigBasePath = filepath.Dir(c.ConfigPath)

	lb := &NginxLoadBalancer{
		cfg:    c,
		client: client,
	}

	return lb, nil
}
예제 #2
0
파일: beacon.go 프로젝트: yiqguo/interlock
func NewBeacon(c *config.ExtensionConfig, client *dockerclient.DockerClient) (*Beacon, error) {
	// parse config base dir
	c.ConfigBasePath = filepath.Dir(c.ConfigPath)

	errChan = make(chan error)
	go func() {
		for err := range errChan {
			log().Error(err)
		}
	}()

	ext := &Beacon{
		cfg:    c,
		client: client,
	}

	return ext, nil
}