util

package
v0.58.9 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 8 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() (interface{}, 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

type URL added in v0.56.0

type URL struct {
	*url.URL
}

URL is a serializable version version of a url.URL it supports serialization in yaml and json

func (URL) MarshalJSON added in v0.56.0

func (u URL) MarshalJSON() ([]byte, error)

func (URL) MarshalYAML added in v0.56.0

func (u URL) MarshalYAML() (interface{}, error)

func (*URL) UnmarshalJSON added in v0.56.0

func (u *URL) UnmarshalJSON(b []byte) error

func (*URL) UnmarshalYAML added in v0.56.0

func (u *URL) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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