diff --git a/api/datastore/test_data/output_24_to_latest.json b/api/datastore/test_data/output_24_to_latest.json index 95bf7f980..575924ca5 100644 --- a/api/datastore/test_data/output_24_to_latest.json +++ b/api/datastore/test_data/output_24_to_latest.json @@ -35,6 +35,12 @@ "TenantID": "" }, "ComposeSyntaxMaxVersion": "", + "Edge": { + "AsyncMode": false, + "CommandInterval": 0, + "PingInterval": 0, + "SnapshotInterval": 0 + }, "EdgeCheckinInterval": 0, "EdgeKey": "", "GroupId": 1, @@ -682,6 +688,12 @@ "BlackListedLabels": [], "DisplayDonationHeader": false, "DisplayExternalContributors": false, + "Edge": { + "AsyncMode": false, + "CommandInterval": 0, + "PingInterval": 0, + "SnapshotInterval": 0 + }, "EdgeAgentCheckinInterval": 5, "EdgePortainerUrl": "", "EnableEdgeComputeFeatures": false, diff --git a/api/portainer.go b/api/portainer.go index 8eb8e4167..786b4a834 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -345,6 +345,17 @@ type ( // Whether the device has been trusted or not by the user UserTrusted bool + Edge struct { + // Whether the device has been started in edge async mode + AsyncMode bool + // The ping interval for edge agent - used in edge async mode [seconds] + PingInterval int `json:"PingInterval" example:"60"` + // The snapshot interval for edge agent - used in edge async mode [seconds] + SnapshotInterval int `json:"SnapshotInterval" example:"60"` + // The command list interval for edge agent - used in edge async mode [seconds] + CommandInterval int `json:"CommandInterval" example:"60"` + } + // Deprecated fields // Deprecated in DBVersion == 4 TLS bool `json:"TLS,omitempty"` @@ -837,6 +848,17 @@ type ( // EdgePortainerURL is the URL that is exposed to edge agents EdgePortainerURL string `json:"EdgePortainerUrl"` + Edge struct { + // The command list interval for edge agent - used in edge async mode (in seconds) + CommandInterval int `json:"CommandInterval" example:"5"` + // The ping interval for edge agent - used in edge async mode (in seconds) + PingInterval int `json:"PingInterval" example:"5"` + // The snapshot interval for edge agent - used in edge async mode (in seconds) + SnapshotInterval int `json:"SnapshotInterval" example:"5"` + // EdgeAsyncMode enables edge async mode by default + AsyncMode bool + } + // Deprecated fields DisplayDonationHeader bool DisplayExternalContributors bool