WIP: Save current state - security subsystems, migrations, logging
This commit is contained in:
18
aggregator-agent/internal/cache/local.go
vendored
18
aggregator-agent/internal/cache/local.go
vendored
@@ -13,17 +13,17 @@ import (
|
||||
|
||||
// LocalCache stores scan results locally for offline viewing
|
||||
type LocalCache struct {
|
||||
LastScanTime time.Time `json:"last_scan_time"`
|
||||
LastCheckIn time.Time `json:"last_check_in"`
|
||||
AgentID uuid.UUID `json:"agent_id"`
|
||||
ServerURL string `json:"server_url"`
|
||||
UpdateCount int `json:"update_count"`
|
||||
Updates []client.UpdateReportItem `json:"updates"`
|
||||
AgentStatus string `json:"agent_status"`
|
||||
LastScanTime time.Time `json:"last_scan_time"`
|
||||
LastCheckIn time.Time `json:"last_check_in"`
|
||||
AgentID uuid.UUID `json:"agent_id"`
|
||||
ServerURL string `json:"server_url"`
|
||||
UpdateCount int `json:"update_count"`
|
||||
Updates []client.UpdateReportItem `json:"updates"`
|
||||
AgentStatus string `json:"agent_status"`
|
||||
}
|
||||
|
||||
// CacheDir is the directory where local cache is stored
|
||||
const CacheDir = "/var/lib/redflag"
|
||||
const CacheDir = "/var/lib/redflag-agent"
|
||||
|
||||
// CacheFile is the file where scan results are cached
|
||||
const CacheFile = "last_scan.json"
|
||||
@@ -126,4 +126,4 @@ func (c *LocalCache) Clear() {
|
||||
c.UpdateCount = 0
|
||||
c.Updates = []client.UpdateReportItem{}
|
||||
c.AgentStatus = ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user