common

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log *logrus.Logger
)

Functions

func Assert added in v0.11.0

func Assert(test bool)

Assert test is true, panic otherwise

func CheckFatal added in v0.10.0

func CheckFatal(e error)

func CheckWarn added in v0.10.0

func CheckWarn(e error)

func ConfigureARPforVeths added in v1.6.0

func ConfigureARPforVeths(processID int, prefix string) error

Do post-attach configuration of all veths we have created

func ErrorMessages added in v1.1.0

func ErrorMessages(errors []error) string

func LogLogger added in v1.5.0

func LogLogger() *log.Logger

func LoggingHTTPHandler added in v1.6.0

func LoggingHTTPHandler(h http.Handler) http.Handler

func SetLogLevel added in v1.1.0

func SetLogLevel(levelname string)

func SignalHandlerLoop added in v0.11.0

func SignalHandlerLoop(ss ...SignalReceiver)

Types

type NetDev added in v1.5.0

type NetDev struct {
	Name  string
	MAC   net.HardwareAddr
	CIDRs []*net.IPNet
}

func FindNetDevs added in v1.5.0

func FindNetDevs(processID int, match func(link netlink.Link) bool) ([]NetDev, error)

Search the network namespace of a process for interfaces matching a predicate Note that the predicate is called while the goroutine is inside the process' netns

func GetBridgeNetDev added in v1.5.0

func GetBridgeNetDev(bridgeName string) ([]NetDev, error)

Get the weave bridge interface

func GetWeaveNetDevs added in v1.5.0

func GetWeaveNetDevs(processID int) ([]NetDev, error)

Lookup the weave interface of a container

type SignalReceiver added in v0.11.0

type SignalReceiver interface {
	Stop() error
}

A subsystem/server/... that can be stopped or queried about the status with a signal

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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