Documentation
¶
Index ¶
- func CleanupJailDir(dir string) error
- func Run() error
- type Device
- type Jail
- func (j Jail) AddBlockDevice(device string) error
- func (j *Jail) Command(cmd string, args ...string) *exec.Cmd
- func (j Jail) CopyFile(src, dst string, mode uint32) error
- func (j Jail) CreateFile(path string, mode uint32) (*os.File, error)
- func (j Jail) HardLink(src string, dst string, readonly bool) error
- func (j Jail) Mkdir(dir string) error
- func (j Jail) MkdirAll(dir string) error
- func (j Jail) MknodAndOwn(device string, mode uint32, dev uint64) error
- type JailConfig
- type JailerConfig
- type Opt
- func WithBinary(src string, dst string) Opt
- func WithBlockDevice(device string) Opt
- func WithCgroup(cgroup string) Opt
- func WithCopyFile(src string, dst string, mode uint32) Opt
- func WithHardLink(src string, dst string, readonly bool) Opt
- func WithKVM() Opt
- func WithMountProc() Opt
- func WithNetNs(netns string) Opt
- func WithNewPidNS() Opt
- func WithResourceLimits(noFiles, fsize int) Opt
- func WithTUN() Opt
- func WithURandom() Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupJailDir ¶
Types ¶
type Jail ¶
type Jail struct {
// contains filtered or unexported fields
}
func CreateJail ¶
func CreateJail(jailer string, jailConfig JailConfig, opts ...Opt) (*Jail, error)
func (Jail) AddBlockDevice ¶
type JailConfig ¶
type JailerConfig ¶
type Opt ¶
type Opt func(*options) error
func WithBinary ¶
func WithBlockDevice ¶
func WithCgroup ¶
func WithMountProc ¶
func WithMountProc() Opt
func WithNewPidNS ¶
func WithNewPidNS() Opt
func WithResourceLimits ¶
func WithURandom ¶
func WithURandom() Opt
Click to show internal directories.
Click to hide internal directories.