network

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func ResolveHostnames

func ResolveHostnames(ctx context.Context, r runc.Runc, config TargetContainerConfig, ipOrHostnames ...string) ([]string, error)

func Revert

func Revert(ctx context.Context, r runc.Runc, config TargetContainerConfig, opts networkutils.Opts) error

Types

type ExtraMount

type ExtraMount struct {
	Source string `json:"source"`
	Path   string `json:"path"`
}

type Interface

type Interface struct {
	Index    uint     `json:"ifindex"`
	Name     string   `json:"ifname"`
	LinkType string   `json:"link_type"`
	Flags    []string `json:"flags"`
}

func ListInterfaces

func ListInterfaces(ctx context.Context, r runc.Runc, config TargetContainerConfig) ([]Interface, error)

func (*Interface) HasFlag

func (i *Interface) HasFlag(f string) bool

type TargetContainerConfig

type TargetContainerConfig struct {
	ContainerID string                 `json:"id"`
	Pid         int                    `json:"pid"`
	Namespaces  []specs.LinuxNamespace `json:"namespaces"`
}

func GetConfigForContainer

func GetConfigForContainer(ctx context.Context, r runc.Runc, targetId string) (TargetContainerConfig, error)

Jump to

Keyboard shortcuts

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