tc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIRECTION_INGRESS = "ingress"
	DIRECTION_EGRESS  = "egress"
)

Variables

View Source
var BANDWIDTH_REGEXP *regexp.Regexp

Functions

func Addrule

func Addrule(rule *types.TrafficShappingRule, tc TC)

func BuildRule

func BuildRule(podIP net.IP, id string, bandwidth string) *types.TrafficShappingRule

func Delrule

func Delrule(rule *types.TrafficShappingRule, tc TC)

func GenerateRuleID

func GenerateRuleID(direction, podID string) string

Types

type NullTC

type NullTC struct {
}

func (*NullTC) AddRule

func (n *NullTC) AddRule(rule *types.TrafficShappingRule) error

func (*NullTC) DeleteRule

func (n *NullTC) DeleteRule(rule *types.TrafficShappingRule) error

type System

type System struct {
	Interface string
	Direction string
}

func (*System) AddRule

func (s *System) AddRule(rule *types.TrafficShappingRule) error

func (*System) DeleteRule

func (s *System) DeleteRule(rule *types.TrafficShappingRule) error

type TC

type TC interface {
	AddRule(rule *types.TrafficShappingRule) error
	DeleteRule(rule *types.TrafficShappingRule) error
}

func NewNull

func NewNull() TC

func NewSystem

func NewSystem(iface string, direction string) (TC, error)

Jump to

Keyboard shortcuts

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