Saves ~102 KB from the min build. Updates #12614 Change-Id: Ie1d4f439321267b9f98046593cb289ee3c4d6249 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>main
parent
ea8e991d69
commit
d816454a88
@ -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_usermetrics
|
||||
|
||||
package buildfeatures |
||||
|
||||
// HasUserMetrics is whether the binary was built with support for modular feature "Usermetrics (documented, stable) metrics support".
|
||||
// Specifically, it's whether the binary was NOT built with the "ts_omit_usermetrics" build tag.
|
||||
// It's a const so it can be used for dead code elimination.
|
||||
const HasUserMetrics = 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_usermetrics
|
||||
|
||||
package buildfeatures |
||||
|
||||
// HasUserMetrics is whether the binary was built with support for modular feature "Usermetrics (documented, stable) metrics support".
|
||||
// Specifically, it's whether the binary was NOT built with the "ts_omit_usermetrics" build tag.
|
||||
// It's a const so it can be used for dead code elimination.
|
||||
const HasUserMetrics = true |
||||
@ -0,0 +1,29 @@ |
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build ts_omit_usermetrics
|
||||
|
||||
package usermetric |
||||
|
||||
type Registry struct { |
||||
m Metrics |
||||
} |
||||
|
||||
func (*Registry) NewGauge(name, help string) *Gauge { return nil } |
||||
|
||||
type MultiLabelMap[T comparable] = noopMap[T] |
||||
|
||||
type noopMap[T comparable] struct{} |
||||
|
||||
type Gauge struct{} |
||||
|
||||
func (*Gauge) Set(float64) {} |
||||
|
||||
func NewMultiLabelMapWithRegistry[T comparable](m *Registry, name string, promType, helpText string) *MultiLabelMap[T] { |
||||
return nil |
||||
} |
||||
|
||||
func (*noopMap[T]) Add(T, int64) {} |
||||
func (*noopMap[T]) Set(T, any) {} |
||||
|
||||
func (r *Registry) Handler(any, any) {} // no-op HTTP handler
|
||||
Loading…
Reference in new issue