mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-23 03:17:43 +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
derp/xdp/xdp_default.go
Normal file
28
derp/xdp/xdp_default.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !linux
|
||||
|
||||
package xdp
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// STUNServer is unimplemented on these platforms, see xdp_linux.go.
|
||||
type STUNServer struct {
|
||||
}
|
||||
|
||||
func NewSTUNServer(config *STUNServerConfig, opts ...STUNServerOption) (*STUNServer, error) {
|
||||
return nil, errors.New("unimplemented on this GOOS")
|
||||
}
|
||||
|
||||
func (s *STUNServer) Close() error {
|
||||
return errors.New("unimplemented on this GOOS")
|
||||
}
|
||||
|
||||
func (s *STUNServer) Describe(descCh chan<- *prometheus.Desc) {}
|
||||
|
||||
func (s *STUNServer) Collect(metricCh chan<- prometheus.Metric) {}
|
Reference in New Issue
Block a user