mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
hack: generate vtproto files for buildx
Integrates vtproto into buildx. The generated files dockerfile has been modified to copy the buildkit equivalent file to ensure files are laid out in the appropriate way for imports. An import has also been included to change the grpc codec to the version in buildkit that supports vtproto. This will allow buildx to utilize the speed and memory improvements from that. Also updates the gc control options for prune. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
24
vendor/github.com/moby/buildkit/client/prune.go
generated
vendored
24
vendor/github.com/moby/buildkit/client/prune.go
generated
vendored
@ -16,11 +16,11 @@ func (c *Client) Prune(ctx context.Context, ch chan UsageInfo, opts ...PruneOpti
|
||||
}
|
||||
|
||||
req := &controlapi.PruneRequest{
|
||||
Filter: info.Filter,
|
||||
KeepDuration: int64(info.KeepDuration),
|
||||
MinStorage: int64(info.MinStorage),
|
||||
MaxStorage: int64(info.MaxStorage),
|
||||
Free: int64(info.Free),
|
||||
Filter: info.Filter,
|
||||
KeepDuration: int64(info.KeepDuration),
|
||||
ReservedSpace: int64(info.ReservedSpace),
|
||||
MaxUsedSpace: int64(info.MaxUsedSpace),
|
||||
MinFreeSpace: int64(info.MinFreeSpace),
|
||||
}
|
||||
if info.All {
|
||||
req.All = true
|
||||
@ -71,9 +71,9 @@ type PruneInfo struct {
|
||||
Filter []string `json:"filter"`
|
||||
KeepDuration time.Duration `json:"keepDuration"`
|
||||
|
||||
MinStorage int64 `json:"minStorage"`
|
||||
MaxStorage int64 `json:"maxStorage"`
|
||||
Free int64 `json:"free"`
|
||||
ReservedSpace int64 `json:"reservedSpace"`
|
||||
MaxUsedSpace int64 `json:"maxUsedSpace"`
|
||||
MinFreeSpace int64 `json:"minFreeSpace"`
|
||||
}
|
||||
|
||||
type pruneOptionFunc func(*PruneInfo)
|
||||
@ -86,11 +86,11 @@ var PruneAll = pruneOptionFunc(func(pi *PruneInfo) {
|
||||
pi.All = true
|
||||
})
|
||||
|
||||
func WithKeepOpt(duration time.Duration, minStorage int64, maxStorage int64, free int64) PruneOption {
|
||||
func WithKeepOpt(duration time.Duration, reserved int64, max int64, free int64) PruneOption {
|
||||
return pruneOptionFunc(func(pi *PruneInfo) {
|
||||
pi.KeepDuration = duration
|
||||
pi.MinStorage = minStorage
|
||||
pi.MaxStorage = maxStorage
|
||||
pi.Free = free
|
||||
pi.ReservedSpace = reserved
|
||||
pi.MaxUsedSpace = max
|
||||
pi.MinFreeSpace = free
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user