Documentation
¶
Index ¶
- Constants
- Variables
- func CrossCompile(opts CrossCompileOpts) error
- func DownloadLatestRelease(arch, destPath string) error
- func DownloadRelease(ver, arch, destPath string) error
- func ExtractFullsendFromTarGz(r io.Reader, destPath string) error
- func IsReleasedVersion(v string) bool
- func ModuleRoot() (string, error)
- func ResolveExplicit(path, arch string) error
- func ValidArch(arch string) bool
- func ValidateLinuxBinary(path, arch string) error
- type AcquireResult
- type CrossCompileOpts
- type Source
Constants ¶
const DefaultArch = "amd64"
DefaultArch is the architecture used for vendored binaries (linux/amd64 GHA runners).
Variables ¶
var HTTPClient = &http.Client{Timeout: 120 * time.Second}
HTTPClient is used for release downloads. Tests may override. Not safe for concurrent test mutation.
var ReleaseBaseURL = "https://github.com/fullsend-ai/fullsend/releases/download"
ReleaseBaseURL is the GitHub releases download base URL. Tests may override. Not safe for concurrent test mutation.
Functions ¶
func CrossCompile ¶
func CrossCompile(opts CrossCompileOpts) error
CrossCompile builds a Linux fullsend binary and writes it to DestPath. Requires the Go toolchain and a fullsend module checkout (go env GOMOD).
func DownloadLatestRelease ¶
DownloadLatestRelease resolves the latest release tag from the GitHub API and downloads the Linux binary for the given arch.
func DownloadRelease ¶
DownloadRelease downloads the fullsend binary for linux/{arch} from the GitHub Release matching the given version, verifies its SHA256 checksum against the release checksums.txt, and writes it to destPath.
func ExtractFullsendFromTarGz ¶
ExtractFullsendFromTarGz reads a tar.gz stream and extracts the "fullsend" binary to destPath.
func IsReleasedVersion ¶
IsReleasedVersion returns true if version looks like a release tag (e.g. "0.4.0", "v0.4.0") rather than a dev build (e.g. "dev", "0.4.0-3-gabcdef", "0.4.0-vendored").
func ModuleRoot ¶
ModuleRoot returns the fullsend module root directory, or an error if not inside a Go module checkout.
func ResolveExplicit ¶
ResolveExplicit validates that path is a Linux ELF for arch.
func ValidateLinuxBinary ¶
ValidateLinuxBinary checks that the file at path is a Linux ELF executable for the expected architecture. Returns a descriptive error if the file is missing, not ELF, not Linux, or the wrong architecture.
Types ¶
type AcquireResult ¶
type AcquireResult struct {
TmpDir string // caller must RemoveAll when non-empty
Path string
Source Source
}
AcquireResult holds the path to an acquired binary and metadata for callers.
func ResolveForRun ¶
func ResolveForRun(version, arch string) (AcquireResult, error)
ResolveForRun obtains a Linux binary using the run policy: release download (if released) → cross-compile → latest release.
func ResolveForVendor ¶
func ResolveForVendor(version, arch string) (AcquireResult, error)
ResolveForVendor obtains a Linux binary using the vendoring policy: cross-compile from checkout → matching release (released CLI only) → fail. No latest-release fallback.