mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-11-26 03:23:07 +01:00
Add sqlite and s3 job archive backend
Add documentation Extend config
This commit is contained in:
@@ -28,20 +28,26 @@ import (
|
||||
"github.com/santhosh-tekuri/jsonschema/v5"
|
||||
)
|
||||
|
||||
// FsArchiveConfig holds the configuration for the filesystem archive backend.
|
||||
type FsArchiveConfig struct {
|
||||
Path string `json:"path"`
|
||||
Path string `json:"path"` // Root directory path for the archive
|
||||
}
|
||||
|
||||
// FsArchive implements ArchiveBackend using a hierarchical filesystem structure.
|
||||
// Jobs are stored in directories organized by cluster, job ID, and start time.
|
||||
//
|
||||
// Directory structure: <path>/<cluster>/<jobid/1000>/<jobid%1000>/<starttime>/
|
||||
type FsArchive struct {
|
||||
path string
|
||||
clusters []string
|
||||
path string // Root path of the archive
|
||||
clusters []string // List of discovered cluster names
|
||||
}
|
||||
|
||||
// clusterInfo holds statistics about jobs in a cluster.
|
||||
type clusterInfo struct {
|
||||
numJobs int
|
||||
dateFirst int64
|
||||
dateLast int64
|
||||
diskSize float64
|
||||
numJobs int // Total number of jobs
|
||||
dateFirst int64 // Unix timestamp of oldest job
|
||||
dateLast int64 // Unix timestamp of newest job
|
||||
diskSize float64 // Total disk usage in MB
|
||||
}
|
||||
|
||||
func getDirectory(
|
||||
|
||||
Reference in New Issue
Block a user