mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-28 23:39:07 +01:00
Rename internal WGTuning to Performance
This commit is contained in:
@@ -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,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user