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.VolumesFactory
func (*DockerFactory) Create ¶
func (f *DockerFactory) Create(projectName string, volumeConfigs map[string]*config.VolumeConfig, serviceConfigs *config.ServiceConfigs, volumeEnabled bool) (project.Volumes, error)
Create implements project.VolumesFactory Create method. It creates a Volumes (that implements project.Volumes) from specified configurations.
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
Volume holds attributes and method for a volume definition in compose
func NewVolume ¶
func NewVolume(projectName, name string, config *config.VolumeConfig, client client.VolumeAPIClient) *Volume
NewVolume creates a new volume from the specified name and config.
func (*Volume) EnsureItExists ¶
EnsureItExists make sure the volume exists and return an error if it does not exists and cannot be created.
type Volumes ¶
type Volumes struct {
// contains filtered or unexported fields
}
Volumes holds a list of volume
func VolumesFromServices ¶
func VolumesFromServices(cli client.VolumeAPIClient, projectName string, volumeConfigs map[string]*config.VolumeConfig, services *config.ServiceConfigs, volumeEnabled bool) (*Volumes, error)
VolumesFromServices creates a new Volumes struct based on volumes configurations and services configuration. If a volume is defined but not used by any service, it will return an error along the Volumes.
func (*Volumes) Initialize ¶
Initialize make sure volume exists if volume is enabled