Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type FileLoader ¶
type FileLoader struct {
// contains filtered or unexported fields
}
func (*FileLoader) Load ¶
func (f *FileLoader) Load(path string) (data []byte, err error)
Load load config data
func (*FileLoader) Watch ¶
func (f *FileLoader) Watch(path string) (ret *loader.WatchResult, err error)
watch path file change and reload the changed file
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
func NewFileWatcher ¶
func NewFileWatcher() (fileWatcher *FileWatcher, err error)
func (*FileWatcher) AddWatch ¶
func (w *FileWatcher) AddWatch(path string, fn EventHandler) (err error)
func (*FileWatcher) Close ¶
func (w *FileWatcher) Close()
func (*FileWatcher) RemoveWatch ¶
func (w *FileWatcher) RemoveWatch(path string)
Click to show internal directories.
Click to hide internal directories.