Documentation ¶
Overview ¶
TODO: This library is imported from ror, should determine if its a public library or not
Index ¶
- Constants
- func ForClustersByProperty(ctx context.Context, property string) (*apicontracts.MetricsCustom, error)
- func GetForClusterid(ctx context.Context, clusterId string) (*apicontracts.MetricItem, error)
- func GetForClusters(ctx context.Context) (*apicontracts.MetricList, error)
- func GetForClustersByWorkspace(ctx context.Context, workspaceName string) (*apicontracts.MetricList, error)
- func GetForDatacenterName(ctx context.Context, datacenterName string) (*apicontracts.MetricItem, error)
- func GetForDatacenters(ctx context.Context) (*apicontracts.MetricList, error)
- func GetForWorkspaceName(ctx context.Context, workspaceName string) (*apicontracts.MetricItem, error)
- func GetForWorkspaces(ctx context.Context, filter *apicontracts.Filter) (*apicontracts.PaginatedResult[apicontracts.Metric], error)
- func GetForWorkspacesByDatacenter(ctx context.Context, filter *apicontracts.Filter, datacenterName string) (*apicontracts.PaginatedResult[apicontracts.Metric], error)
- func GetMetricFromPrimitivM(data primitive.M) apicontracts.Metrics
- func GetMetricItemFromPrimitivM(data primitive.M) apicontracts.Metric
- func GetMetricsByFilter(filter apicontracts.MetricsFilter, ctx context.Context, ...) ([]apicontracts.MetricsResult, error)
- func GetTotal(ctx context.Context) (*apicontracts.MetricsTotal, error)
- func GetTotalByUser(ctx context.Context) (*apicontracts.MetricsTotal, error)
- func WriteMetrics(metricsreport *apicontracts.MetricsReport, clusterId string, ...)
Constants ¶
View Source
const (
CollectionName = "clusters"
)
View Source
const (
MetricsCollectionName = "metrics"
)
Variables ¶
This section is empty.
Functions ¶
func ForClustersByProperty ¶
func ForClustersByProperty(ctx context.Context, property string) (*apicontracts.MetricsCustom, error)
func GetForClusterid ¶
func GetForClusterid(ctx context.Context, clusterId string) (*apicontracts.MetricItem, error)
func GetForClusters ¶
func GetForClusters(ctx context.Context) (*apicontracts.MetricList, error)
func GetForClustersByWorkspace ¶
func GetForClustersByWorkspace(ctx context.Context, workspaceName string) (*apicontracts.MetricList, error)
func GetForDatacenterName ¶
func GetForDatacenterName(ctx context.Context, datacenterName string) (*apicontracts.MetricItem, error)
func GetForDatacenters ¶
func GetForDatacenters(ctx context.Context) (*apicontracts.MetricList, error)
func GetForWorkspaceName ¶
func GetForWorkspaceName(ctx context.Context, workspaceName string) (*apicontracts.MetricItem, error)
func GetForWorkspaces ¶
func GetForWorkspaces(ctx context.Context, filter *apicontracts.Filter) (*apicontracts.PaginatedResult[apicontracts.Metric], error)
func GetForWorkspacesByDatacenter ¶
func GetForWorkspacesByDatacenter(ctx context.Context, filter *apicontracts.Filter, datacenterName string) (*apicontracts.PaginatedResult[apicontracts.Metric], error)
func GetMetricFromPrimitivM ¶
func GetMetricFromPrimitivM(data primitive.M) apicontracts.Metrics
func GetMetricItemFromPrimitivM ¶
func GetMetricItemFromPrimitivM(data primitive.M) apicontracts.Metric
func GetMetricsByFilter ¶
func GetMetricsByFilter(filter apicontracts.MetricsFilter, ctx context.Context, mongodb *mongo.Database) ([]apicontracts.MetricsResult, error)
GetPodMetricsByFilter returns timeseries data filterd with the apicontracts.MetricsFilter.
- Type must be set to either node or pod.
- Default time is common era (year 0 - now()).
- Default time resolution is hour. all results
func GetTotal ¶
func GetTotal(ctx context.Context) (*apicontracts.MetricsTotal, error)
func GetTotalByUser ¶
func GetTotalByUser(ctx context.Context) (*apicontracts.MetricsTotal, error)
func WriteMetrics ¶
func WriteMetrics(metricsreport *apicontracts.MetricsReport, clusterId string, ctx context.Context)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.