Documentation ¶
Index ¶
- func AddPortMapping(logger lager.Logger, configStore ConfigStore, handle string, ...) error
- 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 NetworkDepot
- type Networker
- func (n *Networker) BulkNetOut(log lager.Logger, handle string, rules []garden.NetOutRule) error
- func (n *Networker) Capacity() uint64
- func (n *Networker) Destroy(log lager.Logger, handle string) error
- func (n *Networker) NetIn(log lager.Logger, handle string, externalPort, containerPort uint32) (uint32, uint32, error)
- func (n *Networker) NetOut(log lager.Logger, handle string, rule garden.NetOutRule) error
- func (n *Networker) Network(log lager.Logger, containerSpec garden.ContainerSpec, pid int) error
- func (n *Networker) Restore(log lager.Logger, handle string) error
- func (n *Networker) SetupBindMounts(log lager.Logger, handle string, privileged bool, rootfsPath string) ([]garden.BindMount, error)
- 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 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 FirewallOpener interface { Open(log lager.Logger, instance, handle string, rule garden.NetOutRule) error BulkOpen(log lager.Logger, instance, handle string, rule []garden.NetOutRule) error }
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 NetworkDepot ¶
type Networker ¶
type Networker struct {
// contains filtered or unexported fields
}
func New ¶
func New( specParser SpecParser, subnetPool subnets.Pool, configCreator ConfigCreator, configStore ConfigStore, configurer Configurer, portPool PortPool, portForwarder PortForwarder, firewallOpener FirewallOpener, networkDepot NetworkDepot, ) *Networker
func (*Networker) BulkNetOut ¶
func (n *Networker) BulkNetOut(log lager.Logger, handle string, rules []garden.NetOutRule) error
func (*Networker) NetOut ¶
func (n *Networker) NetOut(log lager.Logger, handle string, rule garden.NetOutRule) 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.