clock

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock struct{}

Clock defines the application's clock.

func New

func New() *Clock

New creates a new Clock instance.

func (*Clock) Now

func (*Clock) Now() time.Time

Now returns the current time, as provided by time.Now().

type Clocker

type Clocker interface {
	Now() time.Time
}

Clocker defines the interface that clock dependencies must follow. This is used so that packages are deterministic and reproductable.

Jump to

Keyboard shortcuts

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