network

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

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 RuncDigRunner added in v1.0.1

type RuncDigRunner struct {
	Runc runc.Runc
	Cfg  TargetContainerConfig
}

func (RuncDigRunner) Run added in v1.0.1

func (d RuncDigRunner) Run(ctx context.Context, arg []string, stdin io.Reader) ([]byte, error)

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