common

package
v0.0.0-...-a420e69 Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

Types

type Clock

type Clock interface {
	Now() time.Time
	AfterFunc(time.Duration, func()) *time.Timer
}

func NewRealClock

func NewRealClock() Clock

type MockClock

type MockClock struct {
	mock.Mock
	// contains filtered or unexported fields
}

func NewFrozenClock

func NewFrozenClock() *MockClock

func NewMockClock

func NewMockClock() *MockClock

func (*MockClock) Advance

func (m *MockClock) Advance(d time.Duration) *MockClock

func (*MockClock) AfterFunc

func (m *MockClock) AfterFunc(d time.Duration, f func()) *time.Timer

func (*MockClock) Freeze

func (m *MockClock) Freeze() *MockClock

func (*MockClock) Now

func (m *MockClock) Now() time.Time

type RealClock

type RealClock struct {
}

func (*RealClock) AfterFunc

func (r *RealClock) AfterFunc(d time.Duration, f func()) *time.Timer

func (*RealClock) Now

func (r *RealClock) Now() time.Time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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