util

package
v0.0.0-...-dc5648e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomID

func GenerateRandomID() string

GenerateRandomID returns an unique id

Types

type ErrorWaitGroup

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

ErrorWaitGroup is a wait group that returns the first error occured

func NewErrorWaitGroup

func NewErrorWaitGroup(size int) *ErrorWaitGroup

NewErrorWaitGroup makes a new ErrorWaitGroup of size n

func (*ErrorWaitGroup) Done

func (wg *ErrorWaitGroup) Done(err error)

Done pops a number from the wait group

func (*ErrorWaitGroup) Wait

func (wg *ErrorWaitGroup) Wait() (err error)

Wait blogs until the wait group finished and returns the error if any

func (*ErrorWaitGroup) WaitFor

func (wg *ErrorWaitGroup) WaitFor(timeout time.Duration) error

WaitFor same as Wait but with the timeout

Jump to

Keyboard shortcuts

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