distribution

package
v0.0.0-...-0b698e0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0, MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package distribution creates a single portable companion bundle using Go's own compiler and archive libraries. Its manifest is integrity metadata only; it is not a signed release or network download trust source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCarrier

func BuildCarrier(ctx context.Context, o Options) (string, companions.Manifest, error)

BuildCarrier stages a private source snapshot, builds four thin payloads with embedding disabled, then embeds their compressed bytes into ONE ARM for the selected supported platform (native by default). Generated assets never touch the caller checkout and cannot race make build.

func VerifyArchive

func VerifyArchive(ctx context.Context, archivePath string) error

VerifyArchive checks the exact closed archive layout, content hashes, Go build metadata. ARM version/protocol are expected source-build values and are checked against actual runtime during provisioning. It never extracts a supplied archive path or executes a foreign architecture binary.

Types

type Artifact

type Artifact struct {
	Name   string `json:"name"`
	OS     string `json:"os"`
	Arch   string `json:"arch"`
	Go     string `json:"go_version"`
	Size   int64  `json:"size_bytes"`
	SHA256 string `json:"sha256"`
}

type Manifest

type Manifest struct {
	Schema    int        `json:"schema"`
	Version   string     `json:"arm_version"`
	Protocol  int        `json:"lifecycle_protocol"`
	Integrity string     `json:"integrity_scope"`
	Artifacts []Artifact `json:"artifacts"`
}

func Build

func Build(ctx context.Context, o Options) (string, Manifest, error)

Build uses the selected Go to build four CGo-free siblings, verifies build metadata/bytes, then publishes one non-overwriting archive. No source/binary downloads or compilers on the destination are involved.

type Options

type Options struct {
	Root, GoBinary, Output, Version string
	// CarrierOS and CarrierArch are paired and apply only to BuildCarrier.
	// Empty values select the builder's native supported platform.
	CarrierOS, CarrierArch string
	Protocol               int
	Jobs                   int
	Log                    io.Writer
}

Jump to

Keyboard shortcuts

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