runpolicy

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package runpolicy is the registry of runnable tile types: how each type's built artifact runs, and which config surface it accepts. It is the runnable-side twin of the managed-engine registry (internal/databases), adding a future type (a scale-to-zero function, say) means adding an entry here, not another scatter of `if kind == "cron"` branches.

Every runnable type shares the same base: a source (git build / image) the deploy engine turns into an artifact, env/refs, and limits. The policy is only what differs: lifecycle and allowed keys.

Index

Constants

This section is empty.

Variables

View Source
var Policies = map[string]Policy{
	"service": {KeepAlive: true, AllowsIngress: true, AllowsCommand: true},
	"cron":    {RequiresSchedule: true, AllowsCommand: true},

	"function": {AllowsCommand: true},
}

Policies is the registry, keyed by tile kind / config type.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	// KeepAlive: the deploy engine starts (and health-gates) a long-lived
	// container after the build. False = the build stops at the artifact;
	// running it is someone else's trigger (the cron scheduler today).
	KeepAlive bool
	// RequiresSchedule gates the schedule: key (and its validation).
	RequiresSchedule bool
	// AllowsCommand gates command:, a cron's one-shot override (run as
	// `sh -c`) or a service's CMD override (argv, appended to the entrypoint).
	AllowsCommand bool
	// AllowsIngress gates port: and domains:, only a keep-alive artifact
	// has an endpoint to route to.
	AllowsIngress bool
}

Policy describes one runnable tile type.

func For

func For(kind string) (Policy, bool)

For returns the policy for a runnable kind; ok is false for kinds that are not runnable (managed, volume, slice).

Jump to

Keyboard shortcuts

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