mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-12 22:47:09 +08:00
vendor: github.com/moby/buildkit v0.21.0-rc2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
33
vendor/github.com/moby/buildkit/client/llb/source.go
generated
vendored
33
vendor/github.com/moby/buildkit/client/llb/source.go
generated
vendored
@ -435,6 +435,13 @@ func Local(name string, opts ...LocalOption) State {
|
||||
addCap(&gi.Constraints, pb.CapSourceLocalDiffer)
|
||||
}
|
||||
}
|
||||
if gi.MetadataOnlyCollector {
|
||||
attrs[pb.AttrMetadataTransfer] = "true"
|
||||
if gi.MetadataOnlyExceptions != "" {
|
||||
attrs[pb.AttrMetadataTransferExclude] = gi.MetadataOnlyExceptions
|
||||
}
|
||||
addCap(&gi.Constraints, pb.CapSourceMetadataTransfer)
|
||||
}
|
||||
|
||||
addCap(&gi.Constraints, pb.CapSourceLocal)
|
||||
|
||||
@ -506,6 +513,18 @@ func Differ(t DiffType, required bool) LocalOption {
|
||||
})
|
||||
}
|
||||
|
||||
func MetadataOnlyTransfer(exceptions []string) LocalOption {
|
||||
return localOptionFunc(func(li *LocalInfo) {
|
||||
li.MetadataOnlyCollector = true
|
||||
if len(exceptions) == 0 {
|
||||
li.MetadataOnlyExceptions = ""
|
||||
} else {
|
||||
dt, _ := json.Marshal(exceptions) // empty on error
|
||||
li.MetadataOnlyExceptions = string(dt)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func OCILayout(ref string, opts ...OCILayoutOption) State {
|
||||
gi := &OCILayoutInfo{}
|
||||
|
||||
@ -578,12 +597,14 @@ type DifferInfo struct {
|
||||
|
||||
type LocalInfo struct {
|
||||
constraintsWrapper
|
||||
SessionID string
|
||||
IncludePatterns string
|
||||
ExcludePatterns string
|
||||
FollowPaths string
|
||||
SharedKeyHint string
|
||||
Differ DifferInfo
|
||||
SessionID string
|
||||
IncludePatterns string
|
||||
ExcludePatterns string
|
||||
FollowPaths string
|
||||
SharedKeyHint string
|
||||
Differ DifferInfo
|
||||
MetadataOnlyCollector bool
|
||||
MetadataOnlyExceptions string
|
||||
}
|
||||
|
||||
func HTTP(url string, opts ...HTTPOption) State {
|
||||
|
Reference in New Issue
Block a user