Documentation ¶
Index ¶
- Variables
- func GetInitiatedCollectors() map[string]Collector
- func IsNoDataError(err error) bool
- func NewApplicationCollector(cli *argo.Client) func(_ *log.Logger) (Collector, error)
- func NewCertCollectorFunc() func(*log.Logger) (Collector, error)
- func NewClusterCollector(agents *agents.ClientSet, db *database.Database) func(_ *log.Logger) (Collector, error)
- func NewEnvironmentCollector(db *database.Database) func(_ *log.Logger) (Collector, error)
- func NewPluginCollectorFunc(cluster cluster.Interface) func(*log.Logger) (Collector, error)
- type ApplicationCollector
- type BaseCollector
- type CertCollector
- type ClusterCollector
- type Collector
- type Collectorfunc
- type EnvironmentCollector
- type Handler
- type PluginCollector
- type RequestCollector
- type UserCollector
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MetricPath = utils.StrOrDef(os.Getenv("METRIC_PATH"), "/metrics") IncludeExporterMetrics = false MaxRequests = 40 )
View Source
var ErrNoData = errors.New("collector returned no data")
ErrNoData indicates the collector found no data to collect, but had no other error.
Functions ¶
func GetInitiatedCollectors ¶
func IsNoDataError ¶
func NewApplicationCollector ¶
func NewClusterCollector ¶
func NewEnvironmentCollector ¶
Types ¶
type ApplicationCollector ¶
func (*ApplicationCollector) Update ¶
func (c *ApplicationCollector) Update(ch chan<- prometheus.Metric) error
type BaseCollector ¶
type BaseCollector struct { Collectors map[string]Collector // contains filtered or unexported fields }
BaseCollector implements the prometheus.Collector interface.
func (BaseCollector) Collect ¶
func (n BaseCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (BaseCollector) Describe ¶
func (n BaseCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type CertCollector ¶
type CertCollector struct {
// contains filtered or unexported fields
}
func (*CertCollector) Update ¶
func (c *CertCollector) Update(ch chan<- prometheus.Metric) error
type ClusterCollector ¶
func (*ClusterCollector) Update ¶
func (c *ClusterCollector) Update(ch chan<- prometheus.Metric) error
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
type Collectorfunc ¶
func NewRequestCollector ¶
func NewRequestCollector() Collectorfunc
func NewUserCollector ¶
func NewUserCollector(db *database.Database) Collectorfunc
type EnvironmentCollector ¶
func (*EnvironmentCollector) Update ¶
func (c *EnvironmentCollector) Update(ch chan<- prometheus.Metric) error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler wraps an unfiltered http.Handler but uses a filtered Handler, created on the fly, if filtering is requested. Create instances with newHandler.
func NewHandler ¶
func NewHandler(namespace string, collectors map[string]Collectorfunc) *Handler
type PluginCollector ¶
type PluginCollector struct {
// contains filtered or unexported fields
}
func (*PluginCollector) Update ¶
func (c *PluginCollector) Update(ch chan<- prometheus.Metric) error
type RequestCollector ¶
type RequestCollector struct {
// contains filtered or unexported fields
}
func GetRequestCollector ¶
func GetRequestCollector() *RequestCollector
func (*RequestCollector) HandlerFunc ¶
func (rc *RequestCollector) HandlerFunc() gin.HandlerFunc
func (*RequestCollector) Update ¶
func (rc *RequestCollector) Update(ch chan<- prometheus.Metric) error
Update implements Collector
type UserCollector ¶
func (*UserCollector) Update ¶
func (c *UserCollector) Update(ch chan<- prometheus.Metric) error
Click to show internal directories.
Click to hide internal directories.