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 GetInitiatedCollectors() map[string]Collector
func IsNoDataError ¶
func IsNoDataError(err error) bool
func NewApplicationCollector ¶
func NewApplicationCollector(cli *argo.Client) func(_ *log.Logger) (Collector, error)
func NewCertCollectorFunc ¶
func NewCertCollectorFunc() func(*log.Logger) (Collector, error)
func NewClusterCollector ¶
func NewClusterCollector(agents *agents.ClientSet, db *database.Database) func(_ *log.Logger) (Collector, error)
func NewEnvironmentCollector ¶
func NewEnvironmentCollector(db *database.Database) func(_ *log.Logger) (Collector, error)
func NewPluginCollectorFunc ¶
func NewPluginCollectorFunc(cluster cluster.Interface) func(*log.Logger) (Collector, error)
Types ¶
type ApplicationCollector ¶
type ApplicationCollector struct {
*argo.Client
// contains filtered or unexported fields
}
type BaseCollector ¶
type BaseCollector struct {
Collectors map[string]Collector
// contains filtered or unexported fields
}
BaseCollector implements the prometheus.Collector interface.
type CertCollector ¶
type CertCollector struct {
// contains filtered or unexported fields
}
type ClusterCollector ¶
type ClusterCollector struct {
*database.Database
// contains filtered or unexported fields
}
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.
func NewCertCollector ¶
func NewCertCollector(_ *log.Logger) (Collector, error)
func NewPluginCollector ¶
func NewPluginCollector(_ *log.Logger, clus cluster.Interface) (Collector, error)
type Collectorfunc ¶
type Collectorfunc func(logger *log.Logger) (Collector, error)
func NewRequestCollector ¶
func NewRequestCollector() Collectorfunc
func NewUserCollector ¶
func NewUserCollector(db *database.Database) Collectorfunc
type EnvironmentCollector ¶
type EnvironmentCollector struct {
*database.Database
// contains filtered or unexported fields
}
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
}
type RequestCollector ¶
type RequestCollector struct {
// contains filtered or unexported fields
}
func GetRequestCollector ¶
func GetRequestCollector() *RequestCollector
func (*RequestCollector) HandlerFunc ¶
func (rc *RequestCollector) HandlerFunc() gin.HandlerFunc
type UserCollector ¶
type UserCollector struct {
*database.Database
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.