Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewWorker = func(config Config) (worker.Worker, error) { envWorker := &proxyWorker{ first: true, config: config, } w, err := watcher.NewNotifyWorker(watcher.NotifyConfig{ Handler: envWorker, }) if err != nil { return nil, errors.Trace(err) } return w, nil }
NewWorker returns a worker.Worker that updates proxy environment variables for the process and for the whole machine.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency manifold that runs a proxy updater worker, using the api connection resource named in the supplied config.
Types ¶
type API ¶
type API interface { ProxyConfig() (proxyutils.Settings, proxyutils.Settings, error) WatchForProxyConfigAndAPIHostPortChanges() (watcher.NotifyWatcher, error) }
API is an interface that is provided to New which can be used to fetch the API host ports
type Config ¶
type Config struct { Directory string RegistryPath string Filename string API API ExternalUpdate func(proxyutils.Settings) error InProcessUpdate func(proxyutils.Settings) error }
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string APICallerName string WorkerFunc func(Config) (worker.Worker, error) ExternalUpdate func(proxy.Settings) error InProcessUpdate func(proxy.Settings) error }
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.
Click to show internal directories.
Click to hide internal directories.