mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-18 04:29:54 +00: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 {
|
||||
return err
|
||||
}
|
||||
return engine.SetWGTuning(internal.WGTuning{
|
||||
return engine.SetPerformance(internal.Performance{
|
||||
PreallocatedBuffersPerPool: t.PreallocatedBuffersPerPool,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user