feat: centralize config paths and expose in snapshot

This commit is contained in:
Peter Steinberger
2026-01-01 09:22:37 +01:00
parent 20bc323963
commit f6956320f9
9 changed files with 78 additions and 44 deletions

View File

@@ -250,23 +250,31 @@ public struct Snapshot: Codable {
public let health: AnyCodable
public let stateversion: StateVersion
public let uptimems: Int
public let configpath: String?
public let statedir: String?
public init(
presence: [PresenceEntry],
health: AnyCodable,
stateversion: StateVersion,
uptimems: Int
uptimems: Int,
configpath: String?,
statedir: String?
) {
self.presence = presence
self.health = health
self.stateversion = stateversion
self.uptimems = uptimems
self.configpath = configpath
self.statedir = statedir
}
private enum CodingKeys: String, CodingKey {
case presence
case health
case stateversion = "stateVersion"
case uptimems = "uptimeMs"
case configpath = "configPath"
case statedir = "stateDir"
}
}