local

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrIPClash is raised when a generated IP lives in an existing
	// root network namespace
	ErrIPClash = errors.New("IP lives in a host network")

	// ErrIncorrectSeed is raised when the seed used to generate veth pair
	// is in an incorrect format
	ErrIncorrectSeed = errors.New("seed must be a positive 2 bytes value")
)

Functions

func MakeConfigDrive added in v0.3.0

func MakeConfigDrive(userdata *conf.Conf, outputDir string) (string, error)

MakeConfigDrive creates a config drive directory tree under outputDir and returns the path to the top level directory.

Types

type Dnsmasq

type Dnsmasq struct {
	Segments []*Segment
	// contains filtered or unexported fields
}

func NewDnsmasq

func NewDnsmasq() (*Dnsmasq, error)

func (*Dnsmasq) Destroy

func (dm *Dnsmasq) Destroy()

func (*Dnsmasq) GetInterface

func (dm *Dnsmasq) GetInterface(bridge string) (in *Interface)

type Interface

type Interface struct {
	HardwareAddr net.HardwareAddr
	DHCPv4       []net.IPNet
	DHCPv6       []net.IPNet
}

type LocalCluster

type LocalCluster struct {
	destructor.MultiDestructor
	*platform.BaseCluster

	OmahaServer OmahaWrapper
	// contains filtered or unexported fields
}

func (*LocalCluster) Destroy added in v0.3.0

func (lc *LocalCluster) Destroy()

func (*LocalCluster) GetDiscoveryURL

func (lc *LocalCluster) GetDiscoveryURL(size int) (string, error)

func (*LocalCluster) GetNsHandle added in v0.2.0

func (lc *LocalCluster) GetNsHandle() netns.NsHandle

func (*LocalCluster) GetOmahaHostPort added in v0.12.0

func (lc *LocalCluster) GetOmahaHostPort() (string, error)

func (*LocalCluster) NewCommand

func (lc *LocalCluster) NewCommand(name string, arg ...string) exec.Cmd

func (*LocalCluster) NewTap

func (lc *LocalCluster) NewTap(bridge string) (*TunTap, error)

type LocalFlight added in v0.12.0

type LocalFlight struct {
	destructor.MultiDestructor
	*platform.BaseFlight
	Dnsmasq    *Dnsmasq
	SimpleEtcd *SimpleEtcd
	NTPServer  *ntp.Server
	// contains filtered or unexported fields
}

func NewLocalFlight added in v0.12.0

func NewLocalFlight(opts *platform.Options, platformName platform.Name) (*LocalFlight, error)

func (*LocalFlight) Destroy added in v0.12.0

func (lf *LocalFlight) Destroy()

func (*LocalFlight) NewCluster added in v0.12.0

func (lf *LocalFlight) NewCluster(rconf *platform.RuntimeConfig) (*LocalCluster, error)

type OmahaWrapper added in v0.8.0

type OmahaWrapper struct {
	*omaha.TrivialServer
}

OmahaWrapper wraps the omaha trivial server to log any errors returned by destroy and doesn't return anything instead

func (OmahaWrapper) Destroy added in v0.8.0

func (o OmahaWrapper) Destroy()

type Segment

type Segment struct {
	BridgeName string
	BridgeIf   *Interface
	Interfaces []*Interface

	// Listener holds the unique TCP socket
	// created to ensure uniqueness of IP
	// it has to be closed once the kola instance
	// has terminated
	Listener net.Listener
	// contains filtered or unexported fields
}

type SimpleEtcd

type SimpleEtcd struct {
	Port int
	// contains filtered or unexported fields
}

SimpleEtcd provides a single node etcd server.

func NewSimpleEtcd

func NewSimpleEtcd() (*SimpleEtcd, error)

func (*SimpleEtcd) Destroy

func (se *SimpleEtcd) Destroy()

type SimpleHTTP added in v0.20.0

type SimpleHTTP struct{}

SimpleHTTP provides a single http server.

func (*SimpleHTTP) Serve added in v0.20.0

func (s *SimpleHTTP) Serve() error

type TunTap

type TunTap struct {
	*netlink.LinkAttrs
	*os.File
}

Tun/Tap device that is compatible with the netlink library.

func AddLinkTap

func AddLinkTap(name string) (*TunTap, error)

func AddLinkTun

func AddLinkTun(name string) (*TunTap, error)

func (*TunTap) Attrs

func (tt *TunTap) Attrs() *netlink.LinkAttrs

func (*TunTap) Type

func (tt *TunTap) Type() string

Jump to

Keyboard shortcuts

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