Documentation ¶
Index ¶
- Constants
- type MarketplaceMetric
- type MarketplaceReportData
- type MarketplaceReportDataBuilder
- func (d *MarketplaceReportDataBuilder) AddMeterDefinitionLabels(meterDef *marketplacecommon.MeterDefPrometheusLabelsTemplated)
- func (d *MarketplaceReportDataBuilder) Build() (interface{}, error)
- func (d *MarketplaceReportDataBuilder) SetAccountID(accountID string)
- func (d *MarketplaceReportDataBuilder) SetClusterID(clusterID string)
- func (d *MarketplaceReportDataBuilder) SetReportInterval(start, end common.Time)
- type MarketplaceReportRecordSummary
- type MarketplaceReportSlice
- type ReportMetadata
- type ReportSlicesValue
- type SourceMetadata
Constants ¶
View Source
const ( ErrNoValuesSet = errors.Sentinel("no values set") ErrValueHashAreDifferent = errors.Sentinel("value hashes are different") ErrDuplicateLabel = errors.Sentinel("duplicate label") ErrAdditionalLabelsAreDifferent = errors.Sentinel("different additional label values") )
View Source
const Version = "v1alpha1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarketplaceMetric ¶
type MarketplaceReportData ¶
type MarketplaceReportData struct { MetricID string `json:"metric_id"` ReportPeriodStart common.Time `json:"report_period_start"` ReportPeriodEnd common.Time `json:"report_period_end"` IntervalStart common.Time `json:"interval_start"` IntervalEnd common.Time `json:"interval_end"` MeterDomain string `json:"domain"` MeterKind string `json:"kind"` MeterVersion string `json:"version,omitempty"` Label string `json:"workload,omitempty"` ResourceNamespace string `json:"resource_namespace,omitempty"` ResourceName string `json:"resource_name,omitempty"` Unit string `json:"unit,omitempty"` AdditionalLabels map[string]interface{} `json:"additionalLabels"` Metrics map[string]interface{} `json:"rhmUsageMetrics"` MetricsExtended []MarketplaceMetric `json:"rhmUsageMetricsDetailed"` RecordSummary *MarketplaceReportRecordSummary `json:"rhmUsageMetricsDetailedSummary,omitempty"` }
type MarketplaceReportDataBuilder ¶
type MarketplaceReportDataBuilder struct {
// contains filtered or unexported fields
}
func (*MarketplaceReportDataBuilder) AddMeterDefinitionLabels ¶
func (d *MarketplaceReportDataBuilder) AddMeterDefinitionLabels( meterDef *marketplacecommon.MeterDefPrometheusLabelsTemplated, )
func (*MarketplaceReportDataBuilder) Build ¶
func (d *MarketplaceReportDataBuilder) Build() (interface{}, error)
func (*MarketplaceReportDataBuilder) SetAccountID ¶
func (d *MarketplaceReportDataBuilder) SetAccountID( accountID string, )
func (*MarketplaceReportDataBuilder) SetClusterID ¶
func (d *MarketplaceReportDataBuilder) SetClusterID( clusterID string, )
func (*MarketplaceReportDataBuilder) SetReportInterval ¶
func (d *MarketplaceReportDataBuilder) SetReportInterval(start, end common.Time)
type MarketplaceReportRecordSummary ¶
type MarketplaceReportRecordSummary struct {
TotalMetricCount int `json:"totalMetricCount"`
}
type MarketplaceReportSlice ¶
type MarketplaceReportSlice struct { ReportSliceID common.ReportSliceKey `json:"report_slice_id"` Metadata *SourceMetadata `json:"metadata,omitempty"` Metrics []*MarketplaceReportData `json:"metrics"` }
type ReportMetadata ¶
type ReportMetadata struct { ReportID uuid.UUID `json:"report_id"` Source uuid.UUID `json:"source"` SourceMetadata SourceMetadata `json:"source_metadata"` ReportSlices map[common.ReportSliceKey]ReportSlicesValue `json:"report_slices"` }
type ReportSlicesValue ¶
type ReportSlicesValue struct {
NumberMetrics int `json:"number_metrics"`
}
type SourceMetadata ¶
type SourceMetadata struct { RhmClusterID string `json:"rhmClusterId" mapstructure:"rhmClusterId"` RhmAccountID string `json:"rhmAccountId" mapstructure:"rhmAccountId"` RhmEnvironment common.ReportEnvironment `json:"rhmEnvironment,omitempty" mapstructure:"rhmEnvironment,omitempty"` Version string `json:"version,omitempty" mapstructure:"version,omitempty"` ReportVersion string `json:"reportVersion,omitempty"` }
Click to show internal directories.
Click to hide internal directories.