MCPcopy Index your code
hub / github.com/riverqueue/river / TimeStub

Struct TimeStub

rivershared/riversharedtest/riversharedtest.go:242–245  ·  view source on GitHub ↗

TimeStub implements baseservice.TimeGeneratorWithStub to allow time to be stubbed in tests. It exists separately from rivertest.TimeStub to avoid a circular dependency.

Source from the content-addressed store, hash-verified

240//
241// It exists separately from rivertest.TimeStub to avoid a circular dependency.
242type TimeStub struct {
243 mu sync.RWMutex
244 now *time.Time
245}
246
247func (t *TimeStub) Now() time.Time {
248 t.mu.RLock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected