forkidentity

package
v0.0.0-...-2aa6f69 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	WaitEnv = "KERNEL_FORK_IDENTITY_WAIT"

	DefaultReadyFile   = "/run/kernel/fork-identity-ready"
	DefaultPayloadFile = "/run/kernel/fork-identity.json"
	DefaultAppliedFile = "/run/kernel/fork-identity-applied"
)
View Source
const MaxPayloadBytes = 64 * 1024

Variables

View Source
var (
	ReadyFile   = DefaultReadyFile
	PayloadFile = DefaultPayloadFile
	AppliedFile = DefaultAppliedFile
)
View Source
var KnownEnvKeys = []string{
	"INSTANCE_NAME",
	"INST_NAME",
	"METRO_NAME",
	"XDS_SERVER",
	"KERNEL_INSTANCE_JWT",
	"METRO_API_URL",
	"KERNEL_METRO_API_BASE_URL",
	"SESSION_INTEL_URL",
	"S2_STREAM",
}

Functions

func AppliedMarkerMatches

func AppliedMarkerMatches(instanceName string) (bool, error)

func ClearEnvKeys

func ClearEnvKeys(payload Payload) []string

func Env

func Env(payload Payload) map[string]string

func ExtensionAPIURL

func ExtensionAPIURL(payload Payload) string

func FirstNonEmpty

func FirstNonEmpty(values ...string) string

func MetroAPIURL

func MetroAPIURL(payload Payload) string

func ReadAppliedMarker

func ReadAppliedMarker() (string, error)

func WaitAppliedMarker

func WaitAppliedMarker(instanceName string, timeout time.Duration) error

func WaitEnabled

func WaitEnabled() (bool, error)

func WriteAppliedMarker

func WriteAppliedMarker(instanceName string) error

func WritePayload

func WritePayload(payload Payload) error

Types

type ExtensionConfig

type ExtensionConfig struct {
	InstanceName string `json:"instanceName"`
	MetroAPIURL  string `json:"metroApiUrl"`
}

func ExtensionConfigFromPayload

func ExtensionConfigFromPayload(payload Payload) ExtensionConfig

type Payload

type Payload map[string]string

func ReadPayload

func ReadPayload() (Payload, error)

func (Payload) Get

func (p Payload) Get(key string) string

func (Payload) InstanceName

func (p Payload) InstanceName() string

func (Payload) Validate

func (p Payload) Validate() error

Jump to

Keyboard shortcuts

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