startup

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

Timer contains references to dependencies required by the startup timer implementation.

func NewStartUpTimer

func NewStartUpTimer(serviceKey string) Timer

NewStartUpTimer is a factory method that returns an initialized Timer receiver struct.

func NewTimer

func NewTimer(duration int, interval int) Timer

NewTimer is a factory method that returns a Timer initialized with passed in duration and interval.

func (Timer) HasNotElapsed

func (t Timer) HasNotElapsed() bool

HasNotElapsed returns whether or not the duration specified during construction has elapsed.

func (Timer) RemainingAsString

func (t Timer) RemainingAsString() string

RemainingAsString returns the time remaining on the timer as a string.

func (Timer) SinceAsString

func (t Timer) SinceAsString() string

SinceAsString returns the time since the timer was created as a string.

func (Timer) SleepForInterval

func (t Timer) SleepForInterval()

SleepForInterval pauses execution for the interval specified during construction.

Jump to

Keyboard shortcuts

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