runtimetarget

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package runtimetarget defines the closed platform target contract shared by runtime supervision, host compatibility checks, and persisted registry data.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("runtime target is unsupported")

Functions

func Validate

func Validate(target Target) error

Types

type Target

type Target uint8

Target identifies one supported runtime operating-system and architecture pair. The zero value and values outside the declared constants are invalid.

const (
	DarwinAMD64 Target = iota + 1
	DarwinARM64
	LinuxAMD64
	LinuxARM64
)

func Current

func Current() (Target, error)

Current resolves the current process platform to a supported target.

func FromParts

func FromParts(os, arch string) (Target, error)

FromParts constructs a target from canonical wire components.

func Parse

func Parse(value string) (Target, error)

Parse parses the canonical os/arch target identifier.

func Supported

func Supported() []Target

Supported returns the complete canonical target set in lexical order.

func (Target) Arch

func (target Target) Arch() string

func (Target) MarshalJSON

func (target Target) MarshalJSON() ([]byte, error)

func (Target) OS

func (target Target) OS() string

func (Target) String

func (target Target) String() string

func (*Target) UnmarshalJSON

func (target *Target) UnmarshalJSON(raw []byte) error

Jump to

Keyboard shortcuts

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