Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowDotFiles ¶ added in v0.2.0
func AllowDotFiles(l *Loader)
func IgnoreDotFiles ¶ added in v0.2.0
func IgnoreDotFiles(l *Loader)
Types ¶
type DirectoryRefresher ¶ added in v0.1.3
type DirectoryRefresher struct {
// contains filtered or unexported fields
}
func (*DirectoryRefresher) ShouldRefresh ¶ added in v0.1.3
func (d *DirectoryRefresher) ShouldRefresh(path string, op FileSystemOp) bool
func (*DirectoryRefresher) WatchDirectory ¶ added in v0.1.3
func (d *DirectoryRefresher) WatchDirectory(runtimePath string, appDirPath string) string
func (*DirectoryRefresher) WatchFileSystemOps ¶ added in v0.3.0
func (d *DirectoryRefresher) WatchFileSystemOps(fsops ...FileSystemOp)
type FileSystemOp ¶ added in v0.1.3
type FileSystemOp int32
const ( Create FileSystemOp = iota Write Remove Rename Chmod )
Filesystem operations that are monitored for changes
type IFace ¶
type IFace interface {
// @return Snapshot the current snapshot. This reference is safe to use forever, but will grow
// stale so should not be stored beyond when it is immediately needed.
Snapshot() snapshot.IFace
// Add a channel that will be written to when a new snapshot is available. "1" will be written
// to the channel as a sentinel.
// @param callback supplies the callback to add.
AddUpdateCallback(callback chan<- int)
}
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Implementation of Loader that watches a symlink and reads from the filesystem.
func (*Loader) AddUpdateCallback ¶
type Nil ¶
type Nil struct {
// contains filtered or unexported fields
}
Implementation of Loader with no backing store.
func (Nil) AddUpdateCallback ¶
type Refresher ¶ added in v0.1.3
type Refresher interface {
// @return The directory path to watch for changes.
// @param runtimePath The root of the runtime path
// @param appDirPath Any app specific path
WatchDirectory(runtimePath string, appDirPath string) string
// @return If the runtime needs to be refreshed
// @param path The path that triggered the FileSystemOp
// @param The Filesystem op that happened on the directory returned from WatchDirectory
ShouldRefresh(path string, op FileSystemOp) bool
}
A Refresher is used to determine when to refresh the runtime
type SymlinkRefresher ¶ added in v0.1.3
type SymlinkRefresher struct {
RuntimePath string
}
func (*SymlinkRefresher) ShouldRefresh ¶ added in v0.1.3
func (s *SymlinkRefresher) ShouldRefresh(path string, op FileSystemOp) bool
func (*SymlinkRefresher) WatchDirectory ¶ added in v0.1.3
func (s *SymlinkRefresher) WatchDirectory(runtimePath string, appDirPath string) string
Click to show internal directories.
Click to hide internal directories.