options

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SouthBound = Group(g.DeviceGroupSouthBound)
	NorthBound = Group(g.DeviceGroupNorthBound)
)

Variables

This section is empty.

Functions

func DefaultGatewayIP added in v0.2.3

func DefaultGatewayIP(str string) g.Route

func DefaultGatewayIPv4 added in v0.2.3

func DefaultGatewayIPv4(a, b, c, d byte) g.Route

func DefaultNetwork

func DefaultNetwork() (*g.Network, error)

func Filter added in v0.3.0

func Filter(h g.FilterHook, stmts ...filters.Statement) g.FilterRule

func Interface

func Interface(name string, opts ...g.Option) *g.Interface

func Route added in v0.2.3

func Route(network net.IPNet, gw net.IP) g.Route

Types

type Address

type Address net.IPNet

func AddressIP added in v0.1.0

func AddressIP(str string) Address

func AddressIPv4

func AddressIPv4(a, b, c, d byte, m int) Address

func (Address) Apply

func (a Address) Apply(i *g.Interface)

type AgingTime

type AgingTime uint32

func (AgingTime) Apply

func (at AgingTime) Apply(b *nl.Bridge)

type Buffer added in v0.1.0

type Buffer uint32

func (Buffer) Apply added in v0.1.0

func (r Buffer) Apply(t *Tbf)

type Corruption added in v0.1.0

type Corruption Probability

func (Corruption) ApplyNetem added in v0.1.0

func (c Corruption) ApplyNetem(n *Netem)

type Duplicate added in v0.1.0

type Duplicate Probability

func (Duplicate) ApplyNetem added in v0.1.0

func (p Duplicate) ApplyNetem(n *Netem)

type ExistingDockerContainer added in v0.1.0

type ExistingDockerContainer string

func (ExistingDockerContainer) Apply added in v0.1.0

func (d ExistingDockerContainer) Apply(n *g.BaseNode)

type ExistingNamespace

type ExistingNamespace string

func (ExistingNamespace) Apply

func (e ExistingNamespace) Apply(n *g.BaseNode)

type Forwarding added in v0.1.0

type Forwarding bool

func (Forwarding) Apply added in v0.1.0

func (b Forwarding) Apply(h *g.Host)

type Gap added in v0.1.0

type Gap uint32

func (Gap) ApplyNetem added in v0.1.0

func (g Gap) ApplyNetem(n *Netem)

type Group

type Group g.DeviceGroup

func (Group) Apply

func (h Group) Apply(p *g.Interface)

type HardwareAddress

type HardwareAddress net.HardwareAddr

func AddressMAC added in v0.2.0

func AddressMAC(s string) HardwareAddress

func AddressMACBytes added in v0.2.0

func AddressMACBytes(b []byte) HardwareAddress

func (HardwareAddress) Apply

func (a HardwareAddress) Apply(la *nl.LinkAttrs)

type HelloTime

type HelloTime uint32

func (HelloTime) Apply

func (ht HelloTime) Apply(b *nl.Bridge)

type Jitter added in v0.1.0

type Jitter time.Duration

func (Jitter) ApplyNetem added in v0.1.0

func (j Jitter) ApplyNetem(n *Netem)

type Latency added in v0.1.0

type Latency time.Duration

func (Latency) ApplyNetem added in v0.1.0

func (m Latency) ApplyNetem(n *Netem)

type Limit added in v0.1.0

type Limit uint32

func (Limit) ApplyNetem added in v0.1.0

func (l Limit) ApplyNetem(n *Netem)

func (Limit) ApplyTbf added in v0.1.0

func (l Limit) ApplyTbf(t *Tbf)

type Loss added in v0.1.0

type Loss Probability

func (Loss) ApplyNetem added in v0.1.0

func (p Loss) ApplyNetem(n *Netem)

type MTU

type MTU int

func (MTU) Apply

func (m MTU) Apply(la *nl.LinkAttrs)

type MinBurst added in v0.1.0

type MinBurst uint32

func (MinBurst) Apply added in v0.1.0

func (r MinBurst) Apply(t *Tbf)

type MulticastSnooping

type MulticastSnooping bool

func (MulticastSnooping) Apply

func (mcs MulticastSnooping) Apply(b *nl.Bridge)

type NSPrefix added in v0.1.0

type NSPrefix string

func (NSPrefix) Apply added in v0.1.0

func (pfx NSPrefix) Apply(n *g.Network)

type Netem added in v0.1.0

type Netem nl.NetemQdiscAttrs

func WithNetem added in v0.1.0

func WithNetem(opts ...NetemOption) Netem

func (Netem) Apply added in v0.1.0

func (ne Netem) Apply(p *g.Interface)

type NetemOption added in v0.1.0

type NetemOption interface {
	ApplyNetem(n *Netem)
}

type PeakRate added in v0.1.0

type PeakRate uint64

func (PeakRate) Apply added in v0.1.0

func (r PeakRate) Apply(t *Tbf)

type PeerHardwareAddress

type PeerHardwareAddress net.HardwareAddr

func (PeerHardwareAddress) Apply added in v0.1.0

func (p PeerHardwareAddress) Apply(v *nl.Veth)

type Persistent

type Persistent bool

func (Persistent) Apply

func (p Persistent) Apply(n *g.Network)

type Probability added in v0.1.0

type Probability struct {
	Probability float32
	Correlation float32
}

type Rate added in v0.1.0

type Rate uint64

func (Rate) ApplyTbf added in v0.1.0

func (r Rate) ApplyTbf(t *Tbf)

type Reordering added in v0.1.0

type Reordering Probability

func (Reordering) ApplyNetem added in v0.1.0

func (p Reordering) ApplyNetem(n *Netem)

type Tbf added in v0.1.0

type Tbf nl.Tbf

func WithTbf added in v0.1.0

func WithTbf(opts ...TbfOption) Tbf

func (Tbf) Apply added in v0.1.0

func (tbf Tbf) Apply(p *g.Interface)

type TbfOption added in v0.1.0

type TbfOption interface {
	ApplyTbf(t *Tbf)
}

type TxQLen added in v0.2.0

type TxQLen int

func (TxQLen) Apply added in v0.2.0

func (l TxQLen) Apply(la *nl.LinkAttrs)

type VLANFiltering

type VLANFiltering bool

func (VLANFiltering) Apply

func (vf VLANFiltering) Apply(b *nl.Bridge)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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