Openstatus www.openstatus.dev

๐Ÿš€ memory checker (#987)

authored by

Thibault Le Ouay and committed by
GitHub
f17eb2da 6fc67f29

+35 -30
+4 -4
apps/checker/cmd/main.go
··· 26 26 27 27 // We should export it 28 28 type PingResponse struct { 29 + Body string `json:"body,omitempty"` 30 + Headers string `json:"headers,omitempty"` 31 + Region string `json:"region"` 29 32 RequestId int64 `json:"requestId,omitempty"` 30 33 WorkspaceId int64 `json:"workspaceId,omitempty"` 31 - Status int `json:"status,omitempty"` 32 34 Latency int64 `json:"latency"` 33 - Body string `json:"body,omitempty"` 34 - Headers string `json:"headers,omitempty"` 35 35 Time int64 `json:"time"` 36 36 Timing checker.Timing `json:"timing"` 37 - Region string `json:"region"` 37 + Status int `json:"status,omitempty"` 38 38 } 39 39 40 40 func (s statusCode) IsSuccessful() bool {
+11 -11
apps/checker/ping.go
··· 21 21 type PingData struct { 22 22 WorkspaceID string `json:"workspaceId"` 23 23 MonitorID string `json:"monitorId"` 24 - Timestamp int64 `json:"timestamp"` 25 - StatusCode int `json:"statusCode,omitempty"` 26 - Latency int64 `json:"latency"` 27 - CronTimestamp int64 `json:"cronTimestamp"` 28 24 URL string `json:"url"` 29 25 Region string `json:"region"` 30 26 Message string `json:"message,omitempty"` 31 27 Timing string `json:"timing,omitempty"` 32 28 Headers string `json:"headers,omitempty"` 33 - Error uint8 `json:"error"` 34 29 Assertions string `json:"assertions"` 35 30 Body string `json:"body,omitempty"` 31 + Latency int64 `json:"latency"` 32 + CronTimestamp int64 `json:"cronTimestamp"` 33 + Timestamp int64 `json:"timestamp"` 34 + StatusCode int `json:"statusCode,omitempty"` 35 + Error uint8 `json:"error"` 36 36 } 37 37 38 38 type Timing struct { ··· 49 49 } 50 50 51 51 type Response struct { 52 + Headers map[string]string `json:"headers,omitempty"` 53 + Error string `json:"error,omitempty"` 54 + Body string `json:"body,omitempty"` 55 + Region string `json:"region"` 56 + Tags []string `json:"tags,omitempty"` 52 57 RequestId int64 `json:"requestId,omitempty"` 53 58 WorkspaceId int64 `json:"workspaceId,omitempty"` 54 - Status int `json:"status,omitempty"` 55 59 Latency int64 `json:"latency"` 56 - Body string `json:"body,omitempty"` 57 - Headers map[string]string `json:"headers,omitempty"` 58 60 Time int64 `json:"time"` 59 61 Timing Timing `json:"timing"` 60 - Error string `json:"error,omitempty"` 61 - Tags []string `json:"tags,omitempty"` 62 - Region string `json:"region"` 62 + Status int `json:"status,omitempty"` 63 63 } 64 64 65 65 func Ping(ctx context.Context, client *http.Client, inputData request.CheckerRequest) (PingData, error) {
+12 -12
apps/checker/request/request.go
··· 46 46 } 47 47 48 48 type CheckerRequest struct { 49 - WorkspaceID string `json:"workspaceId"` 50 - URL string `json:"url"` 51 - MonitorID string `json:"monitorId"` 52 - Method string `json:"method"` 53 - CronTimestamp int64 `json:"cronTimestamp"` 54 - Body string `json:"body"` 55 - Timeout int64 `json:"timeout"` 56 - DegradedAfter int64 `json:"degradedAfter,omitempty"` 57 - Headers []struct { 49 + Headers []struct { 58 50 Key string `json:"key"` 59 51 Value string `json:"value"` 60 52 } `json:"headers,omitempty"` 53 + WorkspaceID string `json:"workspaceId"` 54 + URL string `json:"url"` 55 + MonitorID string `json:"monitorId"` 56 + Method string `json:"method"` 61 57 Status string `json:"status"` 58 + Body string `json:"body"` 62 59 RawAssertions []json.RawMessage `json:"assertions,omitempty"` 60 + CronTimestamp int64 `json:"cronTimestamp"` 61 + Timeout int64 `json:"timeout"` 62 + DegradedAfter int64 `json:"degradedAfter,omitempty"` 63 63 } 64 64 65 65 type PingRequest struct { 66 - RequestId int64 `json:"requestId"` 67 - WorkspaceId int64 `json:"workspaceId"` 66 + Headers map[string]string `json:"headers"` 68 67 URL string `json:"url"` 69 68 Method string `json:"method"` 70 69 Body string `json:"body"` 71 - Headers map[string]string `json:"headers"` 70 + RequestId int64 `json:"requestId"` 71 + WorkspaceId int64 `json:"workspaceId"` 72 72 }
+1 -1
apps/checker/update.go
··· 15 15 MonitorId string `json:"monitorId"` 16 16 Status string `json:"status"` 17 17 Message string `json:"message,omitempty"` 18 - StatusCode int `json:"statusCode,omitempty"` 19 18 Region string `json:"region"` 20 19 CronTimestamp int64 `json:"cronTimestamp"` 20 + StatusCode int `json:"statusCode,omitempty"` 21 21 } 22 22 23 23 func UpdateStatus(ctx context.Context, updateData UpdateData) {
+1 -1
apps/web/src/components/marketing/partners.tsx
··· 40 40 rel="noreferrer" 41 41 className="group inline-flex items-center justify-center" 42 42 > 43 - <Midday className="h-6 w-24 sm:h-8 sm:w-32" /> 43 + <Midday className="h-6 w-24 sm:h-8 sm:w-24" /> 44 44 <ArrowUpRight className="ml-1 h-4 w-4 flex-shrink-0 text-muted-foreground group-hover:text-foreground" /> 45 45 </a> 46 46 </div>
+6 -1
apps/web/src/components/svg/midday.tsx
··· 2 2 3 3 export function Midday(props: SVGAttributes<SVGSVGElement>) { 4 4 return ( 5 - <svg xmlns="http://www.w3.org/2000/svg" fill="none" {...props}> 5 + <svg 6 + xmlns="http://www.w3.org/2000/svg" 7 + viewBox="0 0 102 30" 8 + fill="none" 9 + {...props} 10 + > 6 11 <path 7 12 fill="currentColor" 8 13 fillRule="evenodd"