package llbsolver
import "github.com/moby/buildkit/solver/llbsolver"
Index ¶
- func AddBuildConfig(ctx context.Context, p *provenancetypes.ProvenancePredicate, c *provenance.Capture, rp solver.ResultProxy, withUsage bool) (map[digest.Digest]int, error)
- func Load(ctx context.Context, def *pb.Definition, polEngine SourcePolicyEvaluator, opts ...LoadOpt) (solver.Edge, error)
- type Attestation
- type ExporterRequest
- type HistoryQueue
- func NewHistoryQueue(opt HistoryQueueOpt) (*HistoryQueue, error)
- func (h *HistoryQueue) AcquireFinalizer(ref string) (<-chan struct{}, func())
- func (h *HistoryQueue) Delete(ctx context.Context, ref string) error
- func (h *HistoryQueue) Finalize(ctx context.Context, ref string) error
- func (h *HistoryQueue) ImportError(ctx context.Context, err error) (_ *spb.Status, _ *controlapi.Descriptor, _ func(), retErr error)
- func (h *HistoryQueue) ImportStatus(ctx context.Context, ch chan *client.SolveStatus) (_ *StatusImportResult, _ func(), err error)
- func (h *HistoryQueue) Listen(ctx context.Context, req *controlapi.BuildHistoryRequest, f func(*controlapi.BuildHistoryEvent) error) error
- func (h *HistoryQueue) OpenBlobWriter(ctx context.Context, mt string) (_ *Writer, err error)
- func (h *HistoryQueue) Status(ctx context.Context, ref string, st chan<- *client.SolveStatus) error
- func (h *HistoryQueue) Update(ctx context.Context, e *controlapi.BuildHistoryEvent) error
- func (h *HistoryQueue) UpdateRef(ctx context.Context, ref string, upt func(r *controlapi.BuildHistoryRecord) error) error
- type HistoryQueueOpt
- type LoadOpt
- func NormalizeRuntimePlatforms() LoadOpt
- func ValidateEntitlements(ent entitlements.Set) LoadOpt
- func WithCacheSources(cms []solver.CacheManager) LoadOpt
- func WithValidateCaps() LoadOpt
- type Opt
- type Processor
- type ProvenanceCreator
- func NewProvenanceCreator(ctx context.Context, cp *provenance.Capture, res solver.ResultProxy, attrs map[string]string, j *solver.Job, usage *resources.SysSampler) (*ProvenanceCreator, error)
- func (p *ProvenanceCreator) Predicate() (*provenancetypes.ProvenancePredicate, error)
- type RemoteCacheExporter
- type ResolveWorkerFunc
- type Result
- type Solver
- func New(opt Opt) (*Solver, error)
- func (s *Solver) Bridge(b solver.Builder) frontend.FrontendLLBBridge
- func (s *Solver) Close() error
- func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req frontend.SolveRequest, exp ExporterRequest, ent []entitlements.Entitlement, post []Processor, internal bool, srcPol *spb.Policy) (_ *client.SolveResponse, err error)
- func (s *Solver) Status(ctx context.Context, id string, statusChan chan *client.SolveStatus) error
- type SourcePolicyEvaluator
- type StatusImportResult
- type Writer
Functions ¶
func AddBuildConfig ¶
func AddBuildConfig(ctx context.Context, p *provenancetypes.ProvenancePredicate, c *provenance.Capture, rp solver.ResultProxy, withUsage bool) (map[digest.Digest]int, error)
func Load ¶
func Load(ctx context.Context, def *pb.Definition, polEngine SourcePolicyEvaluator, opts ...LoadOpt) (solver.Edge, error)
Types ¶
type Attestation ¶
type Attestation = frontend.Attestation
type ExporterRequest ¶
type ExporterRequest struct { Exporters []exporter.ExporterInstance CacheExporters []RemoteCacheExporter }
type HistoryQueue ¶
type HistoryQueue struct {
// contains filtered or unexported fields
}
func NewHistoryQueue ¶
func NewHistoryQueue(opt HistoryQueueOpt) (*HistoryQueue, error)
func (*HistoryQueue) AcquireFinalizer ¶
func (h *HistoryQueue) AcquireFinalizer(ref string) (<-chan struct{}, func())
func (*HistoryQueue) Delete ¶
func (h *HistoryQueue) Delete(ctx context.Context, ref string) error
func (*HistoryQueue) Finalize ¶
func (h *HistoryQueue) Finalize(ctx context.Context, ref string) error
func (*HistoryQueue) ImportError ¶
func (h *HistoryQueue) ImportError(ctx context.Context, err error) (_ *spb.Status, _ *controlapi.Descriptor, _ func(), retErr error)
func (*HistoryQueue) ImportStatus ¶
func (h *HistoryQueue) ImportStatus(ctx context.Context, ch chan *client.SolveStatus) (_ *StatusImportResult, _ func(), err error)
func (*HistoryQueue) Listen ¶
func (h *HistoryQueue) Listen(ctx context.Context, req *controlapi.BuildHistoryRequest, f func(*controlapi.BuildHistoryEvent) error) error
func (*HistoryQueue) OpenBlobWriter ¶
func (*HistoryQueue) Status ¶
func (h *HistoryQueue) Status(ctx context.Context, ref string, st chan<- *client.SolveStatus) error
func (*HistoryQueue) Update ¶
func (h *HistoryQueue) Update(ctx context.Context, e *controlapi.BuildHistoryEvent) error
func (*HistoryQueue) UpdateRef ¶
func (h *HistoryQueue) UpdateRef(ctx context.Context, ref string, upt func(r *controlapi.BuildHistoryRecord) error) error
type HistoryQueueOpt ¶
type HistoryQueueOpt struct { DB db.Transactor LeaseManager *leaseutil.Manager ContentStore *containerdsnapshot.Store CleanConfig *config.HistoryConfig GarbageCollect func(context.Context) error GracefulStop <-chan struct{} }
type LoadOpt ¶
type LoadOpt func(*pb.Op, *pb.OpMetadata, *solver.VertexOptions) error
func NormalizeRuntimePlatforms ¶
func NormalizeRuntimePlatforms() LoadOpt
func ValidateEntitlements ¶
func ValidateEntitlements(ent entitlements.Set) LoadOpt
func WithCacheSources ¶
func WithCacheSources(cms []solver.CacheManager) LoadOpt
func WithValidateCaps ¶
func WithValidateCaps() LoadOpt
type Opt ¶
type Opt struct { CacheManager solver.CacheManager CacheResolvers map[string]remotecache.ResolveCacheImporterFunc Entitlements []string Frontends map[string]frontend.Frontend GatewayForwarder *controlgateway.GatewayForwarder SessionManager *session.Manager WorkerController *worker.Controller HistoryQueue *HistoryQueue ResourceMonitor *resources.Monitor }
Opt defines options for new Solver.
type Processor ¶
type Processor func(ctx context.Context, result *Result, s *Solver, j *solver.Job, usage *resources.SysSampler) (*Result, error)
Processor defines a processing function to be applied after solving, but before exporting
type ProvenanceCreator ¶
type ProvenanceCreator struct {
// contains filtered or unexported fields
}
func NewProvenanceCreator ¶
func NewProvenanceCreator(ctx context.Context, cp *provenance.Capture, res solver.ResultProxy, attrs map[string]string, j *solver.Job, usage *resources.SysSampler) (*ProvenanceCreator, error)
func (*ProvenanceCreator) Predicate ¶
func (p *ProvenanceCreator) Predicate() (*provenancetypes.ProvenancePredicate, error)
type RemoteCacheExporter ¶
type RemoteCacheExporter struct { remotecache.Exporter solver.CacheExportMode IgnoreError bool }
type ResolveWorkerFunc ¶
ResolveWorkerFunc returns default worker for the temporary default non-distributed use cases
type Result ¶
type Result struct { *frontend.Result Provenance *provenance.Result }
type Solver ¶
type Solver struct {
// contains filtered or unexported fields
}
func New ¶
func (*Solver) Bridge ¶
func (s *Solver) Bridge(b solver.Builder) frontend.FrontendLLBBridge
func (*Solver) Close ¶
func (*Solver) Solve ¶
func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req frontend.SolveRequest, exp ExporterRequest, ent []entitlements.Entitlement, post []Processor, internal bool, srcPol *spb.Policy) (_ *client.SolveResponse, err error)
func (*Solver) Status ¶
type SourcePolicyEvaluator ¶
type SourcePolicyEvaluator interface { Evaluate(ctx context.Context, op *pb.SourceOp) (bool, error) }
type StatusImportResult ¶
type StatusImportResult struct { Descriptor ocispecs.Descriptor NumCachedSteps int NumCompletedSteps int NumTotalSteps int NumWarnings int }
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) Commit ¶
func (*Writer) Discard ¶
func (w *Writer) Discard()
func (*Writer) Write ¶
Source Files ¶
bridge.go history.go provenance.go result.go solver.go sourcepolicy.go vertex.go
Directories ¶
- Version
- v0.20.0-rc2
- Published
- Feb 13, 2025
- Platform
- js/wasm
- Imports
- 81 packages
- Last checked
- 3 minutes ago –
Tools for package owners.