Documentation ¶
Index ¶
- func CmdAndArgs(args []string) (command string, argv []string)
- func CopyFile(src, dst string) error
- func CreateDir(dir string) error
- func Extract(tarball, target string) error
- func GenIPAddress() string
- func GenTemplate(name, tempStr string, input any) error
- func GenUID() string
- func InitKokerDirs() error
- func SetNamespace(pid string, flag int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdAndArgs ¶
func GenIPAddress ¶
func GenIPAddress() string
GenIPAddress generates ip address randomly (and dummy). NOTE(kiennt26): It doesn't check this IP address is used or not, as I assume there is just only 1 container run at time.
func GenTemplate ¶
GenTemplate inits and execute the given template
func SetNamespace ¶
SetNamespace calls setns syscall for set of flags. It changes current process namespace to namespace of another process which can be specified by pid.
NOTE: A process may not be reassociated with a new mount namespace if it is multi-threaded. Changing the mount namespace requires that the caller possess both CAP_SYS_CHROOT and CAP_SYS_ADMIN capabilities in its own user namespace and CAP_SYS_ADMIN in the target mount namespace.
Types ¶
This section is empty.