mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-27 11:07:15 +02:00
hscontrol/util/zlog/zf: add tag, authkey, and route constants
Add new zerolog field constants for improved logging consistency: - Tag fields: CurrentTags, RemovedTags, RejectedTags, NewTags, OldTags, IsTagged, WasAuthKeyTagged - Node fields: ExistingNodeID - AuthKey fields: AuthKeyID, AuthKeyUsed, AuthKeyExpired, AuthKeyReusable, NodeKeyRotation - Route fields: RoutesApprovedOld, RoutesApprovedNew, OldAnnouncedRoutes, NewAnnouncedRoutes, ApprovedRoutes, OldApprovedRoutes, NewApprovedRoutes, AutoApprovedRoutes, AllApprovedRoutes, RouteChanged
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
|||||||
NodeExpired = "node.expired"
|
NodeExpired = "node.expired"
|
||||||
NodeHostname = "node.hostname"
|
NodeHostname = "node.hostname"
|
||||||
ExistingNodeName = "existing.node.name"
|
ExistingNodeName = "existing.node.name"
|
||||||
|
ExistingNodeID = "existing.node.id"
|
||||||
CurrentHostname = "current_hostname"
|
CurrentHostname = "current_hostname"
|
||||||
RejectedHostname = "rejected_hostname"
|
RejectedHostname = "rejected_hostname"
|
||||||
OldHostname = "old_hostname"
|
OldHostname = "old_hostname"
|
||||||
@@ -36,6 +37,17 @@ const (
|
|||||||
ExpiresAt = "expiresAt"
|
ExpiresAt = "expiresAt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Tag fields for reauth and tag operations.
|
||||||
|
const (
|
||||||
|
CurrentTags = "current.tags"
|
||||||
|
RemovedTags = "removed.tags"
|
||||||
|
RejectedTags = "rejected.tags"
|
||||||
|
NewTags = "new.tags"
|
||||||
|
OldTags = "old.tags"
|
||||||
|
IsTagged = "is.tagged"
|
||||||
|
WasAuthKeyTagged = "was.authkey.tagged"
|
||||||
|
)
|
||||||
|
|
||||||
// Machine fields.
|
// Machine fields.
|
||||||
const (
|
const (
|
||||||
MachineKey = "machine.key"
|
MachineKey = "machine.key"
|
||||||
@@ -62,6 +74,11 @@ const (
|
|||||||
PAKUsed = "pak.used"
|
PAKUsed = "pak.used"
|
||||||
PAKIsTagged = "pak.is_tagged"
|
PAKIsTagged = "pak.is_tagged"
|
||||||
PAKExpiration = "pak.expiration"
|
PAKExpiration = "pak.expiration"
|
||||||
|
AuthKeyID = "authkey.id"
|
||||||
|
AuthKeyUsed = "authkey.used"
|
||||||
|
AuthKeyExpired = "authkey.expired"
|
||||||
|
AuthKeyReusable = "authkey.reusable"
|
||||||
|
NodeKeyRotation = "nodekey.rotation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// APIKey fields.
|
// APIKey fields.
|
||||||
@@ -76,6 +93,16 @@ const (
|
|||||||
const (
|
const (
|
||||||
RoutesAnnounced = "routes.announced"
|
RoutesAnnounced = "routes.announced"
|
||||||
RoutesApproved = "routes.approved"
|
RoutesApproved = "routes.approved"
|
||||||
|
RoutesApprovedOld = "routes.approved.old"
|
||||||
|
RoutesApprovedNew = "routes.approved.new"
|
||||||
|
OldAnnouncedRoutes = "oldAnnouncedRoutes"
|
||||||
|
NewAnnouncedRoutes = "newAnnouncedRoutes"
|
||||||
|
ApprovedRoutes = "approvedRoutes"
|
||||||
|
OldApprovedRoutes = "oldApprovedRoutes"
|
||||||
|
NewApprovedRoutes = "newApprovedRoutes"
|
||||||
|
AutoApprovedRoutes = "autoApprovedRoutes"
|
||||||
|
AllApprovedRoutes = "allApprovedRoutes"
|
||||||
|
RouteChanged = "routeChanged"
|
||||||
Prefix = "prefix"
|
Prefix = "prefix"
|
||||||
FinalState = "finalState"
|
FinalState = "finalState"
|
||||||
NewState = "newState"
|
NewState = "newState"
|
||||||
|
|||||||
Reference in New Issue
Block a user