adapters

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2019 The OpenSDS Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 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 2019 The OpenSDS Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 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 2019 The OpenSDS Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 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 2019 The OpenSDS Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 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

Constants

This section is empty.

Variables

View Source
var MetricsQueue = make(chan *model.MetricSpec, 100)

A buffered channel that we can send work requests on.

Functions

func SendMetricToRegisteredSenders

func SendMetricToRegisteredSenders(metrics *model.MetricSpec)

func StartDispatcher

func StartDispatcher()

Types

type KafkaMetricsSender

type KafkaMetricsSender struct {
	Queue    chan *model.MetricSpec
	QuitChan chan bool
}

func (*KafkaMetricsSender) AssignMetricsToSend

func (p *KafkaMetricsSender) AssignMetricsToSend(request *model.MetricSpec)

func (*KafkaMetricsSender) GetMetricsSender

func (p *KafkaMetricsSender) GetMetricsSender() MetricsSenderIntf

func (*KafkaMetricsSender) Start

func (p *KafkaMetricsSender) Start()

func (*KafkaMetricsSender) Stop

func (p *KafkaMetricsSender) Stop()

type MetricsSenderIntf

type MetricsSenderIntf interface {
	GetMetricsSender() MetricsSenderIntf
	AssignMetricsToSend(request *model.MetricSpec)
	Start()
	Stop()
}

type PrometheusMetricsSender

type PrometheusMetricsSender struct {
	Queue    chan *model.MetricSpec
	QuitChan chan bool
}

func (*PrometheusMetricsSender) AssignMetricsToSend

func (p *PrometheusMetricsSender) AssignMetricsToSend(request *model.MetricSpec)

func (*PrometheusMetricsSender) GetMetricsSender

func (p *PrometheusMetricsSender) GetMetricsSender() MetricsSenderIntf

func (*PrometheusMetricsSender) Start

func (p *PrometheusMetricsSender) Start()

func (*PrometheusMetricsSender) Stop

func (p *PrometheusMetricsSender) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL