util

package
v0.53.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicBool

type AtomicBool interface {
	Set(bool) bool
	Get() bool
}

func NewAtomicBool

func NewAtomicBool(val bool) AtomicBool

type Duration added in v0.49.0

type Duration struct {
	time.Duration
}

Duration is a serializable version version of a time.Duration it supports setting in yaml & json via: - string: 10s - float32/64, int/32/64: 10 (nanoseconds)

func (Duration) MarshalJSON added in v0.49.0

func (d Duration) MarshalJSON() ([]byte, error)

func (Duration) MarshalYAML added in v0.49.0

func (d Duration) MarshalYAML() ([]byte, error)

func (*Duration) UnmarshalJSON added in v0.49.0

func (d *Duration) UnmarshalJSON(b []byte) error

func (*Duration) UnmarshalText added in v0.51.0

func (d *Duration) UnmarshalText(text []byte) error

func (*Duration) UnmarshalYAML added in v0.49.0

func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error

type ScheduledExecutor

type ScheduledExecutor interface {
	Start()
	Stop()
}

func NewScheduledExecutor

func NewScheduledExecutor(period time.Duration, cb func()) ScheduledExecutor

Jump to

Keyboard shortcuts

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