VictoriaMetrics/lib/netutil
Aliaksandr Valialkin a468a6e985
lib/{httputils,netutil}: move httputils.GetStatDialFunc to netutil.NewStatDialFunc
- Rename GetStatDialFunc to NewStatDialFunc, since it returns new function with every call
- NewStatDialFunc isn't related to http in any way, so it must be moved from lib/httputils to lib/netutil
- Simplify the implementation of NewStatDialFunc by removing sync.Map from there.
- Use netutil.NewStatDialFunc at app/vmauth and lib/promscrape/discoveryutils
- Use gauge instead of counter type for *_conns metric

This is a follow-up for d7b5062917
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6299
2024-07-15 23:02:34 +02:00
..
conn.go lib/{httputils,netutil}: move httputils.GetStatDialFunc to netutil.NewStatDialFunc 2024-07-15 23:02:34 +02:00
netutil.go app/vmauth: fix discovering backend IPs when url_prefix contains hostname with srv+ prefix (#6401) 2024-06-12 12:30:44 +02:00
proxyprotocol.go all: consistently use %w instead of %s in when error is passed to fmt.Errorf() 2023-10-25 21:24:03 +02:00
proxyprotocol_test.go app,lib: fix typos in comments (#3804) 2023-02-13 13:27:13 +01:00
statdial.go lib/{httputils,netutil}: move httputils.GetStatDialFunc to netutil.NewStatDialFunc 2024-07-15 23:02:34 +02:00
statdial_test.go lib/{httputils,netutil}: move httputils.GetStatDialFunc to netutil.NewStatDialFunc 2024-07-15 23:02:34 +02:00
tcplistener.go docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
tls.go lib/netutil: move creation of GetCertificate callback into a separate function 2024-04-17 22:10:43 +02:00
tls_test.go all: upgrade Go builder from Go1.21.7 to Go1.22.0 2024-02-12 21:59:51 +02:00