mirror of https://github.com/tailscale/tailscale/
feature/featuretags: make clientmetrics optional
Saves 57 KB Updates #12614 Change-Id: If7eebec12b3cb30ae6264171d36a258c04b05a70 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>pull/17248/merge
parent
127a967207
commit
3ae7a351b4
@ -0,0 +1,13 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Code generated by gen.go; DO NOT EDIT.
|
||||
|
||||
//go:build ts_omit_clientmetrics
|
||||
|
||||
package buildfeatures
|
||||
|
||||
// HasClientMetrics is whether the binary was built with support for modular feature "Client metrics support".
|
||||
// Specifically, it's whether the binary was NOT built with the "ts_omit_clientmetrics" build tag.
|
||||
// It's a const so it can be used for dead code elimination.
|
||||
const HasClientMetrics = false
|
||||
@ -0,0 +1,13 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Code generated by gen.go; DO NOT EDIT.
|
||||
|
||||
//go:build !ts_omit_clientmetrics
|
||||
|
||||
package buildfeatures
|
||||
|
||||
// HasClientMetrics is whether the binary was built with support for modular feature "Client metrics support".
|
||||
// Specifically, it's whether the binary was NOT built with the "ts_omit_clientmetrics" build tag.
|
||||
// It's a const so it can be used for dead code elimination.
|
||||
const HasClientMetrics = true
|
||||
@ -0,0 +1,24 @@
|
||||
// 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 }
|
||||
Loading…
Reference in New Issue