mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to 539be170
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
28
vendor/github.com/moby/buildkit/client/llb/state.go
generated
vendored
28
vendor/github.com/moby/buildkit/client/llb/state.go
generated
vendored
@ -29,6 +29,18 @@ type Vertex interface {
|
||||
Inputs() []Output
|
||||
}
|
||||
|
||||
func NewConstraints(co ...ConstraintsOpt) *Constraints {
|
||||
defaultPlatform := platforms.Normalize(platforms.DefaultSpec())
|
||||
c := &Constraints{
|
||||
Platform: &defaultPlatform,
|
||||
LocalUniqueID: identity.NewID(),
|
||||
}
|
||||
for _, o := range co {
|
||||
o.SetConstraintsOption(c)
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
func NewState(o Output) State {
|
||||
s := State{
|
||||
out: o,
|
||||
@ -112,18 +124,12 @@ func (s State) SetMarshalDefaults(co ...ConstraintsOpt) State {
|
||||
}
|
||||
|
||||
func (s State) Marshal(ctx context.Context, co ...ConstraintsOpt) (*Definition, error) {
|
||||
c := NewConstraints(append(s.opts, co...)...)
|
||||
def := &Definition{
|
||||
Metadata: make(map[digest.Digest]pb.OpMetadata, 0),
|
||||
Metadata: make(map[digest.Digest]pb.OpMetadata, 0),
|
||||
Constraints: c,
|
||||
}
|
||||
|
||||
defaultPlatform := platforms.Normalize(platforms.DefaultSpec())
|
||||
c := &Constraints{
|
||||
Platform: &defaultPlatform,
|
||||
LocalUniqueID: identity.NewID(),
|
||||
}
|
||||
for _, o := range append(s.opts, co...) {
|
||||
o.SetConstraintsOption(c)
|
||||
}
|
||||
if s.Output() == nil || s.Output().Vertex(ctx, c) == nil {
|
||||
return def, nil
|
||||
}
|
||||
@ -401,6 +407,10 @@ func (s State) AddUlimit(name UlimitName, soft int64, hard int64) State {
|
||||
return ulimit(name, soft, hard)(s)
|
||||
}
|
||||
|
||||
func (s State) WithCgroupParent(cp string) State {
|
||||
return cgroupParent(cp)(s)
|
||||
}
|
||||
|
||||
func (s State) isFileOpCopyInput() {}
|
||||
|
||||
type output struct {
|
||||
|
Reference in New Issue
Block a user