common

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 3 Imported by: 150

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]CaptureType{}
)

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 CaptureType added in v0.7.0

type CaptureType struct {
	Allowed []string
	Default string
}

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