aggregator

package
v0.0.0-...-81a4f0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator struct {
	// contains filtered or unexported fields
}

func NewAggregator

func NewAggregator(logger lager.Logger, clock clock.Clock, aggregatorExecuteInterval time.Duration, saveInterval time.Duration,
	appMonitorChan chan *models.AppMonitor, getPolicies GetPoliciesFunc, saveAppMetricToCache SaveAppMetricToCacheFunc, defaultStatWindowSecs int, appMetricChan chan *models.AppMetric, appMetricDB db.AppMetricDB) (*Aggregator, error)

func (*Aggregator) Start

func (a *Aggregator) Start()

func (*Aggregator) Stop

func (a *Aggregator) Stop()

type AppManager

type AppManager struct {
	// contains filtered or unexported fields
}

func NewAppManager

func NewAppManager(logger lager.Logger, clock clock.Clock, interval time.Duration, nodeNum, nodeIndex int,
	metricCacheSizePerApp int, policyDB db.PolicyDB, appMetricDB db.AppMetricDB) *AppManager

func (*AppManager) GetPolicies

func (am *AppManager) GetPolicies() map[string]*models.AppPolicy

func (*AppManager) QueryAppMetrics

func (am *AppManager) QueryAppMetrics(appID string, metricType string, start int64, end int64, order db.OrderType) ([]*models.AppMetric, error)

func (*AppManager) SaveMetricToCache

func (am *AppManager) SaveMetricToCache(metric *models.AppMetric) bool

func (*AppManager) Start

func (am *AppManager) Start()

func (*AppManager) Stop

func (am *AppManager) Stop()

type Consumer

type Consumer func(map[string]*models.AppPolicy, chan *models.AppMonitor)

type GetPoliciesFunc

type GetPoliciesFunc func() map[string]*models.AppPolicy

type MetricPoller

type MetricPoller struct {
	// contains filtered or unexported fields
}

func NewMetricPoller

func NewMetricPoller(logger lager.Logger, metricCollectorUrl string, appChan chan *models.AppMonitor, httpClient *http.Client, appMetricChan chan *models.AppMetric) *MetricPoller

func (*MetricPoller) Start

func (m *MetricPoller) Start()

func (*MetricPoller) Stop

func (m *MetricPoller) Stop()

type QueryAppMetricsFunc

type QueryAppMetricsFunc func(appID string, metricType string, start int64, end int64, orderType db.OrderType) ([]*models.AppMetric, error)

type SaveAppMetricToCacheFunc

type SaveAppMetricToCacheFunc func(*models.AppMetric) bool

Jump to

Keyboard shortcuts

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