Skip to content

Commit

Permalink
Remove ids from the exporter implementation further shifting the burden
Browse files Browse the repository at this point in the history
of managing exporter identities to the control/client so it can be
unified and kept an implementation detail as much as possible.
Implement support for multiple exporter responses in APIs.
  • Loading branch information
a-palchikov committed Dec 11, 2024
1 parent c7b622a commit 246f2e4
Show file tree
Hide file tree
Showing 13 changed files with 1,309 additions and 509 deletions.
932 changes: 538 additions & 394 deletions api/services/control/control.pb.go

Large diffs are not rendered by default.

23 changes: 21 additions & 2 deletions api/services/control/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message PruneRequest {
}

message DiskUsageRequest {
repeated string filter = 1;
repeated string filter = 1;
}

message DiskUsageResponse {
Expand Down Expand Up @@ -105,7 +105,12 @@ message CacheOptionsEntry {
}

message SolveResponse {
map<string, string> ExporterResponse = 1;
// ExporterResponseDeprecated is a combined exporter response - it aggregates
// responses from all exporters running in parallel.
// It is deprecated in favor of the structured exporter response but will be
// populated as long as it is supported.
map<string, string> ExporterResponseDeprecated = 1;
repeated ExporterResponse exporterResponses = 2;
}

message StatusRequest {
Expand Down Expand Up @@ -249,3 +254,17 @@ message Exporter {
// ID should be treated by the exporter as opaque.
string ID = 3;
}

// ExporterResponse describes the output of an exporter
message ExporterResponse {
// Metadata describes the exporter
ExporterMetadata metadata = 1;
// Data is the exporter's output
map<string, string> data = 2;
}

// ExporterMetadata describes the output exporter
message ExporterMetadata {
// ID identifies the exporter
string ID = 1;
}
Loading

0 comments on commit 246f2e4

Please sign in to comment.