新增审计日志的http/https域名信息

This commit is contained in:
lanrenwo
2022-07-14 19:02:43 +08:00
parent cd21dec605
commit 8837a07fac
4 changed files with 109 additions and 16 deletions

View File

@@ -87,3 +87,25 @@ func putByte34(b *[]byte) {
*b = (*b)[:34]
byte34Pool.Put(b)
}
type BufferPool struct {
sync.Pool
}
// 长度 290 对象
var byte290Pool = sync.Pool{
New: func() interface{} {
b := make([]byte, 290)
return &b
},
}
func getByte290() *[]byte {
b := byte290Pool.Get().(*[]byte)
return b
}
func putByte290(b *[]byte) {
*b = (*b)[:290]
byte290Pool.Put(b)
}