metricsmanager

package
v0.0.0-...-a002913 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package metricsmanager contains the implementation of an api endpoint for calling metrics functions in state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsManager

type MetricsManager interface {
	CleanupOldMetrics(arg params.Entities) (params.ErrorResults, error)
	SendMetrics(args params.Entities) (params.ErrorResults, error)
}

MetricsManager defines the methods on the metricsmanager API end point.

type MetricsManagerAPI

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

MetricsManagerAPI implements the metrics manager interface and is the concrete implementation of the api end point.

func NewMetricsManagerAPI

func NewMetricsManagerAPI(
	st *state.State,
	resources *common.Resources,
	authorizer common.Authorizer,
) (*MetricsManagerAPI, error)

NewMetricsManagerAPI creates a new API endpoint for calling metrics manager functions.

func (*MetricsManagerAPI) CleanupOldMetrics

func (api *MetricsManagerAPI) CleanupOldMetrics(args params.Entities) (params.ErrorResults, error)

CleanupOldMetrics removes old metrics from the collection. The single arg params is expected to contain and environment uuid. Even though the call will delete all metrics across environments it serves to validate that the connection has access to at least one environment.

func (*MetricsManagerAPI) SendMetrics

func (api *MetricsManagerAPI) SendMetrics(args params.Entities) (params.ErrorResults, error)

SendMetrics will send any unsent metrics onto the metric collection service.

Jump to

Keyboard shortcuts

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