MCPcopy Index your code
hub / github.com/coder/coder / WithClock

Function WithClock

agent/agentcontainers/api.go:120–124  ·  view source on GitHub ↗

WithClock sets the quartz.Clock implementation to use. This is primarily used for testing to control time.

(clock quartz.Clock)

Source from the content-addressed store, hash-verified

118// WithClock sets the quartz.Clock implementation to use.
119// This is primarily used for testing to control time.
120func WithClock(clock quartz.Clock) Option {
121 return func(api *API) {
122 api.clock = clock
123 }
124}
125
126// WithExecer sets the agentexec.Execer implementation to use.
127func WithExecer(execer agentexec.Execer) Option {

Callers 5

TestAPIFunction · 0.92

Calls

no outgoing calls

Tested by 5

TestAPIFunction · 0.74