-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of serving the metrics over HTTP, we now use ttrpc and implement a more generic "shim service" that can be used for different purposes than just metrics.
- Loading branch information
Showing
10 changed files
with
416 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,12 @@ generate: export BPF_CFLAGS := $(CFLAGS) | |
generate: | ||
docker run --rm -v $(PWD):/app:Z --user $(shell id -u):$(shell id -g) --env=BPF_CLANG="$(CLANG)" --env=BPF_CFLAGS="$(CFLAGS)" $(EBPF_IMAGE) | ||
|
||
ttrpc: | ||
cd api/shim/v1; protoc --go_out=. --go_opt=paths=source_relative \ | ||
--ttrpc_out=. --plugin=protoc-gen-ttrpc=`which protoc-gen-go-ttrpc` \ | ||
--ttrpc_opt=paths=source_relative *.proto -I. \ | ||
-I ${GOPATH}/pkg/mod/github.com/prometheus/[email protected] | ||
|
||
# to improve reproducibility of the bpf builds, we dump the vmlinux.h and | ||
# store it compressed in git instead of dumping it during the build. | ||
update-vmlinux: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
|
||
package zeropod.shim.v1; | ||
option go_package = "github.com/ctrox/zeropod/api/shim/v1/;v1"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "io/prometheus/client/metrics.proto"; | ||
|
||
service Shim { | ||
rpc Metrics(MetricsRequest) returns (MetricsResponse); | ||
} | ||
|
||
message MetricsResponse { | ||
repeated io.prometheus.client.MetricFamily metrics = 1; | ||
} | ||
|
||
message MetricsRequest { | ||
google.protobuf.Empty empty = 1; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.