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

Function WithWatcher

agent/agentcontainers/api.go:273–277  ·  view source on GitHub ↗

WithWatcher sets the file watcher implementation to use. By default a noop watcher is used. This can be used in tests to modify the watcher behavior or to use an actual file watcher (e.g. fsnotify).

(w watcher.Watcher)

Source from the content-addressed store, hash-verified

271// noop watcher is used. This can be used in tests to modify the watcher
272// behavior or to use an actual file watcher (e.g. fsnotify).
273func WithWatcher(w watcher.Watcher) Option {
274 return func(api *API) {
275 api.watcher = w
276 }
277}
278
279// WithFileSystem sets the file system used for discovering projects.
280func WithFileSystem(fileSystem afero.Fs) Option {

Calls

no outgoing calls