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 }
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 }