Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirectoryTarArchive ¶
CreateDirectoryTarArchive creates a temporary tar archive containing the specified directory with its structure preserved. Symlinks encountered in the directory are skipped and will not be included in the archive. It returns the path to the temporary tar file and any error encountered. The caller is responsible for removing the temporary file when done.
func CreateTempConfigArchive ¶
CreateTempConfigArchive creates a temporary tar archive containing the specified config files. It returns the path to the temporary tar file and any error encountered. The caller is responsible for removing the temporary file when done.
func PackageFromDirectory ¶
func PackageFromDirectory(dirPath string) (safetensorsPaths []string, tempConfigArchive string, err error)
PackageFromDirectory scans a directory for safetensors files and config files, creating a temporary tar archive of the config files. It returns the paths to safetensors files, path to temporary config archive (if created), and any error encountered.
Types ¶
type DirTarProcessor ¶
type DirTarProcessor struct {
// contains filtered or unexported fields
}
DirTarProcessor handles processing of directory tar paths for packaging
func NewDirTarProcessor ¶
func NewDirTarProcessor(dirTarPaths []string, baseDir string) *DirTarProcessor
NewDirTarProcessor creates a new processor for directory tar paths
func (*DirTarProcessor) Process ¶
func (p *DirTarProcessor) Process() ([]string, func(), error)
Process processes all directory tar paths, validates them, and creates temporary tar archives. Returns a list of temporary tar file paths, cleanup function, and any error encountered. The caller is responsible for adding these tar files to the builder.