monitor

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMonitor

type FileMonitor struct {
	Path         string        // 监控的文件/目录路径
	Immediate    bool          // 是否立即执行命令
	Delay        time.Duration // 执行命令的延时
	OnFileChange func()        // 文件变化时的回调函数
}

FileMonitor 是文件监控组件的结构体

func NewFileMonitor

func NewFileMonitor(path string, immediate bool, delay time.Duration, onFileChange func()) *FileMonitor

NewFileMonitor 创建一个新的文件监控组件

func (*FileMonitor) Start

func (fm *FileMonitor) Start()

Start 启动文件监控服务

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL