Documentation ¶
Overview ¶
Package surveillee manages the configuration of various entities being monitored by watches and the functions used to query them for data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
CheckForUpstreamChanges(fields ...string) (bool, bool) // returns hasChanged, isHealthy
}
Backend is an interface which all surveillee entities must implement
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
FileWatcher wraps the surveillee backend for checking changes in watched files and tracks their the md5 checksums.
func (*FileWatcher) CheckForUpstreamChanges ¶
func (w *FileWatcher) CheckForUpstreamChanges(fields ...string) (hasChanged, isHealthy bool)
CheckForUpstreamChanges computes md5sum of a file and checks whether there has been a change since the last check.
type Services ¶
Services is a structure which contains all known entities that can be monitored for changes.
type TestServer ¶
type TestServer struct { HTTPAddr string HTTPClient *http.Client // contains filtered or unexported fields }
TestServer represents a Vault server we can run our tests against. Depends on a local `vault` binary installed into our environ's PATH.
func NewTestServer ¶
func NewTestServer(httpPort int) (*TestServer, error)
NewTestServer constructs a new TestServer by including the httpPort as well.
func (*TestServer) WaitForAPI ¶
func (s *TestServer) WaitForAPI() error
WaitForAPI waits for only the agent HTTP endpoint to start responding. This is an indication that the agent has started, but will likely return before a leader is elected.
type Vault ¶
Vault wraps the secrets storage backend for the Hashicorp Vault client and tracks the state of all watched dependencies.
func (*Vault) CheckForUpstreamChanges ¶
CheckForUpstreamChanges requests the set of healthy instances of a service from Consul and checks whether there has been a change since the last check.
type VaultConfig ¶
type VaultConfig struct { Address string `mapstructure:"address"` Scheme string `mapstructure:"scheme"` Token string `mapstructure:"token"` TLS VaultTLSConfig `mapstructure:"tls"` // optional TLS settings }
VaultConfig is used to configure the creation of the Hashicorp Vault client.
type VaultTLSConfig ¶
type VaultTLSConfig struct { HTTPCACert string `mapstructure:"cafile"` HTTPCAPath string `mapstructure:"capath"` HTTPClientCert string `mapstructure:"clientcert"` HTTPClientKey string `mapstructure:"clientkey"` HTTPTLSServerName string `mapstructure:"servername"` HTTPSSLVerify bool `mapstructure:"verify"` }
VaultTLSConfig is optional TLS settings for VaultConfig.