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

artifact

package module
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package artifact is an SDK for managing Flux artifacts.

This package provides comprehensive functionality for packaging artifacts, storing, serving, and processing in Flux source-controller. It includes:

Configuration Management (config pkg):

  • Flag binding with environment variable support for all artifact options
  • Storage path, server address, and advertised address configuration
  • Artifact retention policies (TTL and record count limits)
  • Configurable digest algorithms for artifact integrity verification

Artifact File Server (server pkg):

  • Designed to serve artifacts over HTTP with proper content handling
  • HTTP file server with graceful shutdown support compatible with controller-runtime

Digest Computation (digest pkg):

  • Multi-algorithm digest support (SHA1, SHA256, SHA512, BLAKE3)
  • MultiDigester for computing multiple checksums simultaneously
  • Algorithm validation and availability checking

Storage Management (storage pkg):

  • Complete artifact lifecycle management (create, verify, archive, cleanup)
  • Atomic file operations with temporary file handling
  • Tarball creation and extraction with filtering support
  • Garbage collection based on TTL and retention policies
  • File locking and symlink management
  • Secure path handling to prevent directory traversal attacks
  • Integration with Flux meta.Artifact types and OCI utilities

The SDK standardizes artifact handling in Flux source-controller and provides a foundation for building 3rd party controllers that manage ExternalArtifacts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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