contain

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package contain blocks a user's IP traffic with the kernel's packet filter, so a candidate in its own container reaches dependencies only through unix sockets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, config Config) error

Apply rejects the configured user's IP traffic, replacing any rules a previous run installed, so running it again gives the same result.

Types

type Config

type Config struct {
	// UID is the user whose IP traffic is rejected, such as the candidate's.
	UID uint32 `` /* 213-byte string literal not displayed */
}

Config contains the command-line configuration of the user to contain.

func (Config) Validate

func (c Config) Validate() error

Validate checks that the user is not root, which would contain every process running as root in the pod.

Jump to

Keyboard shortcuts

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