startup

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package startup provides machined startup tasks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSystemCgroups

func CreateSystemCgroups(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

CreateSystemCgroups creates system cgroups.

func InitVolumeLifecycle

func InitVolumeLifecycle(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

InitVolumeLifecycle initializes volume lifecycle resource.

func LogMode

func LogMode(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

LogMode prints the current mode.

func MountCgroups

func MountCgroups(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

MountCgroups represents mounts the cgroupfs (only in !container).

func MountPseudoLate

func MountPseudoLate(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

MountPseudoLate mounts the late pseudo filesystems (only in !container).

func OSRelease

func OSRelease(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

OSRelease renders a valid /etc/os-release file and writes it to disk.

The node's OS Image field is reported by the node from /etc/os-release.

func RunTasks

func RunTasks(ctx context.Context, log *zap.Logger, rt runtime.Runtime, tasks ...Task) error

RunTasks runs the given tasks in order.

func SetEnvironmentVariables

func SetEnvironmentVariables(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

SetEnvironmentVariables sets the environment variables.

func SetRLimit

func SetRLimit(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

SetRLimit sets the file descriptor limit.

func SetupSystemDirectories

func SetupSystemDirectories(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

SetupSystemDirectories creates system default directories.

func WriteIMAPolicy

func WriteIMAPolicy(ctx context.Context, log *zap.Logger, rt runtime.Runtime, next NextTaskFunc) error

WriteIMAPolicy represents the WriteIMAPolicy task.

Types

type NextTaskFunc

type NextTaskFunc func() Task

NextTaskFunc is a function which returns the next task in the chain.

type Task

Task is a function that performs a startup task.

It is supposed to call the next task in the chain.

func DefaultTasks

func DefaultTasks() []Task

DefaultTasks returns the default startup tasks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL