Documentation
¶
Index ¶
- func CreateAndUploadArchive(ctx context.Context, options CreateOptions, si common.ClipStorageInfo) error
- func CreateAndUploadOCIArchive(ctx context.Context, options CreateFromOCIImageOptions, ...) error
- func CreateArchive(options CreateOptions) error
- func CreateFromOCIImage(ctx context.Context, options CreateFromOCIImageOptions) error
- func ExtractArchive(options ExtractOptions) error
- func MountArchive(options MountOptions) (func() error, <-chan error, *fuse.Server, error)
- func SetLogLevel(level string) error
- func StoreS3(storeS3Opts StoreS3Options) error
- type ClipArchiver
- func (ca *ClipArchiver) Create(opts ClipArchiverOptions) error
- func (ca *ClipArchiver) CreateFromOCI(ctx context.Context, opts IndexOCIImageOptions, clipOut string) error
- func (ca *ClipArchiver) CreateRemoteArchive(storageInfo common.ClipStorageInfo, metadata *common.ClipArchiveMetadata, ...) error
- func (ca *ClipArchiver) DecodeHeader(headerBytes []byte) (*common.ClipArchiveHeader, error)
- func (ca *ClipArchiver) EncodeHeader(header *common.ClipArchiveHeader) ([]byte, error)
- func (ca *ClipArchiver) EncodeIndex(index *btree.BTree) ([]byte, error)
- func (ca *ClipArchiver) Extract(opts ClipArchiverOptions) error
- func (ca *ClipArchiver) ExtractMetadata(archivePath string) (*common.ClipArchiveMetadata, error)
- func (ca *ClipArchiver) IndexOCIImage(ctx context.Context, opts IndexOCIImageOptions) (index *btree.BTree, layerDigests []string, ...)
- type ClipArchiverOptions
- type ClipFileSystem
- type ClipFileSystemOpts
- type CreateFromOCIImageOptions
- type CreateOptions
- type CreateRemoteOptions
- type ExtractOptions
- type FSNode
- func (n *FSNode) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *FSNode) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *FSNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *FSNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *FSNode) OnAdd(ctx context.Context)
- func (n *FSNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *FSNode) Opendir(ctx context.Context) syscall.Errno
- func (n *FSNode) Read(ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (n *FSNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (n *FSNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)
- func (n *FSNode) Rename(ctx context.Context, oldName string, newParent fs.InodeEmbedder, ...) syscall.Errno
- func (n *FSNode) Rmdir(ctx context.Context, name string) syscall.Errno
- func (n *FSNode) Unlink(ctx context.Context, name string) syscall.Errno
- type IndexOCIImageOptions
- type InodeGenerator
- type MountOptions
- type OCIIndexProgress
- type RClipArchiver
- type StoreS3Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndUploadArchive ¶
func CreateAndUploadArchive(ctx context.Context, options CreateOptions, si common.ClipStorageInfo) error
func CreateAndUploadOCIArchive ¶
func CreateAndUploadOCIArchive(ctx context.Context, options CreateFromOCIImageOptions, si common.ClipStorageInfo) error
CreateAndUploadOCIArchive creates an OCI index and uploads metadata to S3 This combines indexing with remote storage upload
func CreateFromOCIImage ¶
func CreateFromOCIImage(ctx context.Context, options CreateFromOCIImageOptions) error
CreateFromOCIImage creates a metadata-only index (.clip) file from an OCI image
func MountArchive ¶
Mount a clip archive to a directory
func SetLogLevel ¶
SetLogLevel configures the logging verbosity for the CLIP library. Valid levels: "debug", "info", "warn", "error", "disabled" Use "debug" to see detailed operation logs (file operations, cache hits/misses, etc.) Use "info" for high-level operation logs (default) Use "disabled" to suppress all logs
Types ¶
type ClipArchiver ¶
type ClipArchiver struct {
}
func NewClipArchiver ¶
func NewClipArchiver() *ClipArchiver
func (*ClipArchiver) Create ¶
func (ca *ClipArchiver) Create(opts ClipArchiverOptions) error
func (*ClipArchiver) CreateFromOCI ¶
func (ca *ClipArchiver) CreateFromOCI(ctx context.Context, opts IndexOCIImageOptions, clipOut string) error
CreateFromOCI creates a metadata-only .clip file from an OCI image
func (*ClipArchiver) CreateRemoteArchive ¶
func (ca *ClipArchiver) CreateRemoteArchive(storageInfo common.ClipStorageInfo, metadata *common.ClipArchiveMetadata, outputFile string) error
func (*ClipArchiver) DecodeHeader ¶
func (ca *ClipArchiver) DecodeHeader(headerBytes []byte) (*common.ClipArchiveHeader, error)
func (*ClipArchiver) EncodeHeader ¶
func (ca *ClipArchiver) EncodeHeader(header *common.ClipArchiveHeader) ([]byte, error)
func (*ClipArchiver) EncodeIndex ¶
func (ca *ClipArchiver) EncodeIndex(index *btree.BTree) ([]byte, error)
func (*ClipArchiver) Extract ¶
func (ca *ClipArchiver) Extract(opts ClipArchiverOptions) error
func (*ClipArchiver) ExtractMetadata ¶
func (ca *ClipArchiver) ExtractMetadata(archivePath string) (*common.ClipArchiveMetadata, error)
func (*ClipArchiver) IndexOCIImage ¶
func (ca *ClipArchiver) IndexOCIImage(ctx context.Context, opts IndexOCIImageOptions) ( index *btree.BTree, layerDigests []string, gzipIdx map[string]*common.GzipIndex, decompressedHashes map[string]string, registryURL string, repository string, reference string, imageMetadata *common.ImageMetadata, err error, )
IndexOCIImage creates a metadata-only index from an OCI image
type ClipArchiverOptions ¶
type ClipFileSystem ¶
type ClipFileSystem struct {
// contains filtered or unexported fields
}
func NewFileSystem ¶
func NewFileSystem(s storage.ClipStorageInterface, opts ClipFileSystemOpts) (*ClipFileSystem, error)
func (*ClipFileSystem) CacheFile ¶
func (cfs *ClipFileSystem) CacheFile(node *FSNode)
func (*ClipFileSystem) Root ¶
func (cfs *ClipFileSystem) Root() (fs.InodeEmbedder, error)
type ClipFileSystemOpts ¶
type ClipFileSystemOpts struct {
Verbose bool
ContentCache storage.ContentCache
ContentCacheAvailable bool
}
type CreateFromOCIImageOptions ¶
type CreateFromOCIImageOptions struct {
ImageRef string // Source image to index (can be local)
StorageImageRef string // Optional: image reference to store in metadata (defaults to ImageRef)
OutputPath string
CheckpointMiB int64
CredProvider interface{}
ProgressChan chan<- OCIIndexProgress // optional channel for progress updates
Platform *v1.Platform // Target platform (defaults to linux/runtime.GOARCH)
}
CreateFromOCIImageOptions configures OCI image indexing
type CreateOptions ¶
type CreateOptions struct {
InputPath string
OutputPath string
Credentials storage.ClipStorageCredentials
ProgressChan chan<- int
}
type CreateRemoteOptions ¶
type ExtractOptions ¶
type FSNode ¶
type IndexOCIImageOptions ¶
type IndexOCIImageOptions struct {
ImageRef string // Source image to index (can be local)
StorageImageRef string // Optional: image reference to store in metadata (defaults to ImageRef)
CheckpointMiB int64 // Checkpoint every N MiB (default 2)
CredProvider common.RegistryCredentialProvider // optional credential provider for registry authentication
ProgressChan chan<- OCIIndexProgress // optional channel for progress updates
Platform *v1.Platform // Target platform (defaults to linux/runtime.GOARCH)
}
IndexOCIImageOptions configures the OCI indexer
type InodeGenerator ¶
type InodeGenerator struct {
// contains filtered or unexported fields
}
InodeGenerator generates unique inodes for each ClipNode
func (*InodeGenerator) Next ¶
func (ig *InodeGenerator) Next() uint64
type MountOptions ¶
type MountOptions struct {
ArchivePath string
MountPoint string
CachePath string
ContentCache storage.ContentCache
ContentCacheAvailable bool
StorageInfo common.ClipStorageInfo
Credentials storage.ClipStorageCredentials
UseCheckpoints bool // Enable checkpoint-based partial decompression for OCI layers
RegistryCredProvider interface{} // Registry authentication (for OCI archives)
}
type OCIIndexProgress ¶
type OCIIndexProgress struct {
LayerIndex int // Current layer being processed (1-based)
TotalLayers int // Total number of layers
LayerDigest string // Digest of current layer
Stage string // "starting" or "completed"
FilesIndexed int // Number of files indexed so far (only for "completed")
Message string // Human-readable message
}
OCIIndexProgress represents a progress update during OCI image indexing
type RClipArchiver ¶
type RClipArchiver struct {
ClipArchiver *ClipArchiver
StorageInfo common.ClipStorageInfo
}
func NewRClipArchiver ¶
func NewRClipArchiver(si common.ClipStorageInfo) (*RClipArchiver, error)