Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerFactory ¶
type DockerFactory struct {
ClientFactory composeclient.Factory
}
DockerFactory implements project.NetworksFactory
func (*DockerFactory) Create ¶
func (f *DockerFactory) Create(projectName string, networkConfigs map[string]*config.NetworkConfig, serviceConfigs *config.ServiceConfigs, networkEnabled bool) (project.Networks, error)
Create implements project.NetworksFactory Create method. It creates a Networks (that implements project.Networks) from specified configurations.
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network holds attributes and method for a network definition in compose
func NewNetwork ¶
func NewNetwork(projectName, name string, config *config.NetworkConfig, client client.NetworkAPIClient) *Network
NewNetwork creates a new network from the specified name and config.
func (*Network) EnsureItExists ¶
EnsureItExists make sure the network exists and return an error if it does not exists and cannot be created.
type Networks ¶
type Networks struct {
// contains filtered or unexported fields
}
Networks holds a list of network
func NetworksFromServices ¶
func NetworksFromServices(cli client.NetworkAPIClient, projectName string, networkConfigs map[string]*config.NetworkConfig, services *config.ServiceConfigs, networkEnabled bool) (*Networks, error)
NetworksFromServices creates a new Networks struct based on networks configurations and services configuration. If a network is defined but not used by any service, it will return an error along the Networks.
func (*Networks) Initialize ¶
Initialize make sure network exists if network is enabled