mirror of
https://github.com/moby/moby.git
synced 2026-08-03 06:30:59 +00:00
Libnetwork passes a map[string]any to the bridge driver's Register function. This forces the daemon to convert its configuration into a map, and the driver to convert that map back into a struct. This is unnecessary complexity, and makes it harder to track down where and how bridge driver configuration fields are set. Refactor libnetwork to let the daemon register the bridge.Configuration directly through a new option `OptionBridgeConfig`. The bridge driver now takes a `Configuration` param that needs no special treatment. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
10 lines
230 B
Go
10 lines
230 B
Go
package config
|
|
|
|
// PlatformConfig defines platform-specific configuration.
|
|
type PlatformConfig struct{}
|
|
|
|
// optionExecRoot is a no-op on non-unix platforms.
|
|
func optionExecRoot(execRoot string) Option {
|
|
return func(*Config) {}
|
|
}
|