util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 10 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSchema added in v1.0.0

func BuildSchema(model interface{}) map[string]interface{}

BuildSchema

func MakeNodeName added in v1.0.0

func MakeNodeName(name, role string) string

func RandomString

func RandomString(n int) string

RandomString generates random string with reservoir sampling algorithm https://en.wikipedia.org/wiki/Reservoir_sampling

func RecurseSchema added in v1.0.0

func RecurseSchema(schema map[string]interface{}, obj interface{})

RecurseSchema

func WaitFor

func WaitFor(ctx context.Context, desc string, period time.Duration, fn func() (bool, error)) error

WaitFor event using context

Types

type Stringer added in v1.0.0

type Stringer interface {
	String() string
}

Jump to

Keyboard shortcuts

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