Refactor Stackdriver-over-REST specific code to a different package

Downstream users who use gRPC rather than REST don't want to pull down
rest-related dependencies.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145834701
This commit is contained in:
shikhman 2017-01-27 14:07:59 -08:00 committed by Ben McIlwain
parent bfc4841761
commit 3f9c53b850
10 changed files with 12 additions and 1127 deletions

View file

@ -15,6 +15,7 @@
package google.registry.monitoring.metrics;
import com.google.auto.value.AutoValue;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import org.joda.time.Instant;
import org.joda.time.Interval;
@ -32,7 +33,8 @@ public abstract class MetricPoint<V> {
* <p>Callers should insure that the count of {@code labelValues} matches the count of labels for
* the given metric.
*/
static <V> MetricPoint<V> create(
@VisibleForTesting
public static <V> MetricPoint<V> create(
Metric<V> metric, ImmutableList<String> labelValues, Instant timestamp, V value) {
MetricsUtils.checkLabelValuesLength(metric, labelValues);
@ -47,7 +49,8 @@ public abstract class MetricPoint<V> {
* <p>Callers should insure that the count of {@code labelValues} matches the count of labels for
* the given metric.
*/
static <V> MetricPoint<V> create(
@VisibleForTesting
public static <V> MetricPoint<V> create(
Metric<V> metric,
ImmutableList<String> labelValues,
Instant startTime,