Versions in this module Expand all Collapse all v0 v0.4.0 Mar 28, 2017 Changes in this version + func AllPtrFieldsNil(obj interface{}) bool + func ApplyRLimitForSelf(maxOpenFiles uint64) — linux/amd64 + func ApplyRLimitForSelf(maxOpenFiles uint64) error — darwin/amd64, js/wasm, windows/amd64 + func CertPoolFromFile(filename string) (*x509.CertPool, error) + func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error) + func CompileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) + func DeadlockWatchdog(lock sync.Locker, name string, maxLockPeriod time.Duration) + func DeadlockWatchdogReadLock(lock *sync.RWMutex, name string, maxLockPeriod time.Duration) + func ExecuteTemplate(w io.Writer, templateText string, data interface{}) error + func ExecuteTemplateToString(templateText string, data interface{}) (string, error) + func FileExists(filename string) (bool, error) + func FlushLogs() + func GenerateSelfSignedCert(host, certPath, keyPath string, alternateIPs []net.IP, alternateDNS []string) error + func GetEnvAsFloat64OrFallback(key string, defaultValue float64) (float64, error) + func GetEnvAsIntOrFallback(key string, defaultValue int) (int, error) + func GetEnvAsStringOrFallback(key, defaultValue string) string + func InitFlags() + func InitLogs() + func IntPtr(i int) *int + func IntPtrDerefOr(ptr *int, def int) int + func NewCRLFWriter(w io.Writer) io.Writer + func NewLogger(prefix string) *log.Logger + func NewUUID() types.UID + func ObjectDiff(a, b interface{}) string + func ObjectGoPrintDiff(a, b interface{}) string + func ObjectGoPrintSideBySide(a, b interface{}) string + func ReadDirNoExit(dirname string) ([]os.FileInfo, []error, error) + func RunInResourceContainer(containerName string) error + func StringDiff(a, b string) string + func Umask(mask int) (old int, err error) + func UsingSystemdInitSystem() bool + func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName + func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName + type Backoff struct + Clock Clock + func NewBackOff(initial, max time.Duration) *Backoff + func (p *Backoff) GC() + func (p *Backoff) Get(id string) time.Duration + func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool + func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool + func (p *Backoff) Next(id string, eventTime time.Time) + func (p *Backoff) Reset(id string) + type BoolFlag struct + func (f *BoolFlag) Default(value bool) + func (f *BoolFlag) Set(value string) error + func (f *BoolFlag) Type() string + func (f BoolFlag) Provided() bool + func (f BoolFlag) String() string + func (f BoolFlag) Value() bool + type Cache []*cacheShard + func NewCache(maxSize int) Cache + func (c *Cache) Add(index uint64, obj interface{}) bool + func (c *Cache) Get(index uint64) (obj interface{}, found bool) + type Clock interface + After func(d time.Duration) <-chan time.Time + Now func() time.Time + Since func(time.Time) time.Duration + type ConfigurationMap map[string]string + func (*ConfigurationMap) Type() string + func (m *ConfigurationMap) Set(value string) error + func (m *ConfigurationMap) String() string + type FakeClock struct + func NewFakeClock(t time.Time) *FakeClock + func (f *FakeClock) After(d time.Duration) <-chan time.Time + func (f *FakeClock) HasWaiters() bool + func (f *FakeClock) Now() time.Time + func (f *FakeClock) SetTime(t time.Time) + func (f *FakeClock) Since(ts time.Time) time.Duration + func (f *FakeClock) Step(d time.Duration) + type GlogWriter struct + func (writer GlogWriter) Write(data []byte) (n int, err error) + type IntervalClock struct + Duration time.Duration + Time time.Time + func (*IntervalClock) After(d time.Duration) <-chan time.Time + func (i *IntervalClock) Now() time.Time + func (i *IntervalClock) Since(ts time.Time) time.Duration + type LineDelimiter struct + func NewLineDelimiter(output io.Writer, delimiter string) *LineDelimiter + func (ld *LineDelimiter) Flush() (err error) + func (ld *LineDelimiter) Write(buf []byte) (n int, err error) + type RateLimiter interface + Accept func() + Saturation func() float64 + Stop func() + TryAccept func() bool + func NewFakeAlwaysRateLimiter() RateLimiter + func NewFakeNeverRateLimiter() RateLimiter + func NewTokenBucketRateLimiter(qps float32, burst int) RateLimiter + type RealClock struct + func (RealClock) After(d time.Duration) <-chan time.Time + func (RealClock) Now() time.Time + func (RealClock) Since(ts time.Time) time.Duration + type Runner struct + func NewRunner(f ...func(stop chan struct{})) *Runner + func (r *Runner) Start() + func (r *Runner) Stop() + type StringFlag struct + func NewStringFlag(defaultVal string) StringFlag + func (f *StringFlag) Default(value string) + func (f *StringFlag) Set(value string) error + func (f *StringFlag) Type() string + func (f StringFlag) Provided() bool + func (f StringFlag) String() string + func (f StringFlag) Value() string + type Trace struct + func NewTrace(name string) *Trace + func (t *Trace) Log() + func (t *Trace) LogIfLong(threshold time.Duration) + func (t *Trace) Step(msg string) + func (t *Trace) TotalTime() time.Duration