mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Move networking api types to the api/types/networking package.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
		
							parent
							
								
									1d775a54cc
								
							
						
					
					
						commit
						efda9618db
					
				
					 11 changed files with 55 additions and 51 deletions
				
			
		| 
						 | 
				
			
			@ -1,26 +1,9 @@
 | 
			
		|||
package network
 | 
			
		||||
 | 
			
		||||
import "github.com/docker/docker/pkg/nat"
 | 
			
		||||
 | 
			
		||||
// Address represents an IP address
 | 
			
		||||
type Address struct {
 | 
			
		||||
	Addr      string
 | 
			
		||||
	PrefixLen int
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IPAM represents IP Address Management
 | 
			
		||||
type IPAM struct {
 | 
			
		||||
	Driver string
 | 
			
		||||
	Config []IPAMConfig
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IPAMConfig represents IPAM configurations
 | 
			
		||||
type IPAMConfig struct {
 | 
			
		||||
	Subnet     string            `json:",omitempty"`
 | 
			
		||||
	IPRange    string            `json:",omitempty"`
 | 
			
		||||
	Gateway    string            `json:",omitempty"`
 | 
			
		||||
	AuxAddress map[string]string `json:"AuxiliaryAddresses,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
import (
 | 
			
		||||
	networktypes "github.com/docker/docker/api/types/network"
 | 
			
		||||
	"github.com/docker/docker/pkg/nat"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Settings stores configuration details about the daemon network config
 | 
			
		||||
// TODO Windows. Many of these fields can be factored out.,
 | 
			
		||||
| 
						 | 
				
			
			@ -30,22 +13,10 @@ type Settings struct {
 | 
			
		|||
	HairpinMode            bool
 | 
			
		||||
	LinkLocalIPv6Address   string
 | 
			
		||||
	LinkLocalIPv6PrefixLen int
 | 
			
		||||
	Networks               map[string]*EndpointSettings
 | 
			
		||||
	Networks               map[string]*networktypes.EndpointSettings
 | 
			
		||||
	Ports                  nat.PortMap
 | 
			
		||||
	SandboxKey             string
 | 
			
		||||
	SecondaryIPAddresses   []Address
 | 
			
		||||
	SecondaryIPv6Addresses []Address
 | 
			
		||||
	SecondaryIPAddresses   []networktypes.Address
 | 
			
		||||
	SecondaryIPv6Addresses []networktypes.Address
 | 
			
		||||
	IsAnonymousEndpoint    bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// EndpointSettings stores the network endpoint details
 | 
			
		||||
type EndpointSettings struct {
 | 
			
		||||
	EndpointID          string
 | 
			
		||||
	Gateway             string
 | 
			
		||||
	IPAddress           string
 | 
			
		||||
	IPPrefixLen         int
 | 
			
		||||
	IPv6Gateway         string
 | 
			
		||||
	GlobalIPv6Address   string
 | 
			
		||||
	GlobalIPv6PrefixLen int
 | 
			
		||||
	MacAddress          string
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue