Documentation ¶
Index ¶
Constants ¶
View Source
const BufferMaxDuration = 10 * time.Second
BufferMaxDuration prevents excessive delays when bundling together file changes by emitting an event to the channel if the threshold is reached even if new file changes are still coming in.
View Source
const BufferMinRestDuration = 200 * time.Millisecond
BufferMinRestDuration bundles many file changes together by waiting a short amount of time after a file change before emitting an event to the channel.
200ms is not the result of any kind of research or experimentation it might end up being a significant part of deployment delay, if we get the total latency <2s it might also be long enough that it misses some changes if the user has some operation involving a large file
(e.g., a binary dependency in git), but that's hopefully less of a problem since we'd get it in the next build
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FakeMultiWatcher ¶
type FakeMultiWatcher struct { Events chan watch.FileEvent Errors chan error // contains filtered or unexported fields }
func NewFakeMultiWatcher ¶
func NewFakeMultiWatcher() *FakeMultiWatcher
type FakeTimerMaker ¶
type FakeTimerMaker struct { RestTimerLock *sync.Mutex MaxTimerLock *sync.Mutex // contains filtered or unexported fields }
func MakeFakeTimerMaker ¶
func MakeFakeTimerMaker(t *testing.T) FakeTimerMaker
func (FakeTimerMaker) Maker ¶
func (f FakeTimerMaker) Maker() TimerMaker
type FakeWatcher ¶
type FakeWatcher struct {
// contains filtered or unexported fields
}
func NewFakeWatcher ¶
func NewFakeWatcher(inboundCh chan watch.FileEvent, errorCh chan error, paths []string, ignore watch.PathMatcher) *FakeWatcher
func (*FakeWatcher) Close ¶
func (w *FakeWatcher) Close() error
func (*FakeWatcher) Errors ¶
func (w *FakeWatcher) Errors() chan error
func (*FakeWatcher) Events ¶
func (w *FakeWatcher) Events() chan watch.FileEvent
func (*FakeWatcher) QueuedCount ¶ added in v0.23.0
func (w *FakeWatcher) QueuedCount() int
func (*FakeWatcher) Start ¶
func (w *FakeWatcher) Start() error
func (*FakeWatcher) TotalEventCount ¶ added in v0.23.0
func (w *FakeWatcher) TotalEventCount() uint64
type TimerMaker ¶
func ProvideTimerMaker ¶
func ProvideTimerMaker() TimerMaker
type WatcherMaker ¶
type WatcherMaker func(paths []string, ignore watch.PathMatcher, l logger.Logger) (watch.Notify, error)
func ProvideWatcherMaker ¶
func ProvideWatcherMaker() WatcherMaker
Click to show internal directories.
Click to hide internal directories.