Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitWatcher ¶
type GitWatcher struct {
// contains filtered or unexported fields
}
GitWatcher implements a Watcher for monitoring Git repositories and executing tasks associated with those Git repositories when they receive commits.
func NewGitWatcher ¶
func NewGitWatcher( directory string, bus chan task.ExecutionTask, checkInterval time.Duration, secrets secret.Store, ) *GitWatcher
NewGitWatcher creates a new watcher with all necessary parameters
func (*GitWatcher) GetState ¶
func (w *GitWatcher) GetState() config.State
GetState implements Watcher
func (*GitWatcher) SetState ¶
func (w *GitWatcher) SetState(state config.State) error
SetState implements Watcher Upon state being updated, the watcher dispatches an event to its own channel to instruct the daemon loop to reconfigure. The reason for this is that loop keeps the whole system in sync, so reconfigurations don't happen mid way through a target event.
func (*GitWatcher) Start ¶
func (w *GitWatcher) Start() error
Start runs the watcher loop and blocks until a fatal error occurs
type MockWatcher ¶
type MockWatcher struct {
// contains filtered or unexported fields
}
func (*MockWatcher) GetState ¶
func (m *MockWatcher) GetState() config.State
Click to show internal directories.
Click to hide internal directories.