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. TODO (mattyw) Returns result with all the delete metrics 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.