Documentation ¶
Index ¶
- func IsSpecialMountType(mntType string) bool
- func ReadHostCustomCADir(path string) (certsToFileName map[string]string, symlinks map[string]string, rerr error)
- type ContainerFS
- func (ctrFS *ContainerFS) AnyPathExists(paths []string) (bool, error)
- func (ctrFS *ContainerFS) DirIsEmpty(path string) (bool, error)
- func (ctrFS *ContainerFS) EvaluateSymlinks(name string) (string, error)
- func (ctrFS *ContainerFS) Exec(ctx context.Context, args ...string) error
- func (ctrFS *ContainerFS) LookPath(cmd string) (string, error)
- func (ctrFS *ContainerFS) Lstat(name string) (fs.FileInfo, error)
- func (ctrFS *ContainerFS) MkdirAll(path string, perm fs.FileMode) (createdDir string, rerr error)
- func (ctrFS *ContainerFS) MtimeOf(path string) (int64, error)
- func (ctrFS *ContainerFS) OSReleaseFileContains(ids [][]byte, idLikes [][]byte) (bool, error)
- func (ctrFS *ContainerFS) Open(name string) (fs.File, error)
- func (ctrFS *ContainerFS) OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error)
- func (ctrFS *ContainerFS) PathExists(path string) (bool, error)
- func (ctrFS *ContainerFS) ReadCABundleFile(path string) (map[string]struct{}, error)
- func (ctrFS *ContainerFS) ReadCustomCADir(path string) (certsToFileName map[string]string, symlinks map[string]string, rerr error)
- func (ctrFS *ContainerFS) ReadDir(name string) ([]fs.DirEntry, error)
- func (ctrFS *ContainerFS) ReadFile(path string) ([]byte, error)
- func (ctrFS *ContainerFS) Readlink(name string) (string, error)
- func (ctrFS *ContainerFS) Remove(path string) error
- func (ctrFS *ContainerFS) RemoveAll(path string) error
- func (ctrFS *ContainerFS) RemoveCertsFromCABundle(path string, certs map[string]string) error
- func (ctrFS *ContainerFS) SetMtime(path string, t int64) error
- func (ctrFS *ContainerFS) Stat(name string) (fs.FileInfo, error)
- func (ctrFS *ContainerFS) Symlink(oldname, newname string) error
- func (ctrFS *ContainerFS) WriteFile(path string, data []byte, perm fs.FileMode) error
- type ExecuteContainerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSpecialMountType ¶
Types ¶
type ContainerFS ¶
type ContainerFS struct {
// contains filtered or unexported fields
}
ContainerFS is a vfs-like abstraction for operating on a container's filesystem without needing to actually create all the mounts and unmount them (which can be expensive).
func NewContainerFS ¶
func NewContainerFS(spec *specs.Spec, executeContainer ExecuteContainerFunc) (*ContainerFS, error)
func (*ContainerFS) AnyPathExists ¶
func (ctrFS *ContainerFS) AnyPathExists(paths []string) (bool, error)
func (*ContainerFS) DirIsEmpty ¶
func (ctrFS *ContainerFS) DirIsEmpty(path string) (bool, error)
func (*ContainerFS) EvaluateSymlinks ¶
func (ctrFS *ContainerFS) EvaluateSymlinks(name string) (string, error)
func (*ContainerFS) Exec ¶
func (ctrFS *ContainerFS) Exec(ctx context.Context, args ...string) error
func (*ContainerFS) MkdirAll ¶
MkdirAll is like os.MkdirAll but returns the uppermost container parent dir that was created
func (*ContainerFS) OSReleaseFileContains ¶
func (ctrFS *ContainerFS) OSReleaseFileContains(ids [][]byte, idLikes [][]byte) (bool, error)
func (*ContainerFS) PathExists ¶
func (ctrFS *ContainerFS) PathExists(path string) (bool, error)
func (*ContainerFS) ReadCABundleFile ¶
func (ctrFS *ContainerFS) ReadCABundleFile(path string) (map[string]struct{}, error)
Returned map is keyed with the contents of each cert in the bundle, with all newlines stripped. The bundle file is presumed to have the format of each cert separated by a blank line.
func (*ContainerFS) ReadCustomCADir ¶
func (*ContainerFS) Remove ¶
func (ctrFS *ContainerFS) Remove(path string) error
func (*ContainerFS) RemoveAll ¶
func (ctrFS *ContainerFS) RemoveAll(path string) error
func (*ContainerFS) RemoveCertsFromCABundle ¶
func (ctrFS *ContainerFS) RemoveCertsFromCABundle(path string, certs map[string]string) error
func (*ContainerFS) Symlink ¶
func (ctrFS *ContainerFS) Symlink(oldname, newname string) error
Click to show internal directories.
Click to hide internal directories.