time

package
v1.187.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// Timeout as a general guidance of the maximum time any operation should take.
	Timeout = 30 * time.Second

	// Backoff as a general guidance of the scalar time any retry should take.
	Backoff = 100 * time.Millisecond
)

Variables

Module for fx.

Functions

func IsEnabled added in v1.176.0

func IsEnabled(cfg *Config) bool

IsEnabled for time.

func MustParseDuration added in v1.150.0

func MustParseDuration(s string) time.Duration

MustParseDuration for time.

Types

type Config added in v1.176.0

type Config struct {
	Kind string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
	Host string `yaml:"host,omitempty" json:"host,omitempty" toml:"host,omitempty"`
}

Config for time.

func (*Config) IsNTP added in v1.179.0

func (c *Config) IsNTP() bool

IsNTP for configuration.

func (*Config) IsNTS added in v1.179.0

func (c *Config) IsNTS() bool

IsNTS for configuration.

type Network added in v1.179.0

type Network interface {
	// Now from the network.
	Now() (time.Time, error)
}

Network for time.

func NewNetwork added in v1.179.0

func NewNetwork(cfg *Config) Network

NewNetwork for time.

Jump to

Keyboard shortcuts

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