Documentation
¶
Index ¶
- func BindMount(srcMountPoint string, dstMountPoint string) error
- func ConvertOptionsToString(options []string) string
- func ExecuteMountpointProcess(env []string, mountpointConfig MountpointConfig, hookConfig Config) error
- func ReadOciConfigJson(configJsonPath string) (specs.Spec, error)
- func SetLogger(logger *logrus.Logger)
- func WriteOciConfigJson(configJsonPath string, containerConfig specs.Spec) error
- type Config
- type MountpointConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertOptionsToString ¶
Convert options []string to comma separated string
func ExecuteMountpointProcess ¶
func ExecuteMountpointProcess(env []string, mountpointConfig MountpointConfig, hookConfig Config) error
func ReadOciConfigJson ¶
func WriteOciConfigJson ¶
Write the config.json file
Types ¶
type Config ¶
type Config struct { // If the ActivationFlag is not present in containerConfig.Process.Env, then the hook will not be activated // If the ActivationFlag is present in containerConfig.Process.Env, then the hook will be activated ActivationFlag string `json:"activation_flag,omitempty"` // Mountpoint program path ProgramPath string `json:"program_path"` // Host mountpoint HostMountPoint string `json:"host_mountpoint"` // Container mountpoint ContainerMountPoint string `json:"container_mountpoint"` }
struct to hold the hook configuration
func ReadConfig ¶
method to read the configuration file
type MountpointConfig ¶
type MountpointConfig struct { // Activation flag. Omit if not present ActivationFlag string `json:"activation_flag,omitempty"` // Container mountpoint. Omit if not present ContainerMountPoint string `json:"container_mountpoint,omitempty"` // S3 bucket name. Must be present S3BucketName string `json:"s3_bucket_name"` // S3 endpoint url. Omit if not present S3EndpointUrl string `json:"s3_endpoint_url,omitempty"` // S3 prefix. Omit if not present S3Prefix string `json:"s3_prefix,omitempty"` }
Struct to hold the mountpoint configuration passed via container environment variables
func ProcessEnv ¶
func ProcessEnv(env []string, hookConfig Config) (mountpointConfig MountpointConfig)
Click to show internal directories.
Click to hide internal directories.