Files
zeekayandHanzo Dev e1280967b6 Give the last two payloads a wire to state
A prometheus Data held its labels in a map, and control.ExecArgs held the
live kernel objects an exec runs against -- a mount namespace, an fd
table, a limit set. Neither has offsets, so neither payload could state
a layout.

Labels become a list, which also retires the O(n^2) walk that existed to
read a map in sorted order. The kernel objects move to control.Env, which
is what the sentry supplies and what a call arriving on the wire cannot:
a namespace is a reference, not a value.

Every urpc payload now states its own wire.


Co-authored-by: Hanzo Dev <[email protected]>
2026-09-22 23:10:33 -07:00

39 lines
1.1 KiB
Python

load("//tools:defs.bzl", "go_library", "go_test")
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
go_library(
name = "prometheus",
srcs = [
"prometheus.go",
"prometheus_verify.go",
"zap.go",
],
stateify = False,
visibility = ["//:sandbox"],
deps = [
"//pkg/metric:metric_go_proto",
"@com_github_zap_proto_go//:go",
],
)
go_test(
name = "prometheus_test",
size = "small",
srcs = ["prometheus_test.go"],
library = ":prometheus",
deps = [
"//pkg/metric:metric_go_proto",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_google_go_cmp//cmp:go_default_library",
"@com_github_prometheus_common//expfmt",
"@org_golang_google_protobuf//encoding/prototext:go_default_library",
"@org_golang_google_protobuf//proto:go_default_library",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//testing/protocmp:go_default_library",
],
)