clockmodule

package
v0.0.0-...-0fadc07 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initializer

func Initializer(_ context.Context) (inject.Injector, inject.Releaser, error)

Initializer is a Clock initializer.

func SingletonInjectorFactory

func SingletonInjectorFactory(clk Clock) inject.Injector

SingletonInjectorFactory always injects the given Clock.

Types

type Clock

type Clock clocklib.Clock

Clock describes a clock.

func Get

func Get(ctx context.Context) Clock

Get returns the Clock, or nil if not found.

func MustGet

func MustGet(ctx context.Context) Clock

MustGet returns the Clock, panics if not found.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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