code: func NewApi(runningInKubernetes bool, metricSink *metricsink.MetricSink, historicalSource core.HistoricalSource, disableMetricExport bool) *Api {
  	gkeMetrics := make(map[string]core.MetricDescriptor)
  	gkeLabels := make(map[string]core.LabelDescriptor)
  	for _, val := range core.StandardMetrics {
  		gkeMetrics[val.Name] = val.MetricDescriptor
  	}
  	for _, val := range core.LabeledMetrics {
  		gkeMetrics[val.Name] = val.MetricDescriptor
  	}
  	gkeMetrics[core.MetricCpuLimit.Name] = core.MetricCpuLimit.MetricDescriptor
  	gkeMetrics[core.MetricMemoryLimit.Name] = core.MetricMemoryLimit.MetricDescriptor
  
  	for _, val := range core.CommonLabels() {
  		gkeLabels[val.Key] = val
  	}
  	for _, val := range core.ContainerLabels() {
  		gkeLabels[val.Key] = val
  	}
  	for _, val := range core.PodLabels() {
  		gkeLabels[val.Key] = val
  	}
  
  	return &Api{
  		runningInKubernetes: runningInKubernetes,
  		metricSink:          metricSink,
  		historicalSource:    historicalSource,
  		gkeMetrics:          gkeMetrics,
  		gkeLabels:           gkeLabels,
  		disabled:            disableMetricExport,
  	}
  }
docs: // Create a new Api to serve from the specified cache.