Documentation ¶
Index ¶
- func AddPortMapping(logger lager.Logger, configStore ConfigStore, handle string, ...) error
- func New(specParser SpecParser, subnetPool subnets.Pool, configCreator ConfigCreator, ...) *networker
- func NewConfigurer(resolvConfigurer DnsResolvConfigurer, hostConfigurer HostConfigurer, ...) *configurer
- func ParseSpec(spec string) (subnets.SubnetSelector, subnets.IPSelector, error)
- type ConfigCreator
- type ConfigStore
- type Configurer
- type ContainerConfigurer
- type Creator
- type DnsResolvConfigurer
- type FirewallOpener
- type HostConfigurer
- type HostFileCompiler
- type IDGenerator
- type InstanceChainCreator
- type NetnsExecer
- type NetworkConfig
- type Networker
- type PortForwarder
- type PortForwarderSpec
- type PortPool
- type ResolvCompiler
- type ResolvConfigurer
- type SpecParser
- type SpecParserFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPortMapping ¶
func AddPortMapping(logger lager.Logger, configStore ConfigStore, handle string, newMapping garden.PortMapping) error
func New ¶
func New( specParser SpecParser, subnetPool subnets.Pool, configCreator ConfigCreator, configStore ConfigStore, configurer Configurer, portPool PortPool, portForwarder PortForwarder, firewallOpener FirewallOpener, ) *networker
func NewConfigurer ¶
func NewConfigurer(resolvConfigurer DnsResolvConfigurer, hostConfigurer HostConfigurer, containerConfigurer ContainerConfigurer, instanceChainCreator InstanceChainCreator) *configurer
func ParseSpec ¶
func ParseSpec(spec string) (subnets.SubnetSelector, subnets.IPSelector, error)
Types ¶
type ConfigCreator ¶
type ConfigStore ¶
type Configurer ¶
type Configurer interface { Apply(log lager.Logger, cfg NetworkConfig, pid int) error DestroyBridge(log lager.Logger, cfg NetworkConfig) error DestroyIPTablesRules(log lager.Logger, cfg NetworkConfig) error }
type ContainerConfigurer ¶
type ContainerConfigurer interface {
Apply(logger lager.Logger, cfg NetworkConfig, pid int) error
}
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
func NewConfigCreator ¶
type DnsResolvConfigurer ¶
type DnsResolvConfigurer interface {
Configure(log lager.Logger, cfg NetworkConfig, pid int) error
}
type FirewallOpener ¶
type HostConfigurer ¶
type HostConfigurer interface { Apply(logger lager.Logger, cfg NetworkConfig, pid int) error Destroy(cfg NetworkConfig) error }
type HostFileCompiler ¶
type IDGenerator ¶
type IDGenerator interface {
Generate() string
}
func NewSequentialIDGenerator ¶
func NewSequentialIDGenerator(seed int64) IDGenerator
type InstanceChainCreator ¶
type NetworkConfig ¶
type NetworkConfig struct { ContainerHandle string HostIntf string ContainerIntf string IPTablePrefix string IPTableInstance string BridgeName string BridgeIP net.IP ContainerIP net.IP ExternalIP net.IP Subnet *net.IPNet Mtu int PluginNameservers []net.IP OperatorNameservers []net.IP AdditionalNameservers []net.IP AdditionalHostEntries []string PluginSearchDomains []string }
type Networker ¶
type Networker interface { Capacity() uint64 Network(log lager.Logger, spec garden.ContainerSpec, pid int) error Destroy(log lager.Logger, handle string) error NetIn(log lager.Logger, handle string, externalPort, containerPort uint32) (uint32, uint32, error) NetOut(log lager.Logger, handle string, rule garden.NetOutRule) error BulkNetOut(log lager.Logger, handle string, rules []garden.NetOutRule) error Restore(log lager.Logger, handle string) error }
type PortForwarder ¶
type PortForwarder interface {
Forward(spec PortForwarderSpec) error
}
type PortForwarderSpec ¶
type ResolvCompiler ¶
type ResolvConfigurer ¶
type ResolvConfigurer struct { HostsFileCompiler HostFileCompiler ResolvCompiler ResolvCompiler ResolvFilePath string DepotDir string }
func (*ResolvConfigurer) Configure ¶
func (d *ResolvConfigurer) Configure(log lager.Logger, cfg NetworkConfig, pid int) error
type SpecParser ¶
type SpecParser interface {
Parse(log lager.Logger, spec string) (subnets.SubnetSelector, subnets.IPSelector, error)
}
type SpecParserFunc ¶
type SpecParserFunc func(spec string) (subnets.SubnetSelector, subnets.IPSelector, error)
func (SpecParserFunc) Parse ¶
func (fn SpecParserFunc) Parse(log lager.Logger, spec string) (subnets.SubnetSelector, subnets.IPSelector, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
iptablesfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
The subnets package provides a subnet pool from which networks may be dynamically acquired or statically reserved.
|
The subnets package provides a subnet pool from which networks may be dynamically acquired or statically reserved. |
fake_subnet_pool
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
subnetsfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.