Documentation ¶
Index ¶
- Constants
- Variables
- type ContainerPaths
- type ContainerPathsMap
- type MountManager
- func (m *MountManager) BindMount(pairs []*MountPair, atomic bool) error
- func (d *MountManager) FindDevice(path string) (*mount.Info, error)
- func (m *MountManager) MakeShared(path string) error
- func (m *MountManager) ParseMounted(paths map[pathType]string) (mountedPaths []string, err error)
- func (m *MountManager) Unmount(path []string, ignoreError bool) error
- func (m *MountManager) UnmountAllByPathName(name string) error
- type MountManagerInterface
- type MountPair
- type PathConfig
- type PathManager
- func (m *PathManager) GeneratePaths(id string) (cp *ContainerPaths, err error)
- func (m *PathManager) GetContainerID(pName string) (cName string, err error)
- func (m *PathManager) GetPaths(id string) (cp *ContainerPaths, err error)
- func (m *PathManager) OutdatePaths(id string) error
- func (m *PathManager) OutdatePathsByName(pathName string) error
- func (m *PathManager) RemoveByPathName(name string) error
- type PathManagerInterface
Constants ¶
View Source
const ( SPEC pathType = "spec" DATA pathType = "data" ETC pathType = "etc" CONFIG pathType = "config" CODE pathType = "code" RUNTIME pathType = "runtime" TMPDIR pathType = "tmp" WORKSPACE pathType = "workspace" )
Variables ¶
View Source
var ( PathsExists = errors.New("container paths exists") PathsNotExists = errors.New("container paths not exists") )
View Source
var (
UnknownPathType = errors.New("unknown path type")
)
Functions ¶
This section is empty.
Types ¶
type ContainerPaths ¶
type ContainerPathsMap ¶
type ContainerPathsMap struct { Map map[string]*ContainerPaths // contains filtered or unexported fields }
func InitContainerPathsMap ¶
func InitContainerPathsMap() *ContainerPathsMap
TODO: Need to get container list from runc in non-container environment.
type MountManager ¶
MountManager
func NewMountManager ¶
func NewMountManager(c *PathConfig, unloadCh chan string, clearCh chan string) *MountManager
NewMountManager
func (*MountManager) BindMount ¶
func (m *MountManager) BindMount(pairs []*MountPair, atomic bool) error
func (*MountManager) FindDevice ¶
func (d *MountManager) FindDevice(path string) (*mount.Info, error)
FindDevice
func (*MountManager) MakeShared ¶
func (m *MountManager) MakeShared(path string) error
func (*MountManager) ParseMounted ¶
func (m *MountManager) ParseMounted(paths map[pathType]string) (mountedPaths []string, err error)
func (*MountManager) Unmount ¶
func (m *MountManager) Unmount(path []string, ignoreError bool) error
func (*MountManager) UnmountAllByPathName ¶
func (m *MountManager) UnmountAllByPathName(name string) error
type MountManagerInterface ¶
type MountManagerInterface interface { FindDevice(path string) (*mount.Info, error) BindMount(pairs []*MountPair, atomic bool) error Unmount(path []string, ignoreError bool) error UnmountAllByPathName(name string) error }
MountManagerInterface
type PathConfig ¶
type PathConfig struct { RunningMode string RunnerDataPath string RunnerSpecPath string RunnerTmpPath string CodeWorkspacePath string EtcPath string CodePath string ConfPath string RuntimePath string }
func (*PathConfig) GetPathByName ¶
func (c *PathConfig) GetPathByName(t pathType, n string) (path string, err error)
func (*PathConfig) GetPathMapByName ¶
func (c *PathConfig) GetPathMapByName(n string) (pathMap map[pathType]string)
type PathManager ¶
type PathManager struct {
// contains filtered or unexported fields
}
PathManager
func NewPathManager ¶
func NewPathManager(c *PathConfig, unloadCh chan string, clearCh chan string) *PathManager
NewPathManager
func (*PathManager) GeneratePaths ¶
func (m *PathManager) GeneratePaths(id string) (cp *ContainerPaths, err error)
func (*PathManager) GetContainerID ¶
func (m *PathManager) GetContainerID(pName string) (cName string, err error)
func (*PathManager) GetPaths ¶
func (m *PathManager) GetPaths(id string) (cp *ContainerPaths, err error)
func (*PathManager) OutdatePaths ¶
func (m *PathManager) OutdatePaths(id string) error
func (*PathManager) OutdatePathsByName ¶
func (m *PathManager) OutdatePathsByName(pathName string) error
func (*PathManager) RemoveByPathName ¶
func (m *PathManager) RemoveByPathName(name string) error
type PathManagerInterface ¶
type PathManagerInterface interface { GeneratePaths(id string) (cp *ContainerPaths, err error) GetPaths(id string) (cp *ContainerPaths, err error) OutdatePaths(id string) error OutdatePathsByName(pathName string) error RemoveByPathName(name string) error GetContainerID(pName string) (cName string, err error) }
PathManagerInterface
Click to show internal directories.
Click to hide internal directories.