Signed-off-by: Olivier Gambier <olivier@docker.com>
This commit is contained in:
Olivier Gambier 2016-03-22 10:42:33 -07:00
parent 59401e277b
commit d1444b56e9
141 changed files with 19483 additions and 4205 deletions

View file

@ -37,7 +37,7 @@ import (
"fmt"
"sync"
"github.com/bradfitz/http2"
"golang.org/x/net/http2"
)
const (
@ -61,8 +61,8 @@ func (windowUpdate) isItem() bool {
}
type settings struct {
ack bool
setting []http2.Setting
ack bool
ss []http2.Setting
}
func (settings) isItem() bool {
@ -86,7 +86,8 @@ func (flushIO) isItem() bool {
}
type ping struct {
ack bool
ack bool
data [8]byte
}
func (ping) isItem() bool {
@ -104,8 +105,14 @@ type quotaPool struct {
// newQuotaPool creates a quotaPool which has quota q available to consume.
func newQuotaPool(q int) *quotaPool {
qb := &quotaPool{c: make(chan int, 1)}
qb.c <- q
qb := &quotaPool{
c: make(chan int, 1),
}
if q > 0 {
qb.c <- q
} else {
qb.quota = q
}
return qb
}