Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ message Event {
string ID = 1; // Event identifier
google.protobuf.Timestamp Timestamp = 2; // When the event occurred
enum EventSeverity {
Normal = 0; // Default type is normal
Warning = 1; // The event was a warning
Error = 2; // The event was an error
Info = 0; // Default type is normal informational events occur.
Warning = 1; // Used when something unusual happened eg. A config was deleted
Error = 2; // A failure has occured eg. Elevated error rates detected
Critical = 3; // Used when a critical failure has occured eg. Environment is down or a security breach detected
}
EventSeverity Severity = 3; // What type of event it is (e.g., Warning, Normal)
string Type = 4; // The reason for the event (e.g., BackupSucceeded, ShellProvisioned)
Expand Down
9 changes: 8 additions & 1 deletion internal/server/mock/events/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var mockEvents = []*pb.Event{
{
Timestamp: timestamppb.New(time.Date(2025, 3, 1, 0, 0, 0, 0, time.UTC).Round(time.Minute)),
ID: "ABCDXXXX",
Severity: pb.Event_Normal,
Severity: pb.Event_Info,
Type: "ConfigSet",
Message: "A config was set: api.key",
},
Expand All @@ -37,6 +37,13 @@ var mockEvents = []*pb.Event{
Type: "BackupFailed",
Message: "The following backup failed with the ID: xxxxxxxxxxxxxxxxx",
},
{
Timestamp: timestamppb.New(time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC).Round(time.Minute)),
ID: "ABCDWWWW",
Severity: pb.Event_Critical,
Type: "EnvironmentDown",
Message: "The environment is down due to a critical failure",
},
}

// Get the list of events from the server.
Expand Down
56 changes: 30 additions & 26 deletions pb/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.