Help us shape the future of Go! Take the 2026 Go Developer Survey

runtimeenv

package
v0.57.19 Latest Latest
Warning

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

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

Documentation

Overview

Package runtimeenv resolves process-local performance policy from runtime facts. Gates choose equivalent implementations; they do not grant capabilities or change stored formats. Unknown environments retain the baseline policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine string

Engine identifies the executing browser engine, independent of browser brand.

const (
	// EngineUnknown includes native hosts and unrecognized JavaScript hosts.
	EngineUnknown Engine = "unknown"
	// EngineChromium identifies Blink-based Chromium hosts, including Electron.
	EngineChromium Engine = "chromium"
	// EngineWebKit identifies Safari and other WebKit hosts.
	EngineWebKit Engine = "webkit"
)

type Environment

type Environment struct {
	// Engine identifies the host's browser engine.
	Engine Engine
}

Environment contains immutable runtime facts used to resolve feature policy.

func Current

func Current() Environment

Current retains baseline performance policy on native hosts.

func (Environment) Enabled

func (e Environment) Enabled(feature Feature) bool

Enabled resolves a feature for this environment. Unknown features stay disabled.

type Feature

type Feature uint8

Feature names a performance choice with a baseline implementation.

const (
	// BatchCopyExistence resolves destination existence with each copy write batch.
	BatchCopyExistence Feature = iota + 1
)

Jump to

Keyboard shortcuts

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