Rename internal WGTuning to Performance

This commit is contained in:
Viktor Liu
2026-05-22 17:37:33 +02:00
parent f4e42a8929
commit cfc100a9d7
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -512,7 +512,7 @@ func (c *Client) SetPerformance(t Performance) error {
if err != nil { if err != nil {
return err return err
} }
return engine.SetWGTuning(internal.WGTuning{ return engine.SetPerformance(internal.Performance{
PreallocatedBuffersPerPool: t.PreallocatedBuffersPerPool, PreallocatedBuffersPerPool: t.PreallocatedBuffersPerPool,
}) })
} }
+5 -5
View File
@@ -1979,14 +1979,14 @@ func (e *Engine) GetClientMetrics() *metrics.ClientMetrics {
return e.clientMetrics return e.clientMetrics
} }
// WGTuning bundles runtime-adjustable WireGuard pool knobs. // Performance bundles runtime-adjustable tunnel pool knobs.
// See Engine.SetWGTuning. Nil fields are ignored. // See Engine.SetPerformance. Nil fields are ignored.
type WGTuning struct { type Performance struct {
PreallocatedBuffersPerPool *uint32 PreallocatedBuffersPerPool *uint32
} }
// SetWGTuning applies the given tuning to this engine's live Device. // SetPerformance applies the given tuning to this engine's live Device.
func (e *Engine) SetWGTuning(t WGTuning) error { func (e *Engine) SetPerformance(t Performance) error {
e.syncMsgMux.Lock() e.syncMsgMux.Lock()
defer e.syncMsgMux.Unlock() defer e.syncMsgMux.Unlock()
if e.wgInterface == nil { if e.wgInterface == nil {