update

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package update provides options for the container update.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SetContainerUpdateOption

type SetContainerUpdateOption func(*container.UpdateConfig) error

SetContainerUpdateOption is a function that sets a parameter for the container update.

func WithBlkioDeviceReadBps

func WithBlkioDeviceReadBps(path string, rate uint64) SetContainerUpdateOption

WithBlkioDeviceReadBps sets the container blkio device read bps behaviour.

func WithBlkioDeviceReadIOps

func WithBlkioDeviceReadIOps(path string, rate uint64) SetContainerUpdateOption

WithBlkioDeviceReadIOps sets the container blkio device read iops behaviour.

func WithBlkioDeviceWriteBps

func WithBlkioDeviceWriteBps(path string, rate uint64) SetContainerUpdateOption

WithBlkioDeviceWriteBps sets the container blkio device write bps behaviour.

func WithBlkioDeviceWriteIOps

func WithBlkioDeviceWriteIOps(path string, rate uint64) SetContainerUpdateOption

WithBlkioDeviceWriteIOps sets the container blkio device write iops behaviour.

func WithBlkioWeight

func WithBlkioWeight(weight uint16) SetContainerUpdateOption

WithBlkioWeight sets the container blkio weight behaviour.

func WithBlkioWeightDevice

func WithBlkioWeightDevice(path string, weight uint16) SetContainerUpdateOption

WithBlkioWeightDevice sets the container blkio weight device behaviour.

func WithCPUCount

func WithCPUCount(cpuCount int64) SetContainerUpdateOption

WithCPUCount sets the CPU count for the container. applicable to windows.

func WithCPUPercent

func WithCPUPercent(cpuPercent int64) SetContainerUpdateOption

WithCPUPercent sets the CPU percentage for the container.

func WithCPUPeriod

func WithCPUPeriod(period int64) SetContainerUpdateOption

WithCPUPeriod sets the container cpu period behaviour.

func WithCPUQuota

func WithCPUQuota(quota int64) SetContainerUpdateOption

WithCPUQuota sets the container cpu quota behaviour.

func WithCPURealtimePeriod

func WithCPURealtimePeriod(period int64) SetContainerUpdateOption

WithCPURealtimePeriod sets the container cpu realtime period behaviour.

func WithCPURealtimeRuntime

func WithCPURealtimeRuntime(runtime int64) SetContainerUpdateOption

WithCPURealtimeRuntime sets the container cpu realtime runtime behaviour.

func WithCPUShares

func WithCPUShares(shares int64) SetContainerUpdateOption

WithCPUShares sets the container cpu shares behaviour.

func WithCgroupParent

func WithCgroupParent(cgroupParent string) SetContainerUpdateOption

WithCgroupParent sets the container cgroup parent behaviour.

func WithCpusetCpus

func WithCpusetCpus(cpusetCpus string) SetContainerUpdateOption

WithCpusetCpus sets the container cpuset cpus behaviour.

func WithCpusetMems

func WithCpusetMems(cpusetMems string) SetContainerUpdateOption

WithCpusetMems sets the container cpuset mems behaviour.

func WithDeviceCgroupRules

func WithDeviceCgroupRules(rules []string) SetContainerUpdateOption

WithDeviceCgroupRules appends the device cgroup rules for the container.

func WithDeviceRequests

func WithDeviceRequests(driver string, count int, deviceIDs []string, capabilities [][]string) SetContainerUpdateOption

WithDeviceRequests appends the device requests for the container.

func WithDevices

func WithDevices(pathOnHost, pathInContainer, cgroupPermissions string) SetContainerUpdateOption

WithDevices appends the devices for the container.

func WithIOMaximumBandwidth

func WithIOMaximumBandwidth(ioMaximumBandwidth uint64) SetContainerUpdateOption

WithIOMaximumBandwidth sets the maximum IO in bytes per second for the container system drive.

func WithIOMaximumIOps

func WithIOMaximumIOps(ioMaximumIOps uint64) SetContainerUpdateOption

WithIOMaximumIOps sets the maximum IO in IO per second for the container system drive.

func WithKernelMemory

func WithKernelMemory(kernelMemory int64) SetContainerUpdateOption

WithKernelMemory sets the container kernel memory behaviour.

Deprecated kernel 5.4 deprecated kmem.limit_in_bytes.

func WithKernelMemoryTCP

func WithKernelMemoryTCP(kernelMemoryTCP int64) SetContainerUpdateOption

WithKernelMemoryTCP sets the container kernel memory TCP behaviour Kernel memory TCP limit (in bytes)

func WithMemory

func WithMemory(memory int64) SetContainerUpdateOption

WithMemory sets the container memory behaviour.

func WithMemoryReservation

func WithMemoryReservation(memoryReservation int64) SetContainerUpdateOption

WithMemoryReservation sets the container memory reservation Memory soft limit (in bytes)

func WithMemorySwap

func WithMemorySwap(memorySwap int64) SetContainerUpdateOption

WithMemorySwap sets the container memory swap behaviour Total memory usage (memory + swap); set `-1` to enable unlimited swap

func WithMemorySwappiness

func WithMemorySwappiness(memorySwappiness int64) SetContainerUpdateOption

WithMemorySwappiness sets the container memory swappiness behaviour

func WithNanoCPUs

func WithNanoCPUs(nanoCPUs int64) SetContainerUpdateOption

WithNanoCPUs sets the container nano cpus behaviour.

func WithOomKillDisable

func WithOomKillDisable() SetContainerUpdateOption

WithOomKillDisable sets the OOM Whether to disable OOM Killer or not

func WithPidsLimit

func WithPidsLimit(pidsLimit int64) SetContainerUpdateOption

WithPidsLimit sets the maximum number of processes for the container. Set `0` or `-1` for unlimited, or `null` to not change.

func WithRestartPolicy

func WithRestartPolicy(name hc.RestartPolicy, maxRetry int) SetContainerUpdateOption

WithRestartPolicy sets the container restart policy behaviour.

func WithUlimits

func WithUlimits(name string, soft, hard int64) SetContainerUpdateOption

WithUlimits appends the ulimits for the container.

Jump to

Keyboard shortcuts

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