labels.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. package netlabel
  2. const (
  3. // Prefix constant marks the reserved label space for libnetwork
  4. Prefix = "com.docker.network"
  5. // DriverPrefix constant marks the reserved label space for libnetwork drivers
  6. DriverPrefix = Prefix + ".driver"
  7. // DriverPrivatePrefix constant marks the reserved label space
  8. // for internal libnetwork drivers
  9. DriverPrivatePrefix = DriverPrefix + ".private"
  10. // GenericData constant that helps to identify an option as a Generic constant
  11. GenericData = Prefix + ".generic"
  12. // PortMap constant represents Port Mapping
  13. PortMap = Prefix + ".portmap"
  14. // MacAddress constant represents Mac Address config of a Container
  15. MacAddress = Prefix + ".endpoint.macaddress"
  16. // ExposedPorts constant represents the container's Exposed Ports
  17. ExposedPorts = Prefix + ".endpoint.exposedports"
  18. // DNSServers A list of DNS servers associated with the endpoint
  19. DNSServers = Prefix + ".endpoint.dnsservers"
  20. // EnableIPv6 constant represents enabling IPV6 at network level
  21. EnableIPv6 = Prefix + ".enable_ipv6"
  22. // DriverMTU constant represents the MTU size for the network driver
  23. DriverMTU = DriverPrefix + ".mtu"
  24. // OverlayBindInterface constant represents overlay driver bind interface
  25. OverlayBindInterface = DriverPrefix + ".overlay.bind_interface"
  26. // OverlayNeighborIP constant represents overlay driver neighbor IP
  27. OverlayNeighborIP = DriverPrefix + ".overlay.neighbor_ip"
  28. // OverlayVxlanIDList constant represents a list of VXLAN Ids as csv
  29. OverlayVxlanIDList = DriverPrefix + ".overlay.vxlanid_list"
  30. // Gateway represents the gateway for the network
  31. Gateway = Prefix + ".gateway"
  32. // Internal constant represents that the network is internal which disables default gateway service
  33. Internal = Prefix + ".internal"
  34. // ContainerIfacePrefix can be used to override the interface prefix used inside the container
  35. ContainerIfacePrefix = Prefix + ".container_iface_prefix"
  36. // HostIP is the Source-IP Address used to SNAT container traffic
  37. HostIP = Prefix + ".host_ipv4"
  38. // GlobalKVProvider constant represents the KV provider backend
  39. GlobalKVProvider = DriverPrivatePrefix + "globalkv_provider"
  40. // GlobalKVProviderURL constant represents the KV provider URL
  41. GlobalKVProviderURL = DriverPrivatePrefix + "globalkv_provider_url"
  42. // GlobalKVProviderConfig constant represents the KV provider Config
  43. GlobalKVProviderConfig = DriverPrivatePrefix + "globalkv_provider_config"
  44. // GlobalKVClient constants represents the global kv store client
  45. GlobalKVClient = DriverPrivatePrefix + "globalkv_client"
  46. // LocalKVProvider constant represents the KV provider backend
  47. LocalKVProvider = DriverPrivatePrefix + "localkv_provider"
  48. // LocalKVProviderURL constant represents the KV provider URL
  49. LocalKVProviderURL = DriverPrivatePrefix + "localkv_provider_url"
  50. // LocalKVProviderConfig constant represents the KV provider Config
  51. LocalKVProviderConfig = DriverPrivatePrefix + "localkv_provider_config"
  52. // LocalKVClient constants represents the local kv store client
  53. LocalKVClient = DriverPrivatePrefix + "localkv_client"
  54. )
  55. // MakeKVProvider returns the kvprovider label for the scope
  56. func MakeKVProvider(scope string) string {
  57. return DriverPrivatePrefix + scope + "kv_provider"
  58. }
  59. // MakeKVProviderURL returns the kvprovider url label for the scope
  60. func MakeKVProviderURL(scope string) string {
  61. return DriverPrivatePrefix + scope + "kv_provider_url"
  62. }
  63. // MakeKVProviderConfig returns the kvprovider config label for the scope
  64. func MakeKVProviderConfig(scope string) string {
  65. return DriverPrivatePrefix + scope + "kv_provider_config"
  66. }
  67. // MakeKVClient returns the kv client label for the scope
  68. func MakeKVClient(scope string) string {
  69. return DriverPrivatePrefix + scope + "kv_client"
  70. }