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

View File

@@ -512,7 +512,7 @@ func (c *Client) SetPerformance(t Performance) error {
if err != nil {
return err
}
return engine.SetWGTuning(internal.WGTuning{
return engine.SetPerformance(internal.Performance{
PreallocatedBuffersPerPool: t.PreallocatedBuffersPerPool,
})
}

View File

@@ -1979,14 +1979,14 @@ func (e *Engine) GetClientMetrics() *metrics.ClientMetrics {
return e.clientMetrics
}
// WGTuning bundles runtime-adjustable WireGuard pool knobs.
// See Engine.SetWGTuning. Nil fields are ignored.
type WGTuning struct {
// Performance bundles runtime-adjustable tunnel pool knobs.
// See Engine.SetPerformance. Nil fields are ignored.
type Performance struct {
PreallocatedBuffersPerPool *uint32
}
// SetWGTuning applies the given tuning to this engine's live Device.
func (e *Engine) SetWGTuning(t WGTuning) error {
// SetPerformance applies the given tuning to this engine's live Device.
func (e *Engine) SetPerformance(t Performance) error {
e.syncMsgMux.Lock()
defer e.syncMsgMux.Unlock()
if e.wgInterface == nil {