Documentation ¶
Overview ¶
Package mount provides general data structure for mount and mount namespace (multiple mounts) definition.
Index ¶
- type Builder
- func (b *Builder) Build() ([]SyscallParams, error)
- func (b *Builder) FilterNotExist() *Builder
- func (b Builder) String() string
- func (b *Builder) WithBind(source, target string, readonly bool) *Builder
- func (b *Builder) WithMount(m Mount) *Builder
- func (b *Builder) WithMounts(m []Mount) *Builder
- func (b *Builder) WithProc() *Builder
- func (b *Builder) WithTmpfs(target, data string) *Builder
- type Mount
- type SyscallParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
Mounts []Mount
}
Builder builds fork_exec friendly mount syscall format
func NewDefaultBuilder ¶
func NewDefaultBuilder() *Builder
NewDefaultBuilder creates default builder for minimal rootfs
func (*Builder) Build ¶
func (b *Builder) Build() ([]SyscallParams, error)
Build creates sequence of syscalls for fork_exec
func (*Builder) FilterNotExist ¶
FilterNotExist removes bind mount that does not exists
func (*Builder) WithMounts ¶
WithMounts add mounts to builder
type Mount ¶
Mount defines syscall for mount points
func (Mount) IsBindMount ¶
IsBindMount returns if it is a bind mount
func (Mount) IsReadOnly ¶
IsReadOnly returns if it is a readonly mount
func (*Mount) ToSyscall ¶
func (m *Mount) ToSyscall() (*SyscallParams, error)
ToSyscall convert Mount to SyscallPrams
Click to show internal directories.
Click to hide internal directories.