Movatterモバイル変換


[0]ホーム

URL:


watcher

package
v2.23.1Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2025 License:AGPL-3.0Imports:5Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package watcher provides file system watching capabilities for theagent. It defines an interface for monitoring file changes andimplementations that can be used to detect when configuration filesare modified. This is primarily used to track changes to devcontainerconfiguration files and notify users when containers need to berecreated to apply the new configuration.

Index

Constants

This section is empty.

Variables

View Source
var ErrClosed =xerrors.New("watcher closed")

Functions

This section is empty.

Types

typeWatcher

type Watcher interface {// Add starts watching a file for changes.Add(filestring)error// Remove stops watching a file for changes.Remove(filestring)error// Next blocks until a file system event occurs or the context is canceled.// It returns the next event or an error if the watcher encountered a problem.Next(context.Context) (*fsnotify.Event,error)// Close shuts down the watcher and releases any resources.Close()error}

Watcher defines an interface for monitoring file system changes.Implementations track file modifications and provide an event streamthat clients can consume to react to changes.

funcNewFSNotify

func NewFSNotify() (Watcher,error)

NewFSNotify creates a new file system watcher that watches parent directoriesinstead of individual files for more reliable event detection.

funcNewNoop

func NewNoop()Watcher

NewNoop creates a new watcher that does nothing.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp