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.
Click to show internal directories.
Click to hide internal directories.