Documentation
¶
Index ¶
- Constants
- Variables
- func GetStatusServiceConfig() (name, namespace string, err error)
- func IsNoDataError(err error) bool
- type Collector
- type DasSchiffNetworkOperatorCollector
- type Endpoint
- func (e *Endpoint) CreateMux() *http.ServeMux
- func (e *Endpoint) QueryAll(w http.ResponseWriter, r *http.Request)
- func (e *Endpoint) ShowBGP(w http.ResponseWriter, r *http.Request)
- func (e *Endpoint) ShowBGPSummary(w http.ResponseWriter, r *http.Request)
- func (e *Endpoint) ShowEVPN(w http.ResponseWriter, r *http.Request)
- func (e *Endpoint) ShowRoute(w http.ResponseWriter, r *http.Request)
- type FRRClient
Constants ¶
const ( StatusSvcNameEnv = "STATUS_SVC_NAME" StatusSvcNamespaceEnv = "STATUS_SVC_NAMESPACE" )
Variables ¶
var ErrNoData = errors.New("collector returned no data")
ErrNoData indicates the collector found no data to collect, but had no other error.
Functions ¶
func GetStatusServiceConfig ¶ added in v0.2.7
GetStatusServiceConfig gets status service's name and namespace from the environment.
func IsNoDataError ¶
Types ¶
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 NewBPFCollector ¶
func NewFRRCollector ¶
NewFRRCollector returns a new Collector exposing buddyinfo stats.
func NewNetlinkCollector ¶
NewNetlinkCollector returns a new Collector exposing buddyinfo stats.
type DasSchiffNetworkOperatorCollector ¶
DasSchiffNetworkOperatorCollector implements the prometheus.Collector interface.
func NewDasSchiffNetworkOperatorCollector ¶
func NewDasSchiffNetworkOperatorCollector(collectorConfig map[string]bool) (*DasSchiffNetworkOperatorCollector, error)
NewDasSchiffNetworkOperatorCollector creates a new DasSchiffNetworkOperatorCollector.
func (DasSchiffNetworkOperatorCollector) Collect ¶
func (n DasSchiffNetworkOperatorCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (DasSchiffNetworkOperatorCollector) Describe ¶
func (DasSchiffNetworkOperatorCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type Endpoint ¶ added in v0.2.7
func NewEndpoint ¶ added in v0.2.7
NewEndpoint creates new endpoint object.
func (*Endpoint) QueryAll ¶ added in v0.2.7
func (e *Endpoint) QueryAll(w http.ResponseWriter, r *http.Request)
QueryAll - when called, will pass the request to all nodes and return their responses.
func (*Endpoint) ShowBGP ¶ added in v0.2.7
func (e *Endpoint) ShowBGP(w http.ResponseWriter, r *http.Request)
ShowBGP returns a result of show bgp command. show bgp (vrf <vrf>) ipv4/ipv6 unicast <input> (longer-prefixes). show bgp vrf <all|vrf> summary.
func (*Endpoint) ShowBGPSummary ¶ added in v0.2.7
func (e *Endpoint) ShowBGPSummary(w http.ResponseWriter, r *http.Request)
ShowBGPSummary returns result of show bgp vrf <all|vrf> summary command.