common

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	StoppedState = iota
	RunningState
	StoppingState
)

Variables

View Source
var (
	CantCompareInterface error = errors.New("Can't compare interface")
	CaptureTypes               = map[string]map[string][]string{
		"ovsbridge": {"allowed": {"ovssflow"}, "default": {"ovssflow"}},
		"device":    {"allowed": {"afpacket", "pcap"}, "default": {"afpacket"}},
		"internal":  {"allowed": {"afpacket", "pcap"}, "default": {"afpacket"}},
		"veth":      {"allowed": {"afpacket", "pcap"}, "default": {"afpacket"}},
		"tun":       {"allowed": {"afpacket", "pcap"}, "default": {"afpacket"}},
		"bridge":    {"allowed": {"afpacket", "pcap"}, "default": {"afpacket"}},
	}
)

Functions

func CrossTypeCompare added in v0.5.0

func CrossTypeCompare(a interface{}, b interface{}) (int, error)

func CrossTypeEqual

func CrossTypeEqual(a interface{}, b interface{}) bool

func IsCaptureAllowed added in v0.5.0

func IsCaptureAllowed(nodeType string) bool

func MaxInt64

func MaxInt64(a, b int64) int64

func MinInt64

func MinInt64(a, b int64) int64

func Retry

func Retry(fnc func() error, try int, delay time.Duration) error

Retry tries to execute the given function until a success applying a delay between each try

Types

type Iterator added in v0.6.0

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

func NewIterator added in v0.6.0

func NewIterator(values ...int64) (it *Iterator)

func (*Iterator) Done added in v0.6.0

func (it *Iterator) Done() bool

func (*Iterator) Next added in v0.6.0

func (it *Iterator) Next() bool

Jump to

Keyboard shortcuts

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