platform

package
v0.1.0-dev.20260310195223 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package platform is a data provider — the Starlark surface for op.Context.Platform. It holds no independent state; it wraps the Platform struct that the executor places on the execution context.

Like all providers, platform is a singleton that follows the lifetime of its graph (execution) or script (planning). It receives context at construction time via a constructor that accepts a context object by reference. The provider reads Platform data from that context — it never creates or owns a Platform.

Access type is "both":

  • Immediate: platform.distro returns a string from the local machine's Platform. Useful for single-machine local plans.
  • Planned: plan.platform.distro returns a promise (Output) that the executor resolves against the target machine's Platform at execution time. This is critical for graphs targeting remote machines — the graph is planned once and can be executed on many targets, each with a different Platform.

Because the provider is read-only (no side effects), it has no action methods, no compensation pairs, and no codegen. Concrete manager types are private; consumers see only op.PackageManager and op.ServiceManager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *op.Platform

New returns a fully populated Platform for the current OS.

Types

This section is empty.

Jump to

Keyboard shortcuts

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