You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/util/clientmetric/omit.go

25 lines
766 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
//go:build ts_omit_clientmetrics
package clientmetric
type Metric struct{}
func (*Metric) Add(int64) {}
func (*Metric) Set(int64) {}
func (*Metric) Value() int64 { return 0 }
func (*Metric) Register(expvarInt any) {}
func (*Metric) UnregisterAll() {}
func HasPublished(string) bool { panic("unreachable") }
func EncodeLogTailMetricsDelta() string { return "" }
func WritePrometheusExpositionFormat(any) {}
var zeroMetric Metric
func NewCounter(string) *Metric { return &zeroMetric }
func NewGauge(string) *Metric { return &zeroMetric }
func NewAggregateCounter(string) *Metric { return &zeroMetric }