Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTimeout = errors.New("probe timed out")
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages a collection of Probers the check connectivity to AppCat services.
func NewManager ¶
func (Manager) Collector ¶
func (m Manager) Collector() prometheus.Collector
Collector returns the histogram to store the probe results
func (Manager) StartProbe ¶
StartProbe will send a probe once every second using the provided prober. If a prober with the same ProbeInfo already runs, it will stop the running prober.
type PostgreSQL ¶
type PostgreSQL struct { Service string Instance string Namespace string Organization string ServiceLevel string // contains filtered or unexported fields }
PostgreSQL is a prober to test the uptime of a PostgreSQL instance.
func NewFailingPostgreSQL ¶
func NewFailingPostgreSQL(service, name, namespace string) (*PostgreSQL, error)
NewFailingPostgreSQL creates a prober that will fail. Can be used if the controller can't access valid credentials.
func NewPostgreSQL ¶
func NewPostgreSQL(service, name, namespace, dsn, organization, sla string, ops ...func(*pgxpool.Config) error) (*PostgreSQL, error)
NewPostgreSQL connects to the provided dsn and returns a prober
func (PostgreSQL) Close ¶
func (p PostgreSQL) Close() error
Close closes open connections to the PostgreSQL server.
func (PostgreSQL) GetInfo ¶
func (p PostgreSQL) GetInfo() ProbeInfo
GetInfo returns the prober infos
type ProbeInfo ¶
type ProbeInfo struct { Service string Name string Namespace string Organization string ServiceLevel string }
ProbeInfo contains meta information on a prober and in turn an AppCat service