scheduler

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package scheduler is the placement port (ADR-0017): the control-plane decision of which worker/node runs a function replica. V1 ships a single-node driver (internal/scheduler/singlenode); multi-node bin-packing across registered worker nodes is a driver swap behind this port. The controller's Function reconciler is the caller — this package imports no controller, store, or runtime; placement is decided from the Request alone.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Placement

type Placement struct {
	WorkerNode v1.ObjectName
}

Placement is the scheduler's decision: which worker/node runs the replica.

type Request

type Request struct {
	Namespace v1.NamespaceName
	Name      v1.ObjectName
	Replica   int
}

Request identifies a function replica to place. A multi-node driver will extend this with resource fields (from the Function `resources` spec) when it first bin-packs on them; V1 carries no inert fields.

type Scheduler

type Scheduler interface {
	Schedule(ctx context.Context, req Request) (Placement, error)
}

Scheduler decides where a function replica runs. V1 ships a single-node driver; multi-node bin-packing is a driver swap behind this port. Errors are api/fault; the method is ctx-first.

Directories

Path Synopsis
Package schedulercontract is the shared conformance suite for the scheduler.Scheduler port (ADR-0017): Run asserts the port guarantee against any driver — a valid request yields a non-empty Placement.WorkerNode and no error.
Package schedulercontract is the shared conformance suite for the scheduler.Scheduler port (ADR-0017): Run asserts the port guarantee against any driver — a valid request yields a non-empty Placement.WorkerNode and no error.
Package singlenode is the single-node scheduler driver (ADR-0017): it places every function replica on one configured local worker — total and deterministic.
Package singlenode is the single-node scheduler driver (ADR-0017): it places every function replica on one configured local worker — total and deterministic.

Jump to

Keyboard shortcuts

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