Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EDPMeasurement ¶
type EDPMeasurement struct { VMTypes []VMType `json:"vm_types" validate:"required"` ProvisionedCPUs int `json:"provisioned_cpus" validate:"numeric"` ProvisionedRAMGb float64 `json:"provisioned_ram_gb" validate:"numeric"` ProvisionedVolumes ProvisionedVolumes `json:"provisioned_volumes" validate:"required"` }
type EDPMeasurementConverter ¶
type EDPMeasurementConverter interface { // EDP updates the EDPRecord with the measure. All billing logic such as conversion to storage / cpu / memory units must be done here. // As the EDPRecord is not time dependent, the duration is not passed. EDP() (EDPMeasurement, error) }
type ProvisionedVolumes ¶
type ScanConverter ¶
type ScanConverter interface { UMMeasurementConverter EDPMeasurementConverter }
type Scanner ¶
type Scanner interface { // ScanConverter returns the measure for the given clusterid. If an error occurs, the measure is nil. // The scan is time dependent and should be taken at the time of the call. // The scanner is responsible for exposing metrics about the values retrieved. All scanners should follow a similar pattern. // These metrics are just for informational purposes and must not be used for alerting or billing. Scan(ctx context.Context, runtime *runtime.Info) (ScanConverter, error) // ID returns the ID of the scanner. This name is used to identify the measure in the record. ID() ScannerID }
Scanner is an interface for measuring a specific resource related to a single cluster.
type UMMeasurement ¶
type UMMeasurement struct{}
type UMMeasurementConverter ¶
type UMMeasurementConverter interface { // UM returns the measurement data required for creating a unified metering record // The duration is the time passed since the last measure was taken. UM(duration time.Duration) (UMMeasurement, error) }
Click to show internal directories.
Click to hide internal directories.