platform

package
v0.1.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package platform normalizes and matches OCI platform strings ("linux/amd64"). It is the single vocabulary for node arch reporting (T-87) and arch-aware placement (T-88): nodes report Local(), user input goes through Normalize(), and the scheduler filters with Supports().

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Local

func Local() string

Local is the platform string of the running binary, e.g. "linux/amd64".

func Normalize

func Normalize(s string) (string, error)

Normalize lowercases and validates an "os/arch" platform string, mapping common arch aliases (x86_64→amd64, aarch64→arm64, arm64/v8→arm64). It returns an error for anything that is not a recognizable OCI platform.

func Supports

func Supports(nodeArch string, platforms []string) bool

Supports reports whether a node with the given os_arch can run an image constrained to platforms. An empty platforms list means "runs anywhere" (legacy releases and uninspectable images). Both sides are normalized best-effort so stored aliases still match.

Types

This section is empty.

Jump to

Keyboard shortcuts

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