Files
Amir Raminfar 727b33c8cc feat: detect podman vs docker and show runtime icon (#4717)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 05:47:08 -07:00

164 lines
3.5 KiB
Protocol Buffer

syntax = "proto3";
package protobuf;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
option go_package = "internal/agent/pb";
message Container {
string id = 1;
string name = 2;
string image = 3;
string status = 4; // deprecated
string state = 5;
string ImageId = 6; // deprecated
google.protobuf.Timestamp created = 7;
google.protobuf.Timestamp started = 8;
string health = 9;
string host = 10;
bool tty = 11;
map<string, string> labels = 12;
repeated ContainerStat stats = 13;
string group = 14;
string command = 15;
google.protobuf.Timestamp finished = 16;
uint64 memoryLimit = 17;
double cpuLimit = 18;
bool fullyLoaded = 19;
repeated string env = 20;
repeated string ports = 21;
// Field 22 was previously `repeated string mounts` (raw paths). Renumbered
// to 26 with a richer Mount message; old tag reserved to avoid wire collisions
// with pre-v10.6 agents.
reserved 22;
string restartPolicy = 23;
string networkMode = 24;
repeated MountStat mountStats = 25;
repeated Mount mounts = 26;
}
message ContainerStat {
string id = 1;
double cpuPercent = 2;
double memoryUsage = 3;
double memoryPercent = 4;
uint64 networkRxTotal = 5;
uint64 networkTxTotal = 6;
uint64 diskReadTotal = 7;
uint64 diskWriteTotal = 8;
}
message Mount {
string type = 1;
string source = 2;
string destination = 3;
bool rw = 4;
}
message MountStat {
string destination = 1;
uint64 total = 2;
uint64 free = 3;
uint64 used = 4;
bool available = 5;
google.protobuf.Timestamp lastChecked = 6;
}
message LogFragment {
string message = 1;
}
message LogEvent {
uint32 id = 1;
string containerId = 2;
google.protobuf.Any message = 3; // SingleMessage, GroupMessage, or ComplexMessage
google.protobuf.Timestamp timestamp = 4;
string level = 5;
string stream = 6;
string type = 7; // "single", "group", or "complex"
string rawMessage = 8;
}
message SingleMessage {
string message = 1;
}
message GroupMessage {
repeated LogFragment fragments = 1;
}
message ComplexMessage {
bytes data = 1;
}
message ContainerEvent {
string actorId = 1;
string name = 2;
string host = 3;
google.protobuf.Timestamp timestamp = 4;
map<string, string> actorAttributes = 5;
Container container = 6;
}
message Host {
string id = 1;
string name = 2;
string nodeAddress = 3;
bool swarm = 4;
map<string, string> labels = 5;
string operatingSystem = 6;
string osVersion = 7;
string osType = 8;
uint32 cpuCores = 9;
uint64 memory = 10;
string agentVersion = 11;
string dockerVersion = 12;
string runtime = 13;
}
enum ContainerAction {
Start = 0;
Stop = 1;
Restart = 2;
Remove = 3;
}
message NotificationSubscription {
int32 id = 1;
string name = 2;
bool enabled = 3;
int32 dispatcherId = 4;
string logExpression = 5;
string containerExpression = 6;
string metricExpression = 7;
int32 cooldown = 8;
int32 sampleWindow = 9;
string eventExpression = 10;
}
message NotificationDispatcher {
int32 id = 1;
string name = 2;
string type = 3;
string url = 4;
string template = 5;
map<string, string> headers = 6;
// Fields 7-9 removed (cloud fields moved to NotificationCloudConfig)
reserved 7, 8, 9;
}
message NotificationCloudConfig {
string apiKey = 1;
string prefix = 2;
google.protobuf.Timestamp expiresAt = 3;
}
message NotificationSubscriptionStats {
int32 subscriptionId = 1;
int64 triggerCount = 2;
google.protobuf.Timestamp lastTriggeredAt = 3;
repeated string triggeredContainerIds = 4;
}