Documentation ¶
Index ¶
- Variables
- func AddMetric(m AnkaMetric)
- func ConvertMetricToGauge(m prometheus.Collector) (prometheus.Gauge, error)
- func ConvertMetricToGaugeVec(m prometheus.Collector) (*prometheus.GaugeVec, error)
- func ConvertToInstancesData(d interface{}) ([]types.Instance, error)
- func ConvertToNodeData(d interface{}) ([]types.Node, error)
- func ConvertToRegistryData(d interface{}) (*types.Registry, error)
- func CreateGaugeMetric(name string, help string) prometheus.Gauge
- func CreateGaugeMetricVec(name string, help string, labels []string) *prometheus.GaugeVec
- type AnkaMetric
- type BaseAnkaMetric
- type InstanceStateMetric
- type InstanceStatePerMetric
- type NodeGroupMetric
- type NodeMetric
- type NodeStatesMetric
- type NodesMetric
- type RegistryMetric
Constants ¶
This section is empty.
Variables ¶
View Source
var MetricsHolder []AnkaMetric
Functions ¶
func AddMetric ¶
func AddMetric(m AnkaMetric)
func ConvertMetricToGauge ¶
func ConvertMetricToGauge(m prometheus.Collector) (prometheus.Gauge, error)
func ConvertMetricToGaugeVec ¶
func ConvertMetricToGaugeVec(m prometheus.Collector) (*prometheus.GaugeVec, error)
func ConvertToInstancesData ¶
func ConvertToNodeData ¶
func ConvertToRegistryData ¶
func CreateGaugeMetric ¶
func CreateGaugeMetric(name string, help string) prometheus.Gauge
func CreateGaugeMetricVec ¶
func CreateGaugeMetricVec(name string, help string, labels []string) *prometheus.GaugeVec
Types ¶
type AnkaMetric ¶
type AnkaMetric interface { GetPrometheusMetric() prometheus.Collector GetEvent() events.Event GetEventHandler() func(interface{}) error }
type BaseAnkaMetric ¶
type BaseAnkaMetric struct {
// contains filtered or unexported fields
}
func (BaseAnkaMetric) GetEvent ¶
func (this BaseAnkaMetric) GetEvent() events.Event
func (BaseAnkaMetric) GetPrometheusMetric ¶
func (this BaseAnkaMetric) GetPrometheusMetric() prometheus.Collector
type InstanceStateMetric ¶
type InstanceStateMetric struct {
BaseAnkaMetric
}
func (InstanceStateMetric) GetEventHandler ¶
func (this InstanceStateMetric) GetEventHandler() func(interface{}) error
type InstanceStatePerMetric ¶
type InstanceStatePerMetric struct { BaseAnkaMetric HandleData func([]types.Instance, *prometheus.GaugeVec) }
func (InstanceStatePerMetric) GetEventHandler ¶
func (this InstanceStatePerMetric) GetEventHandler() func(interface{}) error
type NodeGroupMetric ¶
type NodeGroupMetric struct { BaseAnkaMetric HandleData func([]types.Node, []types.NodeGroup, *prometheus.GaugeVec) }
func (NodeGroupMetric) GetEventHandler ¶
func (this NodeGroupMetric) GetEventHandler() func(interface{}) error
type NodeMetric ¶
type NodeMetric struct { BaseAnkaMetric HandleData func(types.Node, *prometheus.GaugeVec, prometheus.Labels) }
TODO: can we make prometheus.GaugeVec support also .Gauge?
func (NodeMetric) GetEventHandler ¶
func (this NodeMetric) GetEventHandler() func(interface{}) error
type NodeStatesMetric ¶
type NodeStatesMetric struct { BaseAnkaMetric HandleData func([]types.Node, *prometheus.GaugeVec) }
TODO: can we make prometheus.GaugeVec support also .Gauge?
func (NodeStatesMetric) GetEventHandler ¶
func (this NodeStatesMetric) GetEventHandler() func(interface{}) error
type NodesMetric ¶
type NodesMetric struct { BaseAnkaMetric HandleData func([]types.Node, prometheus.Gauge) }
func (NodesMetric) GetEventHandler ¶
func (this NodesMetric) GetEventHandler() func(interface{}) error
type RegistryMetric ¶
type RegistryMetric struct { BaseAnkaMetric HandleData func(*types.Registry, prometheus.Gauge) }
func (RegistryMetric) GetEventHandler ¶
func (this RegistryMetric) GetEventHandler() func(interface{}) error
Click to show internal directories.
Click to hide internal directories.