STOR-519: Add db-connect, a SQL over HTTPS server

This commit is contained in:
Ashcon Partovi
2019-08-20 13:13:29 -05:00
parent 28f6c2ed7c
commit 5da2109811
410 changed files with 362649 additions and 666 deletions

View File

@@ -0,0 +1,23 @@
package leakypool
var pool chan []byte
func InitBytePool(size int) {
pool = make(chan []byte, size)
}
func GetBytes(size, capacity int) (b []byte) {
select {
case b = <-pool:
default:
b = make([]byte, size, capacity)
}
return
}
func PutBytes(b []byte) {
select {
case pool <- b:
default:
}
}