vendor: update buildkit with typed errors support

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2020-06-24 22:20:05 -07:00
parent 0269388aa7
commit 2d720a1e0b
619 changed files with 38296 additions and 104947 deletions

View File

@ -33,21 +33,26 @@ func Dialer(api controlapi.ControlClient) session.Dialer {
}
}
func streamToConn(stream grpc.Stream) (net.Conn, <-chan struct{}) {
type stream interface {
Context() context.Context
SendMsg(m interface{}) error
RecvMsg(m interface{}) error
}
func streamToConn(stream stream) (net.Conn, <-chan struct{}) {
closeCh := make(chan struct{})
c := &conn{stream: stream, buf: make([]byte, 32*1<<10), closeCh: closeCh}
return c, closeCh
}
type conn struct {
stream grpc.Stream
stream stream
buf []byte
lastBuf []byte
closedOnce sync.Once
readMu sync.Mutex
writeMu sync.Mutex
err error
closeCh chan struct{}
}