planner

package
v1.4.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainedPlanner

type ChainedPlanner struct {
	Planners []orchestrator.Planner
}

ChainedPlanner implements the orchestrator.Planner interface by chaining multiple planners together.

func NewChain

func NewChain(planners ...orchestrator.Planner) *ChainedPlanner

NewChain creates a new ChainedPlanner with the provided planners.

func (*ChainedPlanner) Add

func (c *ChainedPlanner) Add(planners ...orchestrator.Planner)

Add adds the specified planners to the ChainedPlanner.

func (*ChainedPlanner) Process

func (c *ChainedPlanner) Process(ctx context.Context, plan *models.Plan) error

Process executes the planning process by invoking each planner in the chain.

type ComputeForwarder

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

func NewComputeForwarder

func NewComputeForwarder(params ComputeForwarderParams) *ComputeForwarder

func (*ComputeForwarder) Process

func (s *ComputeForwarder) Process(ctx context.Context, plan *models.Plan) error

type ComputeForwarderParams

type ComputeForwarderParams struct {
	ID             string
	ComputeService compute.Endpoint
	JobStore       jobstore.Store
}

type EventEmitter

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

EventEmitter is a planner implementation that emits events based on the job state.

func NewEventEmitter

func NewEventEmitter(params EventEmitterParams) *EventEmitter

NewEventEmitter creates a new instance of EventEmitter.

func (*EventEmitter) Process

func (s *EventEmitter) Process(ctx context.Context, plan *models.Plan) error

Process updates the state of the executions in the plan according to the scheduler's desired state.

type EventEmitterParams

type EventEmitterParams struct {
	ID           string
	EventEmitter orchestrator.EventEmitter
}

EventEmitterParams holds the parameters for creating a new EventEmitter.

type LoggingPlanner

type LoggingPlanner struct {
}

func NewLoggingPlanner

func NewLoggingPlanner() *LoggingPlanner

func (*LoggingPlanner) Process

func (s *LoggingPlanner) Process(ctx context.Context, plan *models.Plan) error

type StateUpdater

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

StateUpdater is responsible for updating the state of executions and jobs in the plan. It makes sense to have this as the first planner in the chain, so that the desired state is updated before any other planner try to execute the plan, such as forwarding an execution to a compute node.

func NewStateUpdater

func NewStateUpdater(store jobstore.Store) *StateUpdater

NewStateUpdater creates a new instance of StateUpdater with the specified jobstore.Store.

func (*StateUpdater) Process

func (s *StateUpdater) Process(ctx context.Context, plan *models.Plan) error

Process updates the state of the executions in the plan according to the scheduler's desired state.

Jump to

Keyboard shortcuts

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