script

package
v1.78.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package script is a module's enabled script as a scheduler rule. The script is veto-only: true has no opinion and cannot turn a module on; false is a Forbid. A script that cannot be evaluated keeps its last verdict, so a transient failure does not flip a running module; with no verdict yet it is a Forbid.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Descriptor

type Descriptor struct {
	Path     string
	Settings addonutils.Values
	Values   addonutils.Values
}

Descriptor is a module's enabled script with its inputs: Values with the global block, Settings the module's own settings. The rule replaces global.enabledModules in Values before the run.

type Rule

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

Rule is the enabled-script rule of one module.

func NewRule

func NewRule(descriptor func() *Descriptor, enabledModules func() []string, inputs func() string, logger *log.Logger) *Rule

NewRule constructs the rule of the script descriptor returns (nil: none). enabledModules is what the script sees as global.enabledModules; inputs identifies the settings and values the script reads (nil: run on every decision); logger should name the module.

func (*Rule) Decide

func (r *Rule) Decide() rule.Decision

Decide runs the script, under context.Background: rule.Rule carries no context. It has no timeout, accepted: the script runs under the scheduler's mutex, so a hung script would block every scheduler call; the scripts are small and ship with deckhouse. The error is only logged: the status keeps showing the last verdict.

Jump to

Keyboard shortcuts

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