package
0.0.0-20210505125100-04f29832a923
Repository: https://github.com/kata-containers/runtime.git
Documentation: pkg.go.dev
# README
Kata utilities packages
The katautils
package contains useful functions that are shared by various
parts of the codebase, including the runtime and the container v2 shim.
# Functions
AddContainerIDMapping add a container id mapping to sandbox id.
CreateContainer create a container.
CreateSandbox create a sandbox container.
CreateTracer create a tracer.
DelContainerIDMapping delete container id mapping from a sandbox.
EnterNetNS is free from any call to a go routine, and it calls into runtime.LockOSThread(), meaning it won't be executed in a different thread than the one expected by the caller.
FetchContainerIDMapping This function assumes it should find only one file inside the container ID directory.
FileExists test is a file exiting or not.
GetDefaultConfigFilePaths returns a list of paths that will be considered as configuration files in priority order.
No description provided by the author
GetFileContents return the file contents as a string.
HandleFactory set the factory.
IsBlockDevice returns true if the give path is a block device.
LoadConfiguration loads the configuration file and converts it into a runtime configuration.
PostStartHooks run the hooks just after start container.
PostStopHooks run the hooks after stop container.
PreStartHooks run the hooks before start container.
ResolvePath returns the fully resolved and expanded value of the specified path.
RunCommand returns the commands space-trimmed standard output on success.
RunCommandFull returns the commands space-trimmed standard output and error on success.
SetConfigOptions will override some of the defaults settings.
SetCtrsMapTreePath let the testcases change the ctrsMapTreePath to a test dir.
SetEphemeralStorageType sets the mount type to 'ephemeral' if the mount source path is provisioned by k8s for ephemeral storage.
SetKernelParams adds the user-specified kernel parameters (from the configuration file) to the defaults so that the former take priority.
SetLogger sets the logger for the factory.
SetupNetworkNamespace create a network namespace.
StopTracing ends all tracing, reporting the spans to the collector.
Trace creates a new tracing span based on the specified name and parent context.
WriteFile write data into specified file.
# Variables
No description provided by the author
GetKernelParamsFunc use a variable to allow tests to modify its value.