solver

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

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 added in v0.26.0

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

func (*TaskQueue) ToActionGroups added in v0.26.0

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

func (*TaskQueue) ToChannel added in v0.26.0

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

type TaskQueueBuilder added in v0.26.0

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 added in v0.26.0

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

Build returns the queue of tasks that have been created

func (*TaskQueueBuilder) WithApplyObjects added in v0.29.0

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

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

func (*TaskQueueBuilder) WithInventory added in v0.29.0

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

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

func (*TaskQueueBuilder) WithPruneObjects added in v0.29.0

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