netio

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mbit = 1000 * 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EgressShaper

type EgressShaper struct {
	// contains filtered or unexported fields
}

ipset config: Name: caelus-offline-eth0 Type: hash:ip Revision: 1 Header: family inet hashsize 1024 maxelem 65536 Size in memory: 184 References: 1 Members: 192.168.2.27 192.168.2.28

func NewEgressShaper

func NewEgressShaper(ifName string) (*EgressShaper, error)

NewEgressShaper creates an EgressShaper

func (*EgressShaper) EnsureEgressOfCgroup

func (s *EgressShaper) EnsureEgressOfCgroup(pathInSubSystems []string) error

EnsureEgressOfCgroup ensure egress traffic limit for given cgroup paths

func (*EgressShaper) EnsureEgressOfIPs

func (s *EgressShaper) EnsureEgressOfIPs(ipStrs []string) error

EnsureEgressOfIPs ensure egress traffic limit for given ip list

func (*EgressShaper) ReconcileInterface

func (s *EgressShaper) ReconcileInterface() error

ReconcileInterface creates htb qdisc and htb class

Jump to

Keyboard shortcuts

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