* feat(suite): Implement Suites Fixes #1230 * Update docs * Fix variable alignment * Prevent always-run endpoint from running if a context placeholder fails to resolve in the URL * Return errors when a context placeholder path fails to resolve * Add a couple of unit tests * Add a couple of unit tests * fix(ui): Update group count properly Fixes #1233 * refactor: Pass down entire config instead of several sub-configs * fix: Change default suite interval and timeout * fix: Deprecate disable-monitoring-lock in favor of concurrency * fix: Make sure there are no duplicate keys * Refactor some code * Update watchdog/watchdog.go * Update web/app/src/components/StepDetailsModal.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: Remove useless log * fix: Set default concurrency to 3 instead of 5 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
package endpoint
|
|
|
|
import "github.com/TwiN/gatus/v5/config/key"
|
|
|
|
// Status contains the evaluation Results of an Endpoint
|
|
// This is essentially a DTO
|
|
type Status struct {
|
|
// Name of the endpoint
|
|
Name string `json:"name,omitempty"`
|
|
|
|
// Group the endpoint is a part of. Used for grouping multiple endpoints together on the front end.
|
|
Group string `json:"group,omitempty"`
|
|
|
|
// Key of the Endpoint
|
|
Key string `json:"key"`
|
|
|
|
// Results is the list of endpoint evaluation results
|
|
Results []*Result `json:"results"`
|
|
|
|
// Events is a list of events
|
|
Events []*Event `json:"events,omitempty"`
|
|
|
|
// Uptime information on the endpoint's uptime
|
|
//
|
|
// Used by the memory store.
|
|
//
|
|
// To retrieve the uptime between two time, use store.GetUptimeByKey.
|
|
Uptime *Uptime `json:"-"`
|
|
}
|
|
|
|
// NewStatus creates a new Status
|
|
func NewStatus(group, name string) *Status {
|
|
return &Status{
|
|
Name: name,
|
|
Group: group,
|
|
Key: key.ConvertGroupAndNameToKey(group, name),
|
|
Results: make([]*Result, 0),
|
|
Events: make([]*Event, 0),
|
|
Uptime: NewUptime(),
|
|
}
|
|
}
|