util

package
v0.0.0-...-af7e2a9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandId

func RandId(idlen int) string

creates a random identifier of the specified length

func SecureRandId

func SecureRandId(idlen int) (id string, err error)

like RandId, but uses a crypto/rand for secure random identifiers

func SecureRandIdOrPanic

func SecureRandIdOrPanic(idlen int) string

Types

type Shutdown

type Shutdown struct {
	sync.Mutex
	// contains filtered or unexported fields
}

A small utility class for managing controlled shutdowns

func NewShutdown

func NewShutdown() *Shutdown

func (*Shutdown) Begin

func (s *Shutdown) Begin()

func (*Shutdown) Complete

func (s *Shutdown) Complete()

func (*Shutdown) WaitBegin

func (s *Shutdown) WaitBegin()

func (*Shutdown) WaitComplete

func (s *Shutdown) WaitComplete()

Jump to

Keyboard shortcuts

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