Documentation ¶
Index ¶
- Constants
- type AmazonECSVolumePlugin
- func (a *AmazonECSVolumePlugin) Capabilities() *volume.CapabilitiesResponse
- func (a *AmazonECSVolumePlugin) CleanupMountPath(name string) error
- func (a *AmazonECSVolumePlugin) Create(r *volume.CreateRequest) error
- func (a *AmazonECSVolumePlugin) Get(r *volume.GetRequest) (*volume.GetResponse, error)
- func (a *AmazonECSVolumePlugin) GetMountPath(name string) (string, error)
- func (a *AmazonECSVolumePlugin) List() (*volume.ListResponse, error)
- func (a *AmazonECSVolumePlugin) LoadState() error
- func (a *AmazonECSVolumePlugin) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
- func (a *AmazonECSVolumePlugin) Path(r *volume.PathRequest) (*volume.PathResponse, error)
- func (a *AmazonECSVolumePlugin) Remove(r *volume.RemoveRequest) error
- func (a *AmazonECSVolumePlugin) Unmount(r *volume.UnmountRequest) error
- type ECSVolumeDriver
- type MountHelper
- type StateManager
- type VolumeInfo
- type VolumeState
Constants ¶
const ( // VolumeMountPathPrefix is the host path where amazon ECS plugin's volumes are mounted VolumeMountPathPrefix = "/var/lib/ecs/volumes/" // FilePerm is the file permissions for the host volume mount directory FilePerm = 0700 )
const ( // MountBinary is the binary name of EFS Mount MountBinary = "mount" // UnmountBinary is the binary name for EFS Unmount UnmountBinary = "umount" )
const ( // PluginStatePath is the directory path to the plugin state information // TODO: get this value from an env var PluginStatePath = "/var/lib/ecs/data/" // PluginStateFile contains the state information of the plugin PluginStateFile = "ecs_volume_plugin.json" // PluginStateFileAbsPath is the absolute path of the plugin state file PluginStateFileAbsPath = "/var/lib/ecs/data/ecs_volume_plugin.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmazonECSVolumePlugin ¶
type AmazonECSVolumePlugin struct {
// contains filtered or unexported fields
}
AmazonECSVolumePlugin holds list of volume drivers and volumes information
func NewAmazonECSVolumePlugin ¶
func NewAmazonECSVolumePlugin() *AmazonECSVolumePlugin
NewAmazonECSVolumePlugin initiates the volume drivers
func (*AmazonECSVolumePlugin) Capabilities ¶
func (a *AmazonECSVolumePlugin) Capabilities() *volume.CapabilitiesResponse
Capabilities implements Docker volume plugin's Capabilities Method
func (*AmazonECSVolumePlugin) CleanupMountPath ¶
func (a *AmazonECSVolumePlugin) CleanupMountPath(name string) error
CleanupMountPath cleans up the volume's host path
func (*AmazonECSVolumePlugin) Create ¶
func (a *AmazonECSVolumePlugin) Create(r *volume.CreateRequest) error
Create implements Docker volume plugin's Create Method
func (*AmazonECSVolumePlugin) Get ¶
func (a *AmazonECSVolumePlugin) Get(r *volume.GetRequest) (*volume.GetResponse, error)
Get implements Docker volume plugin's Get Method
func (*AmazonECSVolumePlugin) GetMountPath ¶
func (a *AmazonECSVolumePlugin) GetMountPath(name string) (string, error)
GetMountPath returns the host path where volume will be mounted
func (*AmazonECSVolumePlugin) List ¶
func (a *AmazonECSVolumePlugin) List() (*volume.ListResponse, error)
List implements Docker volume plugin's List Method
func (*AmazonECSVolumePlugin) LoadState ¶
func (a *AmazonECSVolumePlugin) LoadState() error
LoadState loads past state information of the plugin
func (*AmazonECSVolumePlugin) Mount ¶
func (a *AmazonECSVolumePlugin) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
Mount implements Docker volume plugin's Mount Method
func (*AmazonECSVolumePlugin) Path ¶
func (a *AmazonECSVolumePlugin) Path(r *volume.PathRequest) (*volume.PathResponse, error)
Path implements Docker volume plugin's Path Method
func (*AmazonECSVolumePlugin) Remove ¶
func (a *AmazonECSVolumePlugin) Remove(r *volume.RemoveRequest) error
Remove implements Docker volume plugin's Remove Method
func (*AmazonECSVolumePlugin) Unmount ¶
func (a *AmazonECSVolumePlugin) Unmount(r *volume.UnmountRequest) error
Unmount implements Docker volume plugin's Unmount Method
type ECSVolumeDriver ¶
type ECSVolumeDriver struct {
// contains filtered or unexported fields
}
ECSVolumeDriver holds mount helper and methods for different Volume Mounts
func NewECSVolumeDriver ¶
func NewECSVolumeDriver() *ECSVolumeDriver
NewECSVolumeDriver initializes fields for volume mounts
func (*ECSVolumeDriver) Create ¶
func (e *ECSVolumeDriver) Create(r *driver.CreateRequest) error
Create implements ECSVolumeDriver's Create volume method
func (*ECSVolumeDriver) IsMounted ¶
func (e *ECSVolumeDriver) IsMounted(volumeName string) bool
Method to check if a volume is currently mounted.
func (*ECSVolumeDriver) Remove ¶
func (e *ECSVolumeDriver) Remove(req *driver.RemoveRequest) error
Remove implements ECSVolumeDriver's Remove volume method
type MountHelper ¶
MountHelper contains fields and methods for mounting and unmounting EFS volumes
func (*MountHelper) Unmount ¶
func (m *MountHelper) Unmount() error
Unmount helps unmount EFS volumes
func (*MountHelper) Validate ¶
func (m *MountHelper) Validate() error
Validate validates fields as part of the mount command
type StateManager ¶
type StateManager struct { VolState *VolumeState // contains filtered or unexported fields }
StateManager manages the state of the volumes information
func NewStateManager ¶
func NewStateManager() *StateManager
NewStateManager initializes the state manager of volume plugin
type VolumeInfo ¶
type VolumeInfo struct { Type string `json:"type,omitempty"` Path string `json:"path,omitempty"` Options map[string]string `json:"options,omitempty"` CreatedAt string `json:"createdAt,omitempty"` Mounts map[string]int `json:"mounts,omitempty"` }
VolumeInfo contains the information of managed volumes
type VolumeState ¶
type VolumeState struct {
Volumes map[string]*VolumeInfo `json:"volumes,omitempty"`
}
VolumeState contains the list of managed volumes