nettool

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentTable int

Functions

This section is empty.

Types

type EIPRoute

type EIPRoute struct {
}

EIPRoute is a specified ip route which our agent use on start. Equivalent to: "ip route replace local 0/0 dev lo table"

func (*EIPRoute) Add

func (e *EIPRoute) Add() error

func (*EIPRoute) Delete

func (e *EIPRoute) Delete() error

func (*EIPRoute) IsExist

func (e *EIPRoute) IsExist() (bool, error)

func (*EIPRoute) ToNetlinkRoute

func (e *EIPRoute) ToNetlinkRoute() *netlink.Route

Equivalent to: "ip route replace local 0/0 dev lo table"

type EIPRule

type EIPRule struct {
	EIP *net.IPNet
}

EIPRule is a specified ip rule which our agent will use. Equivalent to: "ip rule from all to eip/32 lookup 101"

func NewEIPRule

func NewEIPRule(eip string, mask int) *EIPRule

func (*EIPRule) Add

func (e *EIPRule) Add() error

func (*EIPRule) Delete

func (e *EIPRule) Delete() error

func (*EIPRule) IsExist

func (e *EIPRule) IsExist() (bool, error)

func (*EIPRule) ToAgentRule

func (e *EIPRule) ToAgentRule() *netlink.Rule

Jump to

Keyboard shortcuts

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