juju: github.com/juju/juju/apiserver/facades/controller/metricsmanager Index | Files

package metricsmanager

import "github.com/juju/juju/apiserver/facades/controller/metricsmanager"

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

Index

Package Files

metricsmanager.go

type MetricsManager Uses

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 Uses

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 NewFacade Uses

func NewFacade(ctx facade.Context) (*MetricsManagerAPI, error)

NewFacade wraps NewMetricsManagerAPI for API registration.

func NewMetricsManagerAPI Uses

func NewMetricsManagerAPI(
    st *state.State,
    resources facade.Resources,
    authorizer facade.Authorizer,
    pool *state.StatePool,
    clock clock.Clock,
) (*MetricsManagerAPI, error)

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

func (*MetricsManagerAPI) AddJujuMachineMetrics Uses

func (api *MetricsManagerAPI) AddJujuMachineMetrics() error

AddJujuMachineMetrics adds a metric that counts the number of non-container machines in the current model.

func (*MetricsManagerAPI) CleanupOldMetrics Uses

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 model uuid. Even though the call will delete all metrics across models it serves to validate that the connection has access to at least one model.

func (*MetricsManagerAPI) SendMetrics Uses

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

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

Package metricsmanager imports 15 packages (graph) and is imported by 3 packages. Updated 2019-09-06. Refresh now. Tools for package owners.