@@ -340,7 +340,7 @@ type DataMetricsReporter struct {
340340 ReportZeroes bool
341341}
342342
343- // This is the same Content-Type that promhttp's GET /metrics implementation reports.
343+ // ContentTypeForPrometheusMetrics is the same Content-Type that promhttp's GET /metrics implementation reports.
344344// If this changes because of a prometheus/client-go upgrade, we will know because our
345345// test verifies that promhttp yields this Content-Type. In the case of a change,
346346// the output format of promhttp should be carefully reviewed for changes, and then
@@ -841,6 +841,7 @@ func newResourceAndRateBehaviorCache(cluster *core.Cluster) resourceAndRateBehav
841841 return resourceAndRateBehaviorCache {cluster , cache , rateCache , cbCache }
842842}
843843
844+ // Get returns the cached ResourceBehavior for the given service type and resource name.
844845func (c resourceAndRateBehaviorCache ) Get (srvType db.ServiceType , resName liquid.ResourceName ) core.ResourceBehavior {
845846 if c .cache [srvType ] == nil {
846847 c .cache [srvType ] = make (map [liquid.ResourceName ]core.ResourceBehavior )
@@ -853,6 +854,7 @@ func (c resourceAndRateBehaviorCache) Get(srvType db.ServiceType, resName liquid
853854 return behavior
854855}
855856
857+ // GetForRate returns the cached RateBehavior for the given service type and rate name.
856858func (c resourceAndRateBehaviorCache ) GetForRate (srvType db.ServiceType , rateName liquid.RateName ) core.RateBehavior {
857859 if c .rateCache [srvType ] == nil {
858860 c .rateCache [srvType ] = make (map [liquid.RateName ]core.RateBehavior )
@@ -865,6 +867,7 @@ func (c resourceAndRateBehaviorCache) GetForRate(srvType db.ServiceType, rateNam
865867 return behavior
866868}
867869
870+ // GetCommitmentBehavior returns the cached ScopedCommitmentBehavior for the given service type and resource name.
868871func (c resourceAndRateBehaviorCache ) GetCommitmentBehavior (srvType db.ServiceType , resName liquid.ResourceName ) core.ScopedCommitmentBehavior {
869872 if c .cbCache [srvType ] == nil {
870873 c .cbCache [srvType ] = make (map [liquid.ResourceName ]core.ScopedCommitmentBehavior )
0 commit comments