mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
vendor: update buildkit to v0.20.0-rc1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
20
vendor/github.com/moby/buildkit/client/info.go
generated
vendored
20
vendor/github.com/moby/buildkit/client/info.go
generated
vendored
@ -18,6 +18,13 @@ type BuildkitVersion struct {
|
||||
Revision string `json:"revision"`
|
||||
}
|
||||
|
||||
type CDIDevice struct {
|
||||
Name string `json:"name"`
|
||||
AutoAllow bool `json:"autoAllow"`
|
||||
Annotations map[string]string `json:"annotations"`
|
||||
OnDemand bool `json:"onDemand"`
|
||||
}
|
||||
|
||||
func (c *Client) Info(ctx context.Context) (*Info, error) {
|
||||
res, err := c.ControlClient().Info(ctx, &controlapi.InfoRequest{})
|
||||
if err != nil {
|
||||
@ -38,3 +45,16 @@ func fromAPIBuildkitVersion(in *apitypes.BuildkitVersion) BuildkitVersion {
|
||||
Revision: in.Revision,
|
||||
}
|
||||
}
|
||||
|
||||
func fromAPICDIDevices(in []*apitypes.CDIDevice) []CDIDevice {
|
||||
var out []CDIDevice
|
||||
for _, d := range in {
|
||||
out = append(out, CDIDevice{
|
||||
Name: d.Name,
|
||||
AutoAllow: d.AutoAllow,
|
||||
Annotations: d.Annotations,
|
||||
OnDemand: d.OnDemand,
|
||||
})
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
Reference in New Issue
Block a user