collector

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCollector

func NewCollector(logger lager.Logger, refreshInterval time.Duration, collectInterval time.Duration, PersistMetrics bool, saveInterval time.Duration,
	nodeIndex, nodeNum int, metricCacheSizePerApp int, policyDb db.PolicyDB, instancemetricsDb db.InstanceMetricsDB,
	cclock clock.Clock, metricsChan <-chan *models.AppInstanceMetric) *metricCollector

func NewEnvelopeProcessor

func NewEnvelopeProcessor(logger lager.Logger, collectInterval time.Duration, clock clock.Clock, processsorIndex, numProcesssors int,
	envelopeChan <-chan *loggregator_v2.Envelope, metricChan chan<- *models.AppInstanceMetric, getAppIDs func() map[string]bool) *envelopeProcessor

func NewServer

func NewServer(logger lager.Logger, serverConfig *ServerConfig, query MetricQueryFunc, httpStatusCollector healthendpoint.HTTPStatusCollector) (ifrit.Runner, error)

func NewWSMessageHandler

func NewWSMessageHandler(logger lager.Logger, envelopeChannels []chan *loggregator_v2.Envelope, keepAlive time.Duration) *wsMessageHandler

func NewWSServer

func NewWSServer(logger lager.Logger, tls models.TLSCerts, port int, keepAlive time.Duration, envelopeChannels []chan *loggregator_v2.Envelope, httpStatusCollector healthendpoint.HTTPStatusCollector) (ifrit.Runner, error)

Types

type EnvelopeProcessor

type EnvelopeProcessor interface {
	Start()
	Stop()
}

type KeepAlive

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

func NewKeepAlive

func NewKeepAlive(lock *sync.Mutex, conn *websocket.Conn, keepAliveInterval time.Duration) *KeepAlive

func (*KeepAlive) Run

func (k *KeepAlive) Run()

type MetricCollector

type MetricCollector interface {
	Start()
	Stop()
	GetAppIDs() map[string]bool
	QueryMetrics(string, int, string, int64, int64, db.OrderType) ([]*models.AppInstanceMetric, error)
	QueryMetricsWithLabels(string, int64, int64, db.OrderType, map[string]string) ([]*models.AppInstanceMetric, bool)
}

type MetricHandler

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

func NewMetricHandler

func NewMetricHandler(logger lager.Logger, nodeIndex int, nodeAdds []string, query MetricQueryFunc) *MetricHandler

func (*MetricHandler) GetMetricHistories

func (h *MetricHandler) GetMetricHistories(w http.ResponseWriter, r *http.Request, vars map[string]string)

type MetricQueryFunc

type MetricQueryFunc func(appID string, instanceIndex int, name string,
	start, end int64, order db.OrderType) ([]*models.AppInstanceMetric, error)

type ServerConfig

type ServerConfig struct {
	Port      int             `yaml:"port"`
	TLS       models.TLSCerts `yaml:"tls"`
	NodeAddrs []string        `yaml:"node_addrs"`
	NodeIndex int             `yaml:"node_index"`
}

ServerConfig a type to wrap both the config.ServerConfig and config.Config data.

func FromConfig

func FromConfig(config *config.Config) ServerConfig

type VarsFunc

type VarsFunc func(w http.ResponseWriter, r *http.Request, vars map[string]string)

func (VarsFunc) ServeHTTP

func (vh VarsFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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