Пример #1
0
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
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
}