mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
derp/xdp,cmd/xdpderper: initial skeleton (#12390)
This commit introduces a userspace program for managing an experimental eBPF XDP STUN server program. derp/xdp contains the eBPF pseudo-C along with a Go pkg for loading it and exporting its metrics. cmd/xdpderper is a package main user of derp/xdp. Updates tailscale/corp#20689 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
@@ -28,7 +28,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
|
||||
// gatherNativePrometheusMetrics writes metrics from the default
|
||||
// metric registry in text format.
|
||||
func gatherNativePrometheusMetrics(w http.ResponseWriter) error {
|
||||
enc := expfmt.NewEncoder(w, expfmt.FmtText)
|
||||
enc := expfmt.NewEncoder(w, expfmt.NewFormat(expfmt.TypeTextPlain))
|
||||
mfs, err := prometheus.DefaultGatherer.Gather()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not gather metrics from DefaultGatherer: %w", err)
|
||||
|
Reference in New Issue
Block a user