solver

package
v0.36.0-flux.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

The solver package is responsible for constructing a taskqueue based on the set of resources that should be applied. This involves setting up the appropriate sequence of apply, wait and prune tasks so any dependencies between resources doesn't cause a later apply operation to fail. Currently this package assumes that the resources have already been sorted in the appropriate order. We might want to consider moving the sorting functionality into this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	ServerSideOptions common.ServerSideOptions
	ReconcileTimeout  time.Duration
	// True if we are destroying, which deletes the inventory object
	// as well (possibly) the inventory namespace.
	Destroy bool
	// True if we're deleting prune objects
	Prune                  bool
	DryRunStrategy         common.DryRunStrategy
	PrunePropagationPolicy metav1.DeletionPropagation
	PruneTimeout           time.Duration
	InventoryPolicy        inventory.Policy
}

type TaskQueue

type TaskQueue struct {
	// contains filtered or unexported fields
}

func (*TaskQueue) ToActionGroups

func (tq *TaskQueue) ToActionGroups() []event.ActionGroup

func (*TaskQueue) ToChannel

func (tq *TaskQueue) ToChannel() chan taskrunner.Task

type TaskQueueBuilder

type TaskQueueBuilder struct {
	Pruner        *prune.Pruner
	DynamicClient dynamic.Interface
	OpenAPIGetter discovery.OpenAPISchemaInterface
	InfoHelper    info.Helper
	Mapper        meta.RESTMapper
	InvClient     inventory.Client
	// Collector is used to collect validation errors and invalid objects.
	// Invalid objects will be filtered and not be injected into tasks.
	Collector     *validation.Collector
	ApplyFilters  []filter.ValidationFilter
	ApplyMutators []mutator.Interface
	PruneFilters  []filter.ValidationFilter
	// contains filtered or unexported fields
}

func (*TaskQueueBuilder) Build

func (t *TaskQueueBuilder) Build(taskContext *taskrunner.TaskContext, o Options) *TaskQueue

Build returns the queue of tasks that have been created

func (*TaskQueueBuilder) WithApplyObjects

func (t *TaskQueueBuilder) WithApplyObjects(applyObjs object.UnstructuredSet) *TaskQueueBuilder

WithApplyObjects sets the apply objects and returns the builder for chaining.

func (*TaskQueueBuilder) WithInventory

func (t *TaskQueueBuilder) WithInventory(inv inventory.Info) *TaskQueueBuilder

WithInventory sets the inventory info and returns the builder for chaining.

func (*TaskQueueBuilder) WithPruneObjects

func (t *TaskQueueBuilder) WithPruneObjects(pruneObjs object.UnstructuredSet) *TaskQueueBuilder

WithPruneObjects sets the prune objects and returns the builder for chaining.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL