TUN-7125: Add management streaming logs WebSocket protocol

This commit is contained in:
Devin Carr
2023-04-04 15:45:32 -07:00
parent 5972540efa
commit 93acdaface
53 changed files with 12367 additions and 2 deletions

24
vendor/nhooyr.io/websocket/internal/bpool/bpool.go generated vendored Normal file
View File

@@ -0,0 +1,24 @@
package bpool
import (
"bytes"
"sync"
)
var bpool sync.Pool
// Get returns a buffer from the pool or creates a new one if
// the pool is empty.
func Get() *bytes.Buffer {
b := bpool.Get()
if b == nil {
return &bytes.Buffer{}
}
return b.(*bytes.Buffer)
}
// Put returns a buffer into the pool.
func Put(b *bytes.Buffer) {
b.Reset()
bpool.Put(b)
}