metropolis/proto: add private
We add a new proto package, 'private'. This will hold all non-public
proto messages for the implementation of the cluster lifecyclce design
document.
We duplicate 'internal' for two reasons:
- make it easier to port code accross to use the new protos/cluster
code, while slowly phasing out protos/internal.
- 'internal' was a poor name choice, as it's significant in Go path
naming, and might cause some problems in the future. We have Bazel's
visiblility mechanism to protect accidental use.
Test Plan: New proto, not yet used - see rest of stack.
X-Origin-Diff: phab/D732
GitOrigin-RevId: 15632353c46068b4f4c5025828c9c8459feaa335
diff --git a/metropolis/proto/private/BUILD.bazel b/metropolis/proto/private/BUILD.bazel
new file mode 100644
index 0000000..8f7cd50
--- /dev/null
+++ b/metropolis/proto/private/BUILD.bazel
@@ -0,0 +1,23 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+proto_library(
+ name = "private_proto",
+ srcs = ["private.proto"],
+ visibility = ["//metropolis:__subpackages__"],
+)
+
+go_proto_library(
+ name = "private_go_proto",
+ importpath = "source.monogon.dev/metropolis/proto/private",
+ proto = ":private_proto",
+ visibility = ["//metropolis:__subpackages__"],
+)
+
+go_library(
+ name = "go_default_library",
+ embed = [":private_go_proto"],
+ importpath = "source.monogon.dev/metropolis/proto/private",
+ visibility = ["//metropolis:__subpackages__"],
+)