Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func NewMonitor(config MonitorConfig) (*Monitor, error)
NewMonitor creates and initializes a new Monitor.
type MonitorConfig ¶
type MonitorConfig struct { // The URL of the Prometheus server to query. PrometheusURL string // The time interval in milliseconds to wait before querying again. UpdateIntervalMs int // The slice of queries to run. Queries []prometheus.Query }
MonitorConfig holds the necessary information to create a Monitor.
func (MonitorConfig) IsValid ¶
func (c MonitorConfig) IsValid() error
IsValid checks whether a MonitorConfig is valid or not. Returns an error if the validation fails.
Click to show internal directories.
Click to hide internal directories.