Documentation ¶
Overview ¶
****************************************************************************** * * Copyright 2018 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You should have received a copy of the License along with this * program. If not, you may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************
****************************************************************************** * * Copyright 2018 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You should have received a copy of the License along with this * program. If not, you may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************
Index ¶
- func New(ctx context.Context, o config.Options, l log.Logger) *discovery
- func NewLabels(p *gophercloud.ProviderClient, l log.Logger) (*labels, error)
- func Register(name string, factory DiscoveryFactory) (err error)
- func UnmarshalHandler(discIn, discOut, values interface{}) error
- type Discovery
- type DiscoveryFactory
- type IronicDiscovery
- func (d *IronicDiscovery) GetAdapter() adapter.Adapter
- func (s *IronicDiscovery) GetName() string
- func (d *IronicDiscovery) GetOutputFile() string
- func (d *IronicDiscovery) Lock()
- func (d *IronicDiscovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
- func (d *IronicDiscovery) Targets() map[string]int
- func (d *IronicDiscovery) Unlock()
- func (d *IronicDiscovery) Up() bool
- type MetricsCollector
- type NetboxDiscovery
- func (sd *NetboxDiscovery) GetAdapter() adapter.Adapter
- func (sd *NetboxDiscovery) GetName() string
- func (sd *NetboxDiscovery) GetOutputFile() string
- func (sd *NetboxDiscovery) Lock()
- func (sd *NetboxDiscovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
- func (sd *NetboxDiscovery) Targets() map[string]int
- func (sd *NetboxDiscovery) Unlock()
- func (sd *NetboxDiscovery) Up() bool
- type Server
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLabels ¶
func NewLabels(p *gophercloud.ProviderClient, l log.Logger) (*labels, error)
func Register ¶
func Register(name string, factory DiscoveryFactory) (err error)
func UnmarshalHandler ¶
func UnmarshalHandler(discIn, discOut, values interface{}) error
Types ¶
type Discovery ¶
type Discovery interface { Up() bool Targets() map[string]int GetName() string Lock() Unlock() Run(ctx context.Context, ch chan<- []*targetgroup.Group) GetOutputFile() string GetAdapter() adapter.Adapter }
type DiscoveryFactory ¶
type IronicDiscovery ¶
type IronicDiscovery struct {
// contains filtered or unexported fields
}
func (*IronicDiscovery) GetAdapter ¶
func (d *IronicDiscovery) GetAdapter() adapter.Adapter
func (*IronicDiscovery) GetName ¶
func (s *IronicDiscovery) GetName() string
func (*IronicDiscovery) GetOutputFile ¶
func (d *IronicDiscovery) GetOutputFile() string
func (*IronicDiscovery) Lock ¶
func (d *IronicDiscovery) Lock()
func (*IronicDiscovery) Run ¶
func (d *IronicDiscovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
func (*IronicDiscovery) Targets ¶
func (d *IronicDiscovery) Targets() map[string]int
func (*IronicDiscovery) Unlock ¶
func (d *IronicDiscovery) Unlock()
func (*IronicDiscovery) Up ¶
func (d *IronicDiscovery) Up() bool
type MetricsCollector ¶
type MetricsCollector struct {
// contains filtered or unexported fields
}
func NewMetricsCollector ¶
func NewMetricsCollector(a adapter.Adapter, d Discovery, v string) *MetricsCollector
func (*MetricsCollector) Collect ¶
func (c *MetricsCollector) Collect(ch chan<- prometheus.Metric)
func (*MetricsCollector) Describe ¶
func (c *MetricsCollector) Describe(ch chan<- *prometheus.Desc)
type NetboxDiscovery ¶
type NetboxDiscovery struct {
// contains filtered or unexported fields
}
func (*NetboxDiscovery) GetAdapter ¶
func (sd *NetboxDiscovery) GetAdapter() adapter.Adapter
func (*NetboxDiscovery) GetName ¶
func (sd *NetboxDiscovery) GetName() string
func (*NetboxDiscovery) GetOutputFile ¶
func (sd *NetboxDiscovery) GetOutputFile() string
func (*NetboxDiscovery) Lock ¶
func (sd *NetboxDiscovery) Lock()
func (*NetboxDiscovery) Run ¶
func (sd *NetboxDiscovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
func (*NetboxDiscovery) Targets ¶
func (sd *NetboxDiscovery) Targets() map[string]int
func (*NetboxDiscovery) Unlock ¶
func (sd *NetboxDiscovery) Unlock()
func (*NetboxDiscovery) Up ¶
func (sd *NetboxDiscovery) Up() bool