 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileContentWatcher ¶
type FileContentWatcher interface {
	// Start a routine to watch for file content changes. It will be stopped when context finishes
	Start(ctx context.Context)
	// IsChanged returns true if file content has been changed since last read
	IsChanged() bool
	// ReadAll tries to read all content from file
	ReadAll() ([]byte, error)
}
    func NewFileContentWatcher ¶
func NewFileContentWatcher(filePath string, log logging.Logger) (FileContentWatcher, error)
NewFileContentWatcher returns FileContentWatcher, which tracks changes in file Returns error if filePath is a directory. Caller must Close() the watcher once work finished.
 Click to show internal directories. 
   Click to hide internal directories.