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

Function BaseServiceArchetype

rivershared/riversharedtest/riversharedtest.go:32–39  ·  view source on GitHub ↗

BaseServiceArchetype returns a new base service suitable for use in tests. Returns a new instance so that it's not possible to accidentally taint a shared object.

(tb testing.TB)

Source from the content-addressed store, hash-verified

30// Returns a new instance so that it's not possible to accidentally taint a
31// shared object.
32func BaseServiceArchetype(tb testing.TB) *baseservice.Archetype {
33 tb.Helper()
34
35 return &baseservice.Archetype{
36 Logger: Logger(tb),
37 Time: &TimeStub{},
38 }
39}
40
41// A pool and sync.Once to initialize it, invoked by TestTx. Once open, this
42// pool is never explicitly closed, instead closing implicitly as the package

Calls 2

LoggerFunction · 0.70
HelperMethod · 0.65

Used in the wild real call sites across dependent graphs

searching dependent graphs…