util

package
v0.0.0-...-b01a1fc Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package util - contains a collection of different functions used across all Retrieval Provider instances.

Utility function like ones to work with time, process lifetime and binary versioning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMockedClock

func SetMockedClock(fakeTime int64)

SetMockedClock sets a fake timer

func SetRealClock

func SetRealClock()

SetRealClock ensures the real clock is in use

func SetUpCtrlCExit

func SetUpCtrlCExit(gracefulExit func())

SetUpCtrlCExit configures the program such that when Control-C is hit, gracefulExit is called, followed by program exit.

Types

type Clock

type Clock interface {
	Now() time.Time
}

Clock allows the time.Now to be mocked out for testing

func GetTimeImpl

func GetTimeImpl() Clock

GetTimeImpl returns the implementation of clock to use.

Directories

Path Synopsis
Package settings - holds configuration specific to a Retrieval Provider node.
Package settings - holds configuration specific to a Retrieval Provider node.

Jump to

Keyboard shortcuts

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