From 044fd94e300e254292527cc0b75886801e48e0f9 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Mon, 2 Oct 2023 00:17:36 +0800 Subject: [PATCH] refactor: add timeout data in report data --- reporter/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reporter/main.go b/reporter/main.go index 699b215..da9197e 100644 --- a/reporter/main.go +++ b/reporter/main.go @@ -15,6 +15,7 @@ type ReportData struct { WorkspaceId string `json:"workspaceId"` Name string `json:"name"` Hostname string `json:"hostname"` + Timeout int `json:"timeout"` // if service receive after timeout second, its means client are offline Payload utils.ReportDataPayload `json:"payload"` } @@ -62,6 +63,7 @@ func main() { WorkspaceId: *WorkspaceId, Name: name, Hostname: hostname, + Timeout: interval * 2, Payload: utils.GetReportDataPaylod(interval, *IsVnstat), }) }