Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRandom ¶
DefaultRandom returns crypto randomness or a deterministic reader when hooks are enabled.
Types ¶
type BrowserOpener ¶
BrowserOpener opens a URL in the user's browser.
func DefaultBrowserOpener ¶
func DefaultBrowserOpener() BrowserOpener
DefaultBrowserOpener returns the platform browser opener or a no-op opener when hooks are enabled.
type Clock ¶
Clock provides the current time.
func DefaultClock ¶
func DefaultClock() Clock
DefaultClock returns the production clock or a frozen test clock when hooks are enabled.
type FixedClock ¶
type FixedClock struct {
// contains filtered or unexported fields
}
FixedClock is a concurrency-safe clock for tests.
func NewFixedClock ¶
func NewFixedClock(t time.Time) *FixedClock
NewFixedClock returns a clock fixed at t.
func (*FixedClock) Advance ¶
func (f *FixedClock) Advance(d time.Duration)
Advance moves the clock forward by d.
func (*FixedClock) Now ¶
func (f *FixedClock) Now() time.Time
Now returns the clock's current fixed time.
type HTTPDoer ¶
HTTPDoer executes HTTP requests.
func DefaultHTTPDoer ¶
func DefaultHTTPDoer() HTTPDoer
DefaultHTTPDoer returns the production HTTP client.
type ListenerFactory ¶
ListenerFactory creates a network listener bound to an address.
func DefaultListener ¶
func DefaultListener() ListenerFactory
DefaultListener returns the production TCP listener factory.