settings.go 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. package network
  2. import (
  3. networktypes "github.com/docker/docker/api/types/network"
  4. clustertypes "github.com/docker/docker/daemon/cluster/provider"
  5. "github.com/docker/go-connections/nat"
  6. )
  7. // Settings stores configuration details about the daemon network config
  8. // TODO Windows. Many of these fields can be factored out.,
  9. type Settings struct {
  10. Bridge string
  11. SandboxID string
  12. HairpinMode bool
  13. LinkLocalIPv6Address string
  14. LinkLocalIPv6PrefixLen int
  15. Networks map[string]*EndpointSettings
  16. Service *clustertypes.ServiceConfig
  17. Ports nat.PortMap
  18. SandboxKey string
  19. SecondaryIPAddresses []networktypes.Address
  20. SecondaryIPv6Addresses []networktypes.Address
  21. IsAnonymousEndpoint bool
  22. HasSwarmEndpoint bool
  23. }
  24. // EndpointSettings is a package local wrapper for
  25. // networktypes.EndpointSettings which stores Endpoint state that
  26. // needs to be persisted to disk but not exposed in the api.
  27. type EndpointSettings struct {
  28. *networktypes.EndpointSettings
  29. IPAMOperational bool
  30. }