timestamper

package
v4.12.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

An interface to get a unix time stamp (in seconds) with an included mock that can be pre-loaded with timestamps for predictable unit test output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITimeStamper

type ITimeStamper interface {
	GetTimeNowSec() int64
}

type MockTimeNowStamper

type MockTimeNowStamper struct {
	QueuedTimeStamps []int64
}

func (*MockTimeNowStamper) GetTimeNowSec

func (ts *MockTimeNowStamper) GetTimeNowSec() int64

GetTimeNowSec - Returns unix time now in seconds

type UnixTimeNowStamper

type UnixTimeNowStamper struct {
}

func (*UnixTimeNowStamper) GetTimeNowSec

func (ts *UnixTimeNowStamper) GetTimeNowSec() int64

GetTimeNowSec - Returns unix time now in seconds

Jump to

Keyboard shortcuts

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