pasta

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const BinaryName = "pasta"

Variables

This section is empty.

Functions

func Setup

func Setup(opts *SetupOptions) error

Types

type SetupOptions

type SetupOptions struct {
	// Config used to get pasta options and binary path via HelperBinariesDir
	Config *config.Config
	// Netns is the path to the container Netns
	Netns string
	// Ports that should be forwarded in the container
	Ports []types.PortMapping
	// ExtraOptions are pasta(1) cli options, these will be appended after the
	// pasta options from containers.conf to allow some form of overwrite.
	ExtraOptions []string
}

type SetupResult added in v0.58.1

type SetupResult struct {
	// IpAddresses configured by pasta
	IPAddresses []net.IP
	// DNSForwardIP is the ip used in --dns-forward, it should be added as first
	// entry to resolv.conf in the container.
	DNSForwardIPs []string
	// IPv6 says whenever pasta run with ipv6 support
	IPv6 bool
}

func Setup2 added in v0.58.1

func Setup2(opts *SetupOptions) (*SetupResult, error)

Setup2 start the pasta process for the given netns. The pasta binary is looked up in the HelperBinariesDir and $PATH. Note that there is no need for any special cleanup logic, the pasta process will automatically exit when the netns path is deleted.

Jump to

Keyboard shortcuts

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