Documentation
¶
Index ¶
- func Apply(ctx context.Context, runner CommandRunner, opts Opts) error
- func CondenseNetWithPortRange(nwps []network.NetWithPortRange, limit int) []network.NetWithPortRange
- func HasCiliumIpRoutes(ctx context.Context, r CommandRunner) (bool, error)
- func HasIstioRedirect(ctx context.Context, r CommandRunner) (bool, error)
- func ListNonLoopbackInterfaceNames(ctx context.Context, r CommandRunner) ([]string, error)
- func Revert(ctx context.Context, runner CommandRunner, opts Opts) error
- type BlackholeOpts
- type CommandRunner
- type CorruptPackagesOpts
- type DelayOpts
- type ErrTooManyTcCommands
- type ExecutionContext
- type Filter
- type IpProto
- type LimitBandwidthOpts
- type Opts
- type PackageLossOpts
- type SidecarOpts
- type TcpResetOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CondenseNetWithPortRange ¶
func CondenseNetWithPortRange(nwps []network.NetWithPortRange, limit int) []network.NetWithPortRange
CondenseNetWithPortRange condenses a list of NetWithPortRange The way this algorithm works: 1. Sort the nwp list ascending by BaseIP and port 2. For each nwp in the list create a new nwp with the next neighbor if port-ranges are compatible 3. From the new list choose the nwp with the longest prefix length, remove all nwp witch are included in the chosen and add the chosen nwp to the result list 4. Repeat 3. until either the list is shorter than limit or no more compatible nwp are found
func HasCiliumIpRoutes ¶
func HasCiliumIpRoutes(ctx context.Context, r CommandRunner) (bool, error)
func HasIstioRedirect ¶ added in v1.6.1
func HasIstioRedirect(ctx context.Context, r CommandRunner) (bool, error)
func ListNonLoopbackInterfaceNames ¶
func ListNonLoopbackInterfaceNames(ctx context.Context, r CommandRunner) ([]string, error)
Types ¶
type BlackholeOpts ¶
type BlackholeOpts struct {
Filter
ExecutionContext
IpProto IpProto
}
func (*BlackholeOpts) String ¶
func (o *BlackholeOpts) String() string
type CommandRunner ¶
type CommandRunner interface {
// contains filtered or unexported methods
}
func NewProcessRunner ¶
func NewProcessRunner() CommandRunner
func NewRuncRunner ¶
func NewRuncRunner(r ociruntime.OciRuntime, sidecar SidecarOpts) CommandRunner
type CorruptPackagesOpts ¶
type CorruptPackagesOpts struct {
Filter
ExecutionContext
Corruption uint
Interfaces []string
}
func (*CorruptPackagesOpts) String ¶
func (o *CorruptPackagesOpts) String() string
type DelayOpts ¶
type ErrTooManyTcCommands ¶
type ErrTooManyTcCommands struct {
Count int
}
func (*ErrTooManyTcCommands) Error ¶
func (e *ErrTooManyTcCommands) Error() string
type ExecutionContext ¶
type Filter ¶
type Filter struct {
Include []network.NetWithPortRange
Exclude []network.NetWithPortRange
}
type IpProto ¶
type IpProto string
const IpProtoTcp IpProto = "tcp"
const IpProtoUdp IpProto = "udp"
type LimitBandwidthOpts ¶
type LimitBandwidthOpts struct {
Filter
ExecutionContext
Bandwidth string
Interfaces []string
}
func (*LimitBandwidthOpts) String ¶
func (o *LimitBandwidthOpts) String() string
type PackageLossOpts ¶
type PackageLossOpts struct {
Filter
ExecutionContext
Loss uint
Interfaces []string
}
func (*PackageLossOpts) String ¶
func (o *PackageLossOpts) String() string
type SidecarOpts ¶
type SidecarOpts struct {
TargetProcess ociruntime.LinuxProcessInfo
Id string
}
type TcpResetOpts ¶
type TcpResetOpts struct {
Filter
ExecutionContext
Interfaces []string
Prepend bool
UseMangleChain bool
}
func (*TcpResetOpts) String ¶
func (o *TcpResetOpts) String() string
Click to show internal directories.
Click to hide internal directories.