Documentation ¶
Overview ¶
Package reconfigurer is responsible for providing configuration state to a watcher. It may acquire that state from somewhere such as a Git repository or an API. When state needs to be updated, a configuration provider will call the Watcher's SetState method. The state transition is then the reponsibility of the watcher. All a configuration provider does is acquire configuration from some source and ensure it's valid. Providers may store a fallback state if validation fails to ensure reliability.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitProvider ¶
type GitProvider struct {
// contains filtered or unexported fields
}
GitProvider implements a Provider backed by Git. It will reconfigure its watcher process upon commits to its defined configuration repository.
func New ¶
func New( directory string, hostname string, configRepo string, checkInterval time.Duration, authMethod transport.AuthMethod, ) *GitProvider
New creates a new provider with all necessary parameters
type Provider ¶
Provider describes a type that can provide config state events to a target watcher. It will reconfigure and restart the watcher whenever necessary.