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

Function WithClock

agent/agentgit/agentgit.go:30–34  ·  view source on GitHub ↗

WithClock sets a controllable clock for testing. Defaults to quartz.NewReal().

(c quartz.Clock)

Source from the content-addressed store, hash-verified

28// WithClock sets a controllable clock for testing. Defaults to
29// quartz.NewReal().
30func WithClock(c quartz.Clock) Option {
31 return func(h *Handler) {
32 h.clock = c
33 }
34}
35
36// WithGitBinary overrides the git binary path (for testing).
37func WithGitBinary(path string) Option {

Calls

no outgoing calls