mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/moby/buildkit v0.12.1-0.20230717122532-faa0cc7da353
full diff: - https://github.com/moby/buildkit/compare/20230620112432...v0.12.0 - https://github.com/moby/buildkit/compare/v0.12.0...faa0cc7da3536923d85b74b2bb2d13c12a6ecc99 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
14
vendor/github.com/moby/buildkit/client/client.go
generated
vendored
14
vendor/github.com/moby/buildkit/client/client.go
generated
vendored
@ -25,6 +25,7 @@ import (
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
)
|
||||
@ -184,6 +185,19 @@ func (c *Client) Dialer() session.Dialer {
|
||||
return grpchijack.Dialer(c.ControlClient())
|
||||
}
|
||||
|
||||
func (c *Client) Wait(ctx context.Context) error {
|
||||
opts := []grpc.CallOption{grpc.WaitForReady(true)}
|
||||
_, err := c.ControlClient().Info(ctx, &controlapi.InfoRequest{}, opts...)
|
||||
if err != nil {
|
||||
if code := grpcerrors.Code(err); code == codes.Unimplemented {
|
||||
// only buildkit v0.11+ supports the info api, but an unimplemented
|
||||
// response error is still a response so we can ignore it
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Client) Close() error {
|
||||
return c.conn.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user