From 2af1b10fe7e04cc30f48ad5ef527d1bb68e9d5e8 Mon Sep 17 00:00:00 2001 From: chronark Date: Wed, 9 Jul 2025 11:14:03 +0200 Subject: [PATCH 1/3] chore: move vmprovisioner protos to shared protochore --- go/deploy/metald/Makefile | 20 +- go/deploy/metald/buf.gen.yaml | 15 - go/deploy/metald/buf.yaml | 15 - go/deploy/metald/client/client.go | 4 +- .../metald/client/cmd/metald-cli/main.go | 2 +- go/deploy/metald/client/config.go | 2 +- go/deploy/metald/client/example_test.go | 2 +- go/deploy/metald/client/types.go | 2 +- go/deploy/metald/client/vmconfig.go | 2 +- go/deploy/metald/cmd/metald/main.go | 2 +- go/deploy/metald/go.mod | 13 +- go/deploy/metald/go.sum | 6 +- .../backend/cloudhypervisor/client.go | 2 +- .../internal/backend/cloudhypervisor/types.go | 2 +- .../firecracker/automatic_build_test.go | 2 +- .../backend/firecracker/sdk_client_v4.go | 2 +- .../backend/firecracker/sdk_client_v4_test.go | 2 +- .../metald/internal/backend/types/backend.go | 2 +- .../metald/internal/database/repository.go | 2 +- .../internal/reconciler/vm_reconciler.go | 2 +- go/deploy/metald/internal/service/vm.go | 4 +- .../internal/service/vm_cleanup_bench_test.go | 2 +- .../assetmanagerd/proto/asset/v1/asset.pb.go | 2148 +++++++++ .../asset/v1/assetv1connect/asset.connect.go | 405 ++ .../billaged/proto/billing/v1/billing.pb.go | 754 ++++ .../v1/billingv1connect/billing.connect.go | 233 + .../builderd/proto/builder/v1/builder.pb.go | 3829 +++++++++++++++++ .../v1/builderv1connect/builder.connect.go | 338 ++ .../metald/proto}/vmprovisioner/v1/vm.pb.go | 275 +- .../v1/vmprovisionerv1connect/vm.connect.go | 56 +- .../vmprovisioner/v1/vmprovisioner.pb.go | 2864 ++++++++++++ .../vmprovisioner.connect.go | 362 ++ go/go.mod | 45 +- go/go.sum | 86 +- .../vmprovisioner/v1/vmprovisioner.proto} | 6 +- 35 files changed, 11213 insertions(+), 295 deletions(-) delete mode 100644 go/deploy/metald/buf.gen.yaml delete mode 100644 go/deploy/metald/buf.yaml create mode 100644 go/gen/deploy/assetmanagerd/proto/asset/v1/asset.pb.go create mode 100644 go/gen/deploy/assetmanagerd/proto/asset/v1/assetv1connect/asset.connect.go create mode 100644 go/gen/deploy/billaged/proto/billing/v1/billing.pb.go create mode 100644 go/gen/deploy/billaged/proto/billing/v1/billingv1connect/billing.connect.go create mode 100644 go/gen/deploy/builderd/proto/builder/v1/builder.pb.go create mode 100644 go/gen/deploy/builderd/proto/builder/v1/builderv1connect/builder.connect.go rename go/{deploy/metald/gen => gen/deploy/metald/proto}/vmprovisioner/v1/vm.pb.go (88%) rename go/{deploy/metald/gen => gen/deploy/metald/proto}/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go (88%) create mode 100644 go/gen/proto/metal/vmprovisioner/v1/vmprovisioner.pb.go create mode 100644 go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect/vmprovisioner.connect.go rename go/{deploy/metald/proto/vmprovisioner/v1/vm.proto => proto/metal/vmprovisioner/v1/vmprovisioner.proto} (98%) diff --git a/go/deploy/metald/Makefile b/go/deploy/metald/Makefile index b99de5ffb3..353adb65ec 100644 --- a/go/deploy/metald/Makefile +++ b/go/deploy/metald/Makefile @@ -15,9 +15,9 @@ CYAN := \033[36m RESET := \033[0m # Targets (alphabetically ordered) -.PHONY: build build-linux check ci clean clean-gen debug deps dev fmt generate health help install install-tools lint lint-proto metrics proto-breaking release run service-logs service-logs-full service-restart service-start service-status service-stop setup test test-coverage test-short uninstall version vet +.PHONY: build build-linux check ci clean debug deps dev fmt health help install install-tools lint metrics release run service-logs service-logs-full service-restart service-start service-status service-stop setup test test-coverage test-short uninstall version vet -build: generate deps ## Build the binary +build: deps ## Build the binary @mkdir -p $(BUILD_DIR) @go build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/metald @@ -27,14 +27,12 @@ build-linux: ## Build Linux binary for deployment check: fmt vet lint test ## Run all checks (fmt, vet, lint with proto, test) -ci: deps generate lint vet test build ## Run CI pipeline locally +ci: deps lint vet test build ## Run CI pipeline locally clean: ## Clean build artifacts @rm -rf $(BUILD_DIR) @rm -f coverage.out coverage.html -clean-gen: ## Clean generated protobuf code - @rm -rf gen/ debug: build ## Run with debug logging @UNKEY_METALD_OTEL_ENABLED=true ./$(BUILD_DIR)/$(BINARY_NAME) @@ -49,9 +47,6 @@ dev: ## Run the service in development mode fmt: ## Format Go code @goimports -w . -generate: ## Generate protobuf code - @buf generate - @buf lint health: ## Check service health @curl -s http://localhost:8080/_/health | jq . || echo "Health check failed" @@ -73,18 +68,13 @@ install: build ## Install metald binary and systemd service @echo "✓ metald installed and started" -lint: lint-proto ## Run linting tools (includes protobuf linting) +lint: ## Run linting tools @which golangci-lint >/dev/null || (echo "golangci-lint not found, install from https://golangci-lint.run/usage/install/" && exit 1) @golangci-lint run --disable=godox -lint-proto: ## Run protobuf linter - @buf lint - metrics: ## Check Prometheus metrics @curl -s http://localhost:9464/metrics | grep -E "^(vm_|process_|jailer_)" || echo "No VM metrics found" -proto-breaking: ## Check for breaking changes in protobuf files - @buf breaking --against '.git#branch=main' release: clean ci build-linux ## Prepare release build @echo "✓ Release build: $(BUILD_DIR)/$(BINARY_NAME)-linux" @@ -113,7 +103,7 @@ service-stop: ## Stop metald service @sudo systemctl stop metald @echo "✓ metald stopped" -setup: deps generate ## Complete development setup +setup: deps ## Complete development setup test: ## Run all tests @go test ./... -v diff --git a/go/deploy/metald/buf.gen.yaml b/go/deploy/metald/buf.gen.yaml deleted file mode 100644 index d6175c3177..0000000000 --- a/go/deploy/metald/buf.gen.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: v2 -managed: - enabled: true - override: - - file_option: go_package_prefix - value: github.com/unkeyed/unkey/go/deploy/metald/gen -plugins: - - remote: buf.build/protocolbuffers/go - out: gen - opt: paths=source_relative - - remote: buf.build/connectrpc/go - out: gen - opt: paths=source_relative -inputs: - - directory: proto diff --git a/go/deploy/metald/buf.yaml b/go/deploy/metald/buf.yaml deleted file mode 100644 index 0ca96e9c90..0000000000 --- a/go/deploy/metald/buf.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: v2 -modules: - - path: proto - name: buf.build/local/metald -lint: - use: - - STANDARD - except: - - FIELD_LOWER_SNAKE_CASE - rpc_allow_same_request_response: true - rpc_allow_google_protobuf_empty_requests: true - rpc_allow_google_protobuf_empty_responses: true -breaking: - use: - - FILE diff --git a/go/deploy/metald/client/client.go b/go/deploy/metald/client/client.go index 2c02f0d2dd..0d371a3a09 100644 --- a/go/deploy/metald/client/client.go +++ b/go/deploy/metald/client/client.go @@ -7,9 +7,9 @@ import ( "time" "connectrpc.com/connect" - vmprovisionerv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" - "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1/vmprovisionerv1connect" "github.com/unkeyed/unkey/go/deploy/pkg/tls" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" + "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect" ) // AIDEV-NOTE: Metald client with SPIFFE/SPIRE socket integration and tenant isolation diff --git a/go/deploy/metald/client/cmd/metald-cli/main.go b/go/deploy/metald/client/cmd/metald-cli/main.go index f175760b23..ebb2e5c4ba 100644 --- a/go/deploy/metald/client/cmd/metald-cli/main.go +++ b/go/deploy/metald/client/cmd/metald-cli/main.go @@ -10,7 +10,7 @@ import ( "time" "github.com/unkeyed/unkey/go/deploy/metald/client" - vmprovisionerv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // AIDEV-NOTE: CLI tool demonstrating metald client usage with SPIFFE integration diff --git a/go/deploy/metald/client/config.go b/go/deploy/metald/client/config.go index 7b5cda4aa1..e244007f55 100644 --- a/go/deploy/metald/client/config.go +++ b/go/deploy/metald/client/config.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - vmprovisionerv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // AIDEV-NOTE: Configuration file support for VM templates and custom configurations diff --git a/go/deploy/metald/client/example_test.go b/go/deploy/metald/client/example_test.go index f13a7d4457..5320e1ec8e 100644 --- a/go/deploy/metald/client/example_test.go +++ b/go/deploy/metald/client/example_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/unkeyed/unkey/go/deploy/metald/client" - vmprovisionerv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // AIDEV-NOTE: Example demonstrating metald client usage with SPIFFE authentication diff --git a/go/deploy/metald/client/types.go b/go/deploy/metald/client/types.go index 0d7e689bd8..d1e5f4c1a7 100644 --- a/go/deploy/metald/client/types.go +++ b/go/deploy/metald/client/types.go @@ -1,7 +1,7 @@ package client import ( - vmprovisionerv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // AIDEV-NOTE: Type definitions for metald client requests and responses diff --git a/go/deploy/metald/client/vmconfig.go b/go/deploy/metald/client/vmconfig.go index 60674befef..a843e24f05 100644 --- a/go/deploy/metald/client/vmconfig.go +++ b/go/deploy/metald/client/vmconfig.go @@ -3,7 +3,7 @@ package client import ( "fmt" - vmprovisionerv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // AIDEV-NOTE: VM configuration builder for customizable VM creation diff --git a/go/deploy/metald/cmd/metald/main.go b/go/deploy/metald/cmd/metald/main.go index 57da03fdc7..fc4b66d102 100644 --- a/go/deploy/metald/cmd/metald/main.go +++ b/go/deploy/metald/cmd/metald/main.go @@ -14,7 +14,6 @@ import ( "syscall" "time" - "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1/vmprovisionerv1connect" "github.com/unkeyed/unkey/go/deploy/metald/internal/assetmanager" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/firecracker" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/types" @@ -28,6 +27,7 @@ import ( healthpkg "github.com/unkeyed/unkey/go/deploy/pkg/health" "github.com/unkeyed/unkey/go/deploy/pkg/observability/interceptors" tlspkg "github.com/unkeyed/unkey/go/deploy/pkg/tls" + "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect" "connectrpc.com/connect" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/go/deploy/metald/go.mod b/go/deploy/metald/go.mod index 428b0124c2..0565a2bc4a 100644 --- a/go/deploy/metald/go.mod +++ b/go/deploy/metald/go.mod @@ -8,9 +8,10 @@ require ( github.com/mattn/go-sqlite3 v1.14.28 github.com/prometheus/client_golang v1.22.0 github.com/stretchr/testify v1.10.0 - github.com/unkeyed/unkey/go/deploy/assetmanagerd v0.0.0-00010101000000-000000000000 - github.com/unkeyed/unkey/go/deploy/billaged v0.0.0-00010101000000-000000000000 - github.com/unkeyed/unkey/go/deploy/builderd v0.0.0-00010101000000-000000000000 + github.com/unkeyed/unkey/go v0.0.0-00010101000000-000000000000 + github.com/unkeyed/unkey/go/deploy/assetmanagerd v0.0.0-20250709084132-0dd195e4c51b + github.com/unkeyed/unkey/go/deploy/billaged v0.0.0-20250709084132-0dd195e4c51b + github.com/unkeyed/unkey/go/deploy/builderd v0.0.0-20250709084132-0dd195e4c51b github.com/unkeyed/unkey/go/deploy/pkg/health v0.0.0-00010101000000-000000000000 github.com/unkeyed/unkey/go/deploy/pkg/observability/interceptors v0.0.0-00010101000000-000000000000 github.com/unkeyed/unkey/go/deploy/pkg/tls v0.0.0-00010101000000-000000000000 @@ -40,7 +41,7 @@ require ( github.com/containerd/fifo v1.1.0 // indirect github.com/containernetworking/cni v1.3.0 // indirect github.com/containernetworking/plugins v1.7.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-jose/go-jose/v4 v4.0.5 // indirect github.com/go-logr/logr v1.4.3 // indirect @@ -65,7 +66,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.65.0 // indirect github.com/prometheus/procfs v0.16.1 // indirect @@ -104,3 +105,5 @@ replace github.com/unkeyed/unkey/go/deploy/pkg/observability/interceptors => ../ replace github.com/unkeyed/unkey/go/deploy/pkg/tracing => ../pkg/tracing replace github.com/mitchellh/osext => github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 + +replace github.com/unkeyed/unkey/go => ../../ diff --git a/go/deploy/metald/go.sum b/go/deploy/metald/go.sum index 9edb2ded92..2611c095bb 100644 --- a/go/deploy/metald/go.sum +++ b/go/deploy/metald/go.sum @@ -225,8 +225,9 @@ github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -617,8 +618,9 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= diff --git a/go/deploy/metald/internal/backend/cloudhypervisor/client.go b/go/deploy/metald/internal/backend/cloudhypervisor/client.go index bc2e32abc4..8896324ba0 100644 --- a/go/deploy/metald/internal/backend/cloudhypervisor/client.go +++ b/go/deploy/metald/internal/backend/cloudhypervisor/client.go @@ -12,8 +12,8 @@ import ( "strings" "time" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/types" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ) diff --git a/go/deploy/metald/internal/backend/cloudhypervisor/types.go b/go/deploy/metald/internal/backend/cloudhypervisor/types.go index 5c5c7f9e79..c6ae4f3ae3 100644 --- a/go/deploy/metald/internal/backend/cloudhypervisor/types.go +++ b/go/deploy/metald/internal/backend/cloudhypervisor/types.go @@ -1,7 +1,7 @@ package cloudhypervisor import ( - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // Cloud Hypervisor API types diff --git a/go/deploy/metald/internal/backend/firecracker/automatic_build_test.go b/go/deploy/metald/internal/backend/firecracker/automatic_build_test.go index f1779cd069..1cb1ac8795 100644 --- a/go/deploy/metald/internal/backend/firecracker/automatic_build_test.go +++ b/go/deploy/metald/internal/backend/firecracker/automatic_build_test.go @@ -9,8 +9,8 @@ import ( "log/slog" assetv1 "github.com/unkeyed/unkey/go/deploy/assetmanagerd/gen/asset/v1" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" "github.com/unkeyed/unkey/go/deploy/metald/internal/config" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // mockAssetClient implements assetmanager.Client for testing automatic builds diff --git a/go/deploy/metald/internal/backend/firecracker/sdk_client_v4.go b/go/deploy/metald/internal/backend/firecracker/sdk_client_v4.go index 6bb4f5ae27..5f5ca75b1d 100644 --- a/go/deploy/metald/internal/backend/firecracker/sdk_client_v4.go +++ b/go/deploy/metald/internal/backend/firecracker/sdk_client_v4.go @@ -19,12 +19,12 @@ import ( "github.com/firecracker-microvm/firecracker-go-sdk/client/models" assetv1 "github.com/unkeyed/unkey/go/deploy/assetmanagerd/gen/asset/v1" builderv1 "github.com/unkeyed/unkey/go/deploy/builderd/gen/builder/v1" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" "github.com/unkeyed/unkey/go/deploy/metald/internal/assetmanager" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/types" "github.com/unkeyed/unkey/go/deploy/metald/internal/config" "github.com/unkeyed/unkey/go/deploy/metald/internal/jailer" "github.com/unkeyed/unkey/go/deploy/metald/internal/network" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" diff --git a/go/deploy/metald/internal/backend/firecracker/sdk_client_v4_test.go b/go/deploy/metald/internal/backend/firecracker/sdk_client_v4_test.go index 76e90ca89c..5447bab0b7 100644 --- a/go/deploy/metald/internal/backend/firecracker/sdk_client_v4_test.go +++ b/go/deploy/metald/internal/backend/firecracker/sdk_client_v4_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" assetv1 "github.com/unkeyed/unkey/go/deploy/assetmanagerd/gen/asset/v1" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // MockAssetClient is a mock implementation of the assetmanager.Client interface diff --git a/go/deploy/metald/internal/backend/types/backend.go b/go/deploy/metald/internal/backend/types/backend.go index d847a84bc3..bee7c95142 100644 --- a/go/deploy/metald/internal/backend/types/backend.go +++ b/go/deploy/metald/internal/backend/types/backend.go @@ -4,7 +4,7 @@ import ( "context" "time" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // Backend defines the interface for hypervisor backends diff --git a/go/deploy/metald/internal/database/repository.go b/go/deploy/metald/internal/database/repository.go index e2063ab7ab..9fcde4f3bc 100644 --- a/go/deploy/metald/internal/database/repository.go +++ b/go/deploy/metald/internal/database/repository.go @@ -7,7 +7,7 @@ import ( "log/slog" "time" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" "google.golang.org/protobuf/proto" diff --git a/go/deploy/metald/internal/reconciler/vm_reconciler.go b/go/deploy/metald/internal/reconciler/vm_reconciler.go index c951861aee..0e91949c3a 100644 --- a/go/deploy/metald/internal/reconciler/vm_reconciler.go +++ b/go/deploy/metald/internal/reconciler/vm_reconciler.go @@ -9,9 +9,9 @@ import ( "strings" "time" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/types" "github.com/unkeyed/unkey/go/deploy/metald/internal/database" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // VMReconciler handles VM state reconciliation between database and reality diff --git a/go/deploy/metald/internal/service/vm.go b/go/deploy/metald/internal/service/vm.go index 3afb4093a1..af29ae6035 100644 --- a/go/deploy/metald/internal/service/vm.go +++ b/go/deploy/metald/internal/service/vm.go @@ -7,12 +7,12 @@ import ( "math" "time" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" - "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1/vmprovisionerv1connect" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/types" "github.com/unkeyed/unkey/go/deploy/metald/internal/billing" "github.com/unkeyed/unkey/go/deploy/metald/internal/database" "github.com/unkeyed/unkey/go/deploy/metald/internal/observability" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" + "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect" "connectrpc.com/connect" "go.opentelemetry.io/otel" diff --git a/go/deploy/metald/internal/service/vm_cleanup_bench_test.go b/go/deploy/metald/internal/service/vm_cleanup_bench_test.go index f3a3eea469..b88040ed11 100644 --- a/go/deploy/metald/internal/service/vm_cleanup_bench_test.go +++ b/go/deploy/metald/internal/service/vm_cleanup_bench_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - metaldv1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" "github.com/unkeyed/unkey/go/deploy/metald/internal/backend/types" + metaldv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" ) // Mock backend for cleanup benchmarks diff --git a/go/gen/deploy/assetmanagerd/proto/asset/v1/asset.pb.go b/go/gen/deploy/assetmanagerd/proto/asset/v1/asset.pb.go new file mode 100644 index 0000000000..9b179d165f --- /dev/null +++ b/go/gen/deploy/assetmanagerd/proto/asset/v1/asset.pb.go @@ -0,0 +1,2148 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc (unknown) +// source: deploy/assetmanagerd/proto/asset/v1/asset.proto + +package assetv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AssetType int32 + +const ( + AssetType_ASSET_TYPE_UNSPECIFIED AssetType = 0 + AssetType_ASSET_TYPE_KERNEL AssetType = 1 + AssetType_ASSET_TYPE_ROOTFS AssetType = 2 + AssetType_ASSET_TYPE_INITRD AssetType = 3 + AssetType_ASSET_TYPE_DISK_IMAGE AssetType = 4 +) + +// Enum value maps for AssetType. +var ( + AssetType_name = map[int32]string{ + 0: "ASSET_TYPE_UNSPECIFIED", + 1: "ASSET_TYPE_KERNEL", + 2: "ASSET_TYPE_ROOTFS", + 3: "ASSET_TYPE_INITRD", + 4: "ASSET_TYPE_DISK_IMAGE", + } + AssetType_value = map[string]int32{ + "ASSET_TYPE_UNSPECIFIED": 0, + "ASSET_TYPE_KERNEL": 1, + "ASSET_TYPE_ROOTFS": 2, + "ASSET_TYPE_INITRD": 3, + "ASSET_TYPE_DISK_IMAGE": 4, + } +) + +func (x AssetType) Enum() *AssetType { + p := new(AssetType) + *p = x + return p +} + +func (x AssetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AssetType) Descriptor() protoreflect.EnumDescriptor { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes[0].Descriptor() +} + +func (AssetType) Type() protoreflect.EnumType { + return &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes[0] +} + +func (x AssetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AssetType.Descriptor instead. +func (AssetType) EnumDescriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{0} +} + +type AssetStatus int32 + +const ( + AssetStatus_ASSET_STATUS_UNSPECIFIED AssetStatus = 0 + AssetStatus_ASSET_STATUS_UPLOADING AssetStatus = 1 + AssetStatus_ASSET_STATUS_AVAILABLE AssetStatus = 2 + AssetStatus_ASSET_STATUS_DELETING AssetStatus = 3 + AssetStatus_ASSET_STATUS_ERROR AssetStatus = 4 +) + +// Enum value maps for AssetStatus. +var ( + AssetStatus_name = map[int32]string{ + 0: "ASSET_STATUS_UNSPECIFIED", + 1: "ASSET_STATUS_UPLOADING", + 2: "ASSET_STATUS_AVAILABLE", + 3: "ASSET_STATUS_DELETING", + 4: "ASSET_STATUS_ERROR", + } + AssetStatus_value = map[string]int32{ + "ASSET_STATUS_UNSPECIFIED": 0, + "ASSET_STATUS_UPLOADING": 1, + "ASSET_STATUS_AVAILABLE": 2, + "ASSET_STATUS_DELETING": 3, + "ASSET_STATUS_ERROR": 4, + } +) + +func (x AssetStatus) Enum() *AssetStatus { + p := new(AssetStatus) + *p = x + return p +} + +func (x AssetStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AssetStatus) Descriptor() protoreflect.EnumDescriptor { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes[1].Descriptor() +} + +func (AssetStatus) Type() protoreflect.EnumType { + return &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes[1] +} + +func (x AssetStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AssetStatus.Descriptor instead. +func (AssetStatus) EnumDescriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{1} +} + +type StorageBackend int32 + +const ( + StorageBackend_STORAGE_BACKEND_UNSPECIFIED StorageBackend = 0 + StorageBackend_STORAGE_BACKEND_LOCAL StorageBackend = 1 + StorageBackend_STORAGE_BACKEND_S3 StorageBackend = 2 + StorageBackend_STORAGE_BACKEND_HTTP StorageBackend = 3 + StorageBackend_STORAGE_BACKEND_NFS StorageBackend = 4 +) + +// Enum value maps for StorageBackend. +var ( + StorageBackend_name = map[int32]string{ + 0: "STORAGE_BACKEND_UNSPECIFIED", + 1: "STORAGE_BACKEND_LOCAL", + 2: "STORAGE_BACKEND_S3", + 3: "STORAGE_BACKEND_HTTP", + 4: "STORAGE_BACKEND_NFS", + } + StorageBackend_value = map[string]int32{ + "STORAGE_BACKEND_UNSPECIFIED": 0, + "STORAGE_BACKEND_LOCAL": 1, + "STORAGE_BACKEND_S3": 2, + "STORAGE_BACKEND_HTTP": 3, + "STORAGE_BACKEND_NFS": 4, + } +) + +func (x StorageBackend) Enum() *StorageBackend { + p := new(StorageBackend) + *p = x + return p +} + +func (x StorageBackend) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageBackend) Descriptor() protoreflect.EnumDescriptor { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes[2].Descriptor() +} + +func (StorageBackend) Type() protoreflect.EnumType { + return &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes[2] +} + +func (x StorageBackend) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StorageBackend.Descriptor instead. +func (StorageBackend) EnumDescriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{2} +} + +type Asset struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Type AssetType `protobuf:"varint,3,opt,name=type,proto3,enum=asset.v1.AssetType" json:"type,omitempty"` + Status AssetStatus `protobuf:"varint,4,opt,name=status,proto3,enum=asset.v1.AssetStatus" json:"status,omitempty"` + // Storage information + Backend StorageBackend `protobuf:"varint,5,opt,name=backend,proto3,enum=asset.v1.StorageBackend" json:"backend,omitempty"` + Location string `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"` // Path or URL depending on backend + SizeBytes int64 `protobuf:"varint,7,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + Checksum string `protobuf:"bytes,8,opt,name=checksum,proto3" json:"checksum,omitempty"` // SHA256 + // Metadata + Labels map[string]string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CreatedBy string `protobuf:"bytes,10,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` // e.g., "builderd", "manual" + CreatedAt int64 `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Unix timestamp + LastAccessedAt int64 `protobuf:"varint,12,opt,name=last_accessed_at,json=lastAccessedAt,proto3" json:"last_accessed_at,omitempty"` + // Reference counting for GC + ReferenceCount int32 `protobuf:"varint,13,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty"` + // Build information (if created by builderd) + BuildId string `protobuf:"bytes,14,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + SourceImage string `protobuf:"bytes,15,opt,name=source_image,json=sourceImage,proto3" json:"source_image,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Asset) Reset() { + *x = Asset{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Asset) ProtoMessage() {} + +func (x *Asset) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Asset.ProtoReflect.Descriptor instead. +func (*Asset) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{0} +} + +func (x *Asset) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Asset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Asset) GetType() AssetType { + if x != nil { + return x.Type + } + return AssetType_ASSET_TYPE_UNSPECIFIED +} + +func (x *Asset) GetStatus() AssetStatus { + if x != nil { + return x.Status + } + return AssetStatus_ASSET_STATUS_UNSPECIFIED +} + +func (x *Asset) GetBackend() StorageBackend { + if x != nil { + return x.Backend + } + return StorageBackend_STORAGE_BACKEND_UNSPECIFIED +} + +func (x *Asset) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *Asset) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *Asset) GetChecksum() string { + if x != nil { + return x.Checksum + } + return "" +} + +func (x *Asset) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Asset) GetCreatedBy() string { + if x != nil { + return x.CreatedBy + } + return "" +} + +func (x *Asset) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *Asset) GetLastAccessedAt() int64 { + if x != nil { + return x.LastAccessedAt + } + return 0 +} + +func (x *Asset) GetReferenceCount() int32 { + if x != nil { + return x.ReferenceCount + } + return 0 +} + +func (x *Asset) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *Asset) GetSourceImage() string { + if x != nil { + return x.SourceImage + } + return "" +} + +type UploadAssetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Data: + // + // *UploadAssetRequest_Metadata + // *UploadAssetRequest_Chunk + Data isUploadAssetRequest_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UploadAssetRequest) Reset() { + *x = UploadAssetRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UploadAssetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UploadAssetRequest) ProtoMessage() {} + +func (x *UploadAssetRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UploadAssetRequest.ProtoReflect.Descriptor instead. +func (*UploadAssetRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{1} +} + +func (x *UploadAssetRequest) GetData() isUploadAssetRequest_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *UploadAssetRequest) GetMetadata() *UploadAssetMetadata { + if x != nil { + if x, ok := x.Data.(*UploadAssetRequest_Metadata); ok { + return x.Metadata + } + } + return nil +} + +func (x *UploadAssetRequest) GetChunk() []byte { + if x != nil { + if x, ok := x.Data.(*UploadAssetRequest_Chunk); ok { + return x.Chunk + } + } + return nil +} + +type isUploadAssetRequest_Data interface { + isUploadAssetRequest_Data() +} + +type UploadAssetRequest_Metadata struct { + Metadata *UploadAssetMetadata `protobuf:"bytes,1,opt,name=metadata,proto3,oneof"` +} + +type UploadAssetRequest_Chunk struct { + Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3,oneof"` +} + +func (*UploadAssetRequest_Metadata) isUploadAssetRequest_Data() {} + +func (*UploadAssetRequest_Chunk) isUploadAssetRequest_Data() {} + +type UploadAssetMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type AssetType `protobuf:"varint,2,opt,name=type,proto3,enum=asset.v1.AssetType" json:"type,omitempty"` + SizeBytes int64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CreatedBy string `protobuf:"bytes,5,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + BuildId string `protobuf:"bytes,6,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + SourceImage string `protobuf:"bytes,7,opt,name=source_image,json=sourceImage,proto3" json:"source_image,omitempty"` + Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` // Optional: specific asset ID to use + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UploadAssetMetadata) Reset() { + *x = UploadAssetMetadata{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UploadAssetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UploadAssetMetadata) ProtoMessage() {} + +func (x *UploadAssetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UploadAssetMetadata.ProtoReflect.Descriptor instead. +func (*UploadAssetMetadata) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{2} +} + +func (x *UploadAssetMetadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UploadAssetMetadata) GetType() AssetType { + if x != nil { + return x.Type + } + return AssetType_ASSET_TYPE_UNSPECIFIED +} + +func (x *UploadAssetMetadata) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *UploadAssetMetadata) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *UploadAssetMetadata) GetCreatedBy() string { + if x != nil { + return x.CreatedBy + } + return "" +} + +func (x *UploadAssetMetadata) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *UploadAssetMetadata) GetSourceImage() string { + if x != nil { + return x.SourceImage + } + return "" +} + +func (x *UploadAssetMetadata) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UploadAssetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UploadAssetResponse) Reset() { + *x = UploadAssetResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UploadAssetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UploadAssetResponse) ProtoMessage() {} + +func (x *UploadAssetResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UploadAssetResponse.ProtoReflect.Descriptor instead. +func (*UploadAssetResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{3} +} + +func (x *UploadAssetResponse) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +type RegisterAssetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type AssetType `protobuf:"varint,2,opt,name=type,proto3,enum=asset.v1.AssetType" json:"type,omitempty"` + Backend StorageBackend `protobuf:"varint,3,opt,name=backend,proto3,enum=asset.v1.StorageBackend" json:"backend,omitempty"` + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` + SizeBytes int64 `protobuf:"varint,5,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + Checksum string `protobuf:"bytes,6,opt,name=checksum,proto3" json:"checksum,omitempty"` + Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CreatedBy string `protobuf:"bytes,8,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + // Optional build information + BuildId string `protobuf:"bytes,9,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + SourceImage string `protobuf:"bytes,10,opt,name=source_image,json=sourceImage,proto3" json:"source_image,omitempty"` + // Optional: specific asset ID to use (if not provided, one will be generated) + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterAssetRequest) Reset() { + *x = RegisterAssetRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterAssetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAssetRequest) ProtoMessage() {} + +func (x *RegisterAssetRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAssetRequest.ProtoReflect.Descriptor instead. +func (*RegisterAssetRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{4} +} + +func (x *RegisterAssetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RegisterAssetRequest) GetType() AssetType { + if x != nil { + return x.Type + } + return AssetType_ASSET_TYPE_UNSPECIFIED +} + +func (x *RegisterAssetRequest) GetBackend() StorageBackend { + if x != nil { + return x.Backend + } + return StorageBackend_STORAGE_BACKEND_UNSPECIFIED +} + +func (x *RegisterAssetRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *RegisterAssetRequest) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *RegisterAssetRequest) GetChecksum() string { + if x != nil { + return x.Checksum + } + return "" +} + +func (x *RegisterAssetRequest) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *RegisterAssetRequest) GetCreatedBy() string { + if x != nil { + return x.CreatedBy + } + return "" +} + +func (x *RegisterAssetRequest) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *RegisterAssetRequest) GetSourceImage() string { + if x != nil { + return x.SourceImage + } + return "" +} + +func (x *RegisterAssetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type RegisterAssetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterAssetResponse) Reset() { + *x = RegisterAssetResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterAssetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAssetResponse) ProtoMessage() {} + +func (x *RegisterAssetResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAssetResponse.ProtoReflect.Descriptor instead. +func (*RegisterAssetResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{5} +} + +func (x *RegisterAssetResponse) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +type GetAssetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // If true, ensures asset is available locally (downloads if needed) + EnsureLocal bool `protobuf:"varint,2,opt,name=ensure_local,json=ensureLocal,proto3" json:"ensure_local,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAssetRequest) Reset() { + *x = GetAssetRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAssetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAssetRequest) ProtoMessage() {} + +func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAssetRequest.ProtoReflect.Descriptor instead. +func (*GetAssetRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{6} +} + +func (x *GetAssetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetAssetRequest) GetEnsureLocal() bool { + if x != nil { + return x.EnsureLocal + } + return false +} + +type GetAssetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + // Local path if ensure_local was true + LocalPath string `protobuf:"bytes,2,opt,name=local_path,json=localPath,proto3" json:"local_path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAssetResponse) Reset() { + *x = GetAssetResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAssetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAssetResponse) ProtoMessage() {} + +func (x *GetAssetResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAssetResponse.ProtoReflect.Descriptor instead. +func (*GetAssetResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{7} +} + +func (x *GetAssetResponse) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *GetAssetResponse) GetLocalPath() string { + if x != nil { + return x.LocalPath + } + return "" +} + +type ListAssetsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Filter by type + Type AssetType `protobuf:"varint,1,opt,name=type,proto3,enum=asset.v1.AssetType" json:"type,omitempty"` + // Filter by status + Status AssetStatus `protobuf:"varint,2,opt,name=status,proto3,enum=asset.v1.AssetStatus" json:"status,omitempty"` + // Filter by labels (all must match) + LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector,proto3" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Pagination + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAssetsRequest) Reset() { + *x = ListAssetsRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAssetsRequest) ProtoMessage() {} + +func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAssetsRequest.ProtoReflect.Descriptor instead. +func (*ListAssetsRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{8} +} + +func (x *ListAssetsRequest) GetType() AssetType { + if x != nil { + return x.Type + } + return AssetType_ASSET_TYPE_UNSPECIFIED +} + +func (x *ListAssetsRequest) GetStatus() AssetStatus { + if x != nil { + return x.Status + } + return AssetStatus_ASSET_STATUS_UNSPECIFIED +} + +func (x *ListAssetsRequest) GetLabelSelector() map[string]string { + if x != nil { + return x.LabelSelector + } + return nil +} + +func (x *ListAssetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAssetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListAssetsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Assets []*Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAssetsResponse) Reset() { + *x = ListAssetsResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAssetsResponse) ProtoMessage() {} + +func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAssetsResponse.ProtoReflect.Descriptor instead. +func (*ListAssetsResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{9} +} + +func (x *ListAssetsResponse) GetAssets() []*Asset { + if x != nil { + return x.Assets + } + return nil +} + +func (x *ListAssetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type AcquireAssetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + AcquiredBy string `protobuf:"bytes,2,opt,name=acquired_by,json=acquiredBy,proto3" json:"acquired_by,omitempty"` // e.g., "vm-123" + TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // Optional auto-release after TTL + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AcquireAssetRequest) Reset() { + *x = AcquireAssetRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AcquireAssetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcquireAssetRequest) ProtoMessage() {} + +func (x *AcquireAssetRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcquireAssetRequest.ProtoReflect.Descriptor instead. +func (*AcquireAssetRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{10} +} + +func (x *AcquireAssetRequest) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +func (x *AcquireAssetRequest) GetAcquiredBy() string { + if x != nil { + return x.AcquiredBy + } + return "" +} + +func (x *AcquireAssetRequest) GetTtlSeconds() int64 { + if x != nil { + return x.TtlSeconds + } + return 0 +} + +type AcquireAssetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + LeaseId string `protobuf:"bytes,2,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` // Use this for release + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AcquireAssetResponse) Reset() { + *x = AcquireAssetResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AcquireAssetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcquireAssetResponse) ProtoMessage() {} + +func (x *AcquireAssetResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcquireAssetResponse.ProtoReflect.Descriptor instead. +func (*AcquireAssetResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{11} +} + +func (x *AcquireAssetResponse) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *AcquireAssetResponse) GetLeaseId() string { + if x != nil { + return x.LeaseId + } + return "" +} + +type ReleaseAssetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReleaseAssetRequest) Reset() { + *x = ReleaseAssetRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReleaseAssetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseAssetRequest) ProtoMessage() {} + +func (x *ReleaseAssetRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseAssetRequest.ProtoReflect.Descriptor instead. +func (*ReleaseAssetRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{12} +} + +func (x *ReleaseAssetRequest) GetLeaseId() string { + if x != nil { + return x.LeaseId + } + return "" +} + +type ReleaseAssetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReleaseAssetResponse) Reset() { + *x = ReleaseAssetResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReleaseAssetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseAssetResponse) ProtoMessage() {} + +func (x *ReleaseAssetResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseAssetResponse.ProtoReflect.Descriptor instead. +func (*ReleaseAssetResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{13} +} + +func (x *ReleaseAssetResponse) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +type DeleteAssetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` // Delete even if ref count > 0 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAssetRequest) Reset() { + *x = DeleteAssetRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAssetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAssetRequest) ProtoMessage() {} + +func (x *DeleteAssetRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAssetRequest.ProtoReflect.Descriptor instead. +func (*DeleteAssetRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteAssetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DeleteAssetRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type DeleteAssetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAssetResponse) Reset() { + *x = DeleteAssetResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAssetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAssetResponse) ProtoMessage() {} + +func (x *DeleteAssetResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAssetResponse.ProtoReflect.Descriptor instead. +func (*DeleteAssetResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{15} +} + +func (x *DeleteAssetResponse) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +func (x *DeleteAssetResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type GarbageCollectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Delete assets not accessed in this many seconds + MaxAgeSeconds int64 `protobuf:"varint,1,opt,name=max_age_seconds,json=maxAgeSeconds,proto3" json:"max_age_seconds,omitempty"` + // Delete assets with 0 references + DeleteUnreferenced bool `protobuf:"varint,2,opt,name=delete_unreferenced,json=deleteUnreferenced,proto3" json:"delete_unreferenced,omitempty"` + // Dry run - just return what would be deleted + DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GarbageCollectRequest) Reset() { + *x = GarbageCollectRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GarbageCollectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GarbageCollectRequest) ProtoMessage() {} + +func (x *GarbageCollectRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GarbageCollectRequest.ProtoReflect.Descriptor instead. +func (*GarbageCollectRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{16} +} + +func (x *GarbageCollectRequest) GetMaxAgeSeconds() int64 { + if x != nil { + return x.MaxAgeSeconds + } + return 0 +} + +func (x *GarbageCollectRequest) GetDeleteUnreferenced() bool { + if x != nil { + return x.DeleteUnreferenced + } + return false +} + +func (x *GarbageCollectRequest) GetDryRun() bool { + if x != nil { + return x.DryRun + } + return false +} + +type GarbageCollectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeletedAssets []*Asset `protobuf:"bytes,1,rep,name=deleted_assets,json=deletedAssets,proto3" json:"deleted_assets,omitempty"` + BytesFreed int64 `protobuf:"varint,2,opt,name=bytes_freed,json=bytesFreed,proto3" json:"bytes_freed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GarbageCollectResponse) Reset() { + *x = GarbageCollectResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GarbageCollectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GarbageCollectResponse) ProtoMessage() {} + +func (x *GarbageCollectResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GarbageCollectResponse.ProtoReflect.Descriptor instead. +func (*GarbageCollectResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{17} +} + +func (x *GarbageCollectResponse) GetDeletedAssets() []*Asset { + if x != nil { + return x.DeletedAssets + } + return nil +} + +func (x *GarbageCollectResponse) GetBytesFreed() int64 { + if x != nil { + return x.BytesFreed + } + return 0 +} + +type PrepareAssetsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AssetIds []string `protobuf:"bytes,1,rep,name=asset_ids,json=assetIds,proto3" json:"asset_ids,omitempty"` + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` // e.g., jailer chroot path + PreparedFor string `protobuf:"bytes,3,opt,name=prepared_for,json=preparedFor,proto3" json:"prepared_for,omitempty"` // e.g., "vm-123" + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrepareAssetsRequest) Reset() { + *x = PrepareAssetsRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrepareAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrepareAssetsRequest) ProtoMessage() {} + +func (x *PrepareAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrepareAssetsRequest.ProtoReflect.Descriptor instead. +func (*PrepareAssetsRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{18} +} + +func (x *PrepareAssetsRequest) GetAssetIds() []string { + if x != nil { + return x.AssetIds + } + return nil +} + +func (x *PrepareAssetsRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +func (x *PrepareAssetsRequest) GetPreparedFor() string { + if x != nil { + return x.PreparedFor + } + return "" +} + +type PrepareAssetsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + AssetPaths map[string]string `protobuf:"bytes,1,rep,name=asset_paths,json=assetPaths,proto3" json:"asset_paths,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // asset_id -> local path + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrepareAssetsResponse) Reset() { + *x = PrepareAssetsResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrepareAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrepareAssetsResponse) ProtoMessage() {} + +func (x *PrepareAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrepareAssetsResponse.ProtoReflect.Descriptor instead. +func (*PrepareAssetsResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{19} +} + +func (x *PrepareAssetsResponse) GetAssetPaths() map[string]string { + if x != nil { + return x.AssetPaths + } + return nil +} + +// QueryAssetsRequest is similar to ListAssetsRequest but with build options +type QueryAssetsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Filter by type + Type AssetType `protobuf:"varint,1,opt,name=type,proto3,enum=asset.v1.AssetType" json:"type,omitempty"` + // Filter by status + Status AssetStatus `protobuf:"varint,2,opt,name=status,proto3,enum=asset.v1.AssetStatus" json:"status,omitempty"` + // Filter by labels (all must match) + LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector,proto3" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Pagination + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Build options - if asset not found and these are set, trigger build + BuildOptions *BuildOptions `protobuf:"bytes,6,opt,name=build_options,json=buildOptions,proto3" json:"build_options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryAssetsRequest) Reset() { + *x = QueryAssetsRequest{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAssetsRequest) ProtoMessage() {} + +func (x *QueryAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryAssetsRequest.ProtoReflect.Descriptor instead. +func (*QueryAssetsRequest) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{20} +} + +func (x *QueryAssetsRequest) GetType() AssetType { + if x != nil { + return x.Type + } + return AssetType_ASSET_TYPE_UNSPECIFIED +} + +func (x *QueryAssetsRequest) GetStatus() AssetStatus { + if x != nil { + return x.Status + } + return AssetStatus_ASSET_STATUS_UNSPECIFIED +} + +func (x *QueryAssetsRequest) GetLabelSelector() map[string]string { + if x != nil { + return x.LabelSelector + } + return nil +} + +func (x *QueryAssetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *QueryAssetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *QueryAssetsRequest) GetBuildOptions() *BuildOptions { + if x != nil { + return x.BuildOptions + } + return nil +} + +// BuildOptions controls automatic asset creation +type BuildOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable automatic building if assets don't exist + EnableAutoBuild bool `protobuf:"varint,1,opt,name=enable_auto_build,json=enableAutoBuild,proto3" json:"enable_auto_build,omitempty"` + // Wait for build completion before returning + WaitForCompletion bool `protobuf:"varint,2,opt,name=wait_for_completion,json=waitForCompletion,proto3" json:"wait_for_completion,omitempty"` + // Timeout for build operation (seconds) + BuildTimeoutSeconds int32 `protobuf:"varint,3,opt,name=build_timeout_seconds,json=buildTimeoutSeconds,proto3" json:"build_timeout_seconds,omitempty"` + // Additional labels to add to the built asset + BuildLabels map[string]string `protobuf:"bytes,4,rep,name=build_labels,json=buildLabels,proto3" json:"build_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Tenant context for build authorization + TenantId string `protobuf:"bytes,5,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` + // Suggested asset ID to use when registering the built asset + // This allows the caller to know the asset ID before it's built + SuggestedAssetId string `protobuf:"bytes,6,opt,name=suggested_asset_id,json=suggestedAssetId,proto3" json:"suggested_asset_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildOptions) Reset() { + *x = BuildOptions{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildOptions) ProtoMessage() {} + +func (x *BuildOptions) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildOptions.ProtoReflect.Descriptor instead. +func (*BuildOptions) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{21} +} + +func (x *BuildOptions) GetEnableAutoBuild() bool { + if x != nil { + return x.EnableAutoBuild + } + return false +} + +func (x *BuildOptions) GetWaitForCompletion() bool { + if x != nil { + return x.WaitForCompletion + } + return false +} + +func (x *BuildOptions) GetBuildTimeoutSeconds() int32 { + if x != nil { + return x.BuildTimeoutSeconds + } + return 0 +} + +func (x *BuildOptions) GetBuildLabels() map[string]string { + if x != nil { + return x.BuildLabels + } + return nil +} + +func (x *BuildOptions) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *BuildOptions) GetSuggestedAssetId() string { + if x != nil { + return x.SuggestedAssetId + } + return "" +} + +// QueryAssetsResponse includes build information if builds were triggered +type QueryAssetsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Assets []*Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Information about any builds that were triggered + TriggeredBuilds []*BuildInfo `protobuf:"bytes,3,rep,name=triggered_builds,json=triggeredBuilds,proto3" json:"triggered_builds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryAssetsResponse) Reset() { + *x = QueryAssetsResponse{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAssetsResponse) ProtoMessage() {} + +func (x *QueryAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryAssetsResponse.ProtoReflect.Descriptor instead. +func (*QueryAssetsResponse) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{22} +} + +func (x *QueryAssetsResponse) GetAssets() []*Asset { + if x != nil { + return x.Assets + } + return nil +} + +func (x *QueryAssetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *QueryAssetsResponse) GetTriggeredBuilds() []*BuildInfo { + if x != nil { + return x.TriggeredBuilds + } + return nil +} + +// BuildInfo provides information about triggered builds +type BuildInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + DockerImage string `protobuf:"bytes,2,opt,name=docker_image,json=dockerImage,proto3" json:"docker_image,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // "pending", "building", "completed", "failed" + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + AssetId string `protobuf:"bytes,5,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` // Asset ID if build completed and asset was registered + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildInfo) Reset() { + *x = BuildInfo{} + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildInfo) ProtoMessage() {} + +func (x *BuildInfo) ProtoReflect() protoreflect.Message { + mi := &file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildInfo.ProtoReflect.Descriptor instead. +func (*BuildInfo) Descriptor() ([]byte, []int) { + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP(), []int{23} +} + +func (x *BuildInfo) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *BuildInfo) GetDockerImage() string { + if x != nil { + return x.DockerImage + } + return "" +} + +func (x *BuildInfo) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *BuildInfo) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *BuildInfo) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +var File_deploy_assetmanagerd_proto_asset_v1_asset_proto protoreflect.FileDescriptor + +const file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDesc = "" + + "\n" + + "/deploy/assetmanagerd/proto/asset/v1/asset.proto\x12\basset.v1\"\xcd\x04\n" + + "\x05Asset\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12'\n" + + "\x04type\x18\x03 \x01(\x0e2\x13.asset.v1.AssetTypeR\x04type\x12-\n" + + "\x06status\x18\x04 \x01(\x0e2\x15.asset.v1.AssetStatusR\x06status\x122\n" + + "\abackend\x18\x05 \x01(\x0e2\x18.asset.v1.StorageBackendR\abackend\x12\x1a\n" + + "\blocation\x18\x06 \x01(\tR\blocation\x12\x1d\n" + + "\n" + + "size_bytes\x18\a \x01(\x03R\tsizeBytes\x12\x1a\n" + + "\bchecksum\x18\b \x01(\tR\bchecksum\x123\n" + + "\x06labels\x18\t \x03(\v2\x1b.asset.v1.Asset.LabelsEntryR\x06labels\x12\x1d\n" + + "\n" + + "created_by\x18\n" + + " \x01(\tR\tcreatedBy\x12\x1d\n" + + "\n" + + "created_at\x18\v \x01(\x03R\tcreatedAt\x12(\n" + + "\x10last_accessed_at\x18\f \x01(\x03R\x0elastAccessedAt\x12'\n" + + "\x0freference_count\x18\r \x01(\x05R\x0ereferenceCount\x12\x19\n" + + "\bbuild_id\x18\x0e \x01(\tR\abuildId\x12!\n" + + "\fsource_image\x18\x0f \x01(\tR\vsourceImage\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"q\n" + + "\x12UploadAssetRequest\x12;\n" + + "\bmetadata\x18\x01 \x01(\v2\x1d.asset.v1.UploadAssetMetadataH\x00R\bmetadata\x12\x16\n" + + "\x05chunk\x18\x02 \x01(\fH\x00R\x05chunkB\x06\n" + + "\x04data\"\xdc\x02\n" + + "\x13UploadAssetMetadata\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12'\n" + + "\x04type\x18\x02 \x01(\x0e2\x13.asset.v1.AssetTypeR\x04type\x12\x1d\n" + + "\n" + + "size_bytes\x18\x03 \x01(\x03R\tsizeBytes\x12A\n" + + "\x06labels\x18\x04 \x03(\v2).asset.v1.UploadAssetMetadata.LabelsEntryR\x06labels\x12\x1d\n" + + "\n" + + "created_by\x18\x05 \x01(\tR\tcreatedBy\x12\x19\n" + + "\bbuild_id\x18\x06 \x01(\tR\abuildId\x12!\n" + + "\fsource_image\x18\a \x01(\tR\vsourceImage\x12\x0e\n" + + "\x02id\x18\b \x01(\tR\x02id\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"<\n" + + "\x13UploadAssetResponse\x12%\n" + + "\x05asset\x18\x01 \x01(\v2\x0f.asset.v1.AssetR\x05asset\"\xca\x03\n" + + "\x14RegisterAssetRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12'\n" + + "\x04type\x18\x02 \x01(\x0e2\x13.asset.v1.AssetTypeR\x04type\x122\n" + + "\abackend\x18\x03 \x01(\x0e2\x18.asset.v1.StorageBackendR\abackend\x12\x1a\n" + + "\blocation\x18\x04 \x01(\tR\blocation\x12\x1d\n" + + "\n" + + "size_bytes\x18\x05 \x01(\x03R\tsizeBytes\x12\x1a\n" + + "\bchecksum\x18\x06 \x01(\tR\bchecksum\x12B\n" + + "\x06labels\x18\a \x03(\v2*.asset.v1.RegisterAssetRequest.LabelsEntryR\x06labels\x12\x1d\n" + + "\n" + + "created_by\x18\b \x01(\tR\tcreatedBy\x12\x19\n" + + "\bbuild_id\x18\t \x01(\tR\abuildId\x12!\n" + + "\fsource_image\x18\n" + + " \x01(\tR\vsourceImage\x12\x0e\n" + + "\x02id\x18\v \x01(\tR\x02id\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\">\n" + + "\x15RegisterAssetResponse\x12%\n" + + "\x05asset\x18\x01 \x01(\v2\x0f.asset.v1.AssetR\x05asset\"D\n" + + "\x0fGetAssetRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12!\n" + + "\fensure_local\x18\x02 \x01(\bR\vensureLocal\"X\n" + + "\x10GetAssetResponse\x12%\n" + + "\x05asset\x18\x01 \x01(\v2\x0f.asset.v1.AssetR\x05asset\x12\x1d\n" + + "\n" + + "local_path\x18\x02 \x01(\tR\tlocalPath\"\xc0\x02\n" + + "\x11ListAssetsRequest\x12'\n" + + "\x04type\x18\x01 \x01(\x0e2\x13.asset.v1.AssetTypeR\x04type\x12-\n" + + "\x06status\x18\x02 \x01(\x0e2\x15.asset.v1.AssetStatusR\x06status\x12U\n" + + "\x0elabel_selector\x18\x03 \x03(\v2..asset.v1.ListAssetsRequest.LabelSelectorEntryR\rlabelSelector\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x05 \x01(\tR\tpageToken\x1a@\n" + + "\x12LabelSelectorEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"e\n" + + "\x12ListAssetsResponse\x12'\n" + + "\x06assets\x18\x01 \x03(\v2\x0f.asset.v1.AssetR\x06assets\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"r\n" + + "\x13AcquireAssetRequest\x12\x19\n" + + "\basset_id\x18\x01 \x01(\tR\aassetId\x12\x1f\n" + + "\vacquired_by\x18\x02 \x01(\tR\n" + + "acquiredBy\x12\x1f\n" + + "\vttl_seconds\x18\x03 \x01(\x03R\n" + + "ttlSeconds\"X\n" + + "\x14AcquireAssetResponse\x12%\n" + + "\x05asset\x18\x01 \x01(\v2\x0f.asset.v1.AssetR\x05asset\x12\x19\n" + + "\blease_id\x18\x02 \x01(\tR\aleaseId\"0\n" + + "\x13ReleaseAssetRequest\x12\x19\n" + + "\blease_id\x18\x01 \x01(\tR\aleaseId\"=\n" + + "\x14ReleaseAssetResponse\x12%\n" + + "\x05asset\x18\x01 \x01(\v2\x0f.asset.v1.AssetR\x05asset\":\n" + + "\x12DeleteAssetRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\"I\n" + + "\x13DeleteAssetResponse\x12\x18\n" + + "\adeleted\x18\x01 \x01(\bR\adeleted\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x89\x01\n" + + "\x15GarbageCollectRequest\x12&\n" + + "\x0fmax_age_seconds\x18\x01 \x01(\x03R\rmaxAgeSeconds\x12/\n" + + "\x13delete_unreferenced\x18\x02 \x01(\bR\x12deleteUnreferenced\x12\x17\n" + + "\adry_run\x18\x03 \x01(\bR\x06dryRun\"q\n" + + "\x16GarbageCollectResponse\x126\n" + + "\x0edeleted_assets\x18\x01 \x03(\v2\x0f.asset.v1.AssetR\rdeletedAssets\x12\x1f\n" + + "\vbytes_freed\x18\x02 \x01(\x03R\n" + + "bytesFreed\"w\n" + + "\x14PrepareAssetsRequest\x12\x1b\n" + + "\tasset_ids\x18\x01 \x03(\tR\bassetIds\x12\x1f\n" + + "\vtarget_path\x18\x02 \x01(\tR\n" + + "targetPath\x12!\n" + + "\fprepared_for\x18\x03 \x01(\tR\vpreparedFor\"\xa8\x01\n" + + "\x15PrepareAssetsResponse\x12P\n" + + "\vasset_paths\x18\x01 \x03(\v2/.asset.v1.PrepareAssetsResponse.AssetPathsEntryR\n" + + "assetPaths\x1a=\n" + + "\x0fAssetPathsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xff\x02\n" + + "\x12QueryAssetsRequest\x12'\n" + + "\x04type\x18\x01 \x01(\x0e2\x13.asset.v1.AssetTypeR\x04type\x12-\n" + + "\x06status\x18\x02 \x01(\x0e2\x15.asset.v1.AssetStatusR\x06status\x12V\n" + + "\x0elabel_selector\x18\x03 \x03(\v2/.asset.v1.QueryAssetsRequest.LabelSelectorEntryR\rlabelSelector\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x05 \x01(\tR\tpageToken\x12;\n" + + "\rbuild_options\x18\x06 \x01(\v2\x16.asset.v1.BuildOptionsR\fbuildOptions\x1a@\n" + + "\x12LabelSelectorEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xf5\x02\n" + + "\fBuildOptions\x12*\n" + + "\x11enable_auto_build\x18\x01 \x01(\bR\x0fenableAutoBuild\x12.\n" + + "\x13wait_for_completion\x18\x02 \x01(\bR\x11waitForCompletion\x122\n" + + "\x15build_timeout_seconds\x18\x03 \x01(\x05R\x13buildTimeoutSeconds\x12J\n" + + "\fbuild_labels\x18\x04 \x03(\v2'.asset.v1.BuildOptions.BuildLabelsEntryR\vbuildLabels\x12\x1b\n" + + "\ttenant_id\x18\x05 \x01(\tR\btenantId\x12,\n" + + "\x12suggested_asset_id\x18\x06 \x01(\tR\x10suggestedAssetId\x1a>\n" + + "\x10BuildLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa6\x01\n" + + "\x13QueryAssetsResponse\x12'\n" + + "\x06assets\x18\x01 \x03(\v2\x0f.asset.v1.AssetR\x06assets\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12>\n" + + "\x10triggered_builds\x18\x03 \x03(\v2\x13.asset.v1.BuildInfoR\x0ftriggeredBuilds\"\xa1\x01\n" + + "\tBuildInfo\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12!\n" + + "\fdocker_image\x18\x02 \x01(\tR\vdockerImage\x12\x16\n" + + "\x06status\x18\x03 \x01(\tR\x06status\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\x12\x19\n" + + "\basset_id\x18\x05 \x01(\tR\aassetId*\x87\x01\n" + + "\tAssetType\x12\x1a\n" + + "\x16ASSET_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + + "\x11ASSET_TYPE_KERNEL\x10\x01\x12\x15\n" + + "\x11ASSET_TYPE_ROOTFS\x10\x02\x12\x15\n" + + "\x11ASSET_TYPE_INITRD\x10\x03\x12\x19\n" + + "\x15ASSET_TYPE_DISK_IMAGE\x10\x04*\x96\x01\n" + + "\vAssetStatus\x12\x1c\n" + + "\x18ASSET_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n" + + "\x16ASSET_STATUS_UPLOADING\x10\x01\x12\x1a\n" + + "\x16ASSET_STATUS_AVAILABLE\x10\x02\x12\x19\n" + + "\x15ASSET_STATUS_DELETING\x10\x03\x12\x16\n" + + "\x12ASSET_STATUS_ERROR\x10\x04*\x97\x01\n" + + "\x0eStorageBackend\x12\x1f\n" + + "\x1bSTORAGE_BACKEND_UNSPECIFIED\x10\x00\x12\x19\n" + + "\x15STORAGE_BACKEND_LOCAL\x10\x01\x12\x16\n" + + "\x12STORAGE_BACKEND_S3\x10\x02\x12\x18\n" + + "\x14STORAGE_BACKEND_HTTP\x10\x03\x12\x17\n" + + "\x13STORAGE_BACKEND_NFS\x10\x042\x9e\x06\n" + + "\x13AssetManagerService\x12L\n" + + "\vUploadAsset\x12\x1c.asset.v1.UploadAssetRequest\x1a\x1d.asset.v1.UploadAssetResponse(\x01\x12P\n" + + "\rRegisterAsset\x12\x1e.asset.v1.RegisterAssetRequest\x1a\x1f.asset.v1.RegisterAssetResponse\x12A\n" + + "\bGetAsset\x12\x19.asset.v1.GetAssetRequest\x1a\x1a.asset.v1.GetAssetResponse\x12G\n" + + "\n" + + "ListAssets\x12\x1b.asset.v1.ListAssetsRequest\x1a\x1c.asset.v1.ListAssetsResponse\x12M\n" + + "\fAcquireAsset\x12\x1d.asset.v1.AcquireAssetRequest\x1a\x1e.asset.v1.AcquireAssetResponse\x12M\n" + + "\fReleaseAsset\x12\x1d.asset.v1.ReleaseAssetRequest\x1a\x1e.asset.v1.ReleaseAssetResponse\x12J\n" + + "\vDeleteAsset\x12\x1c.asset.v1.DeleteAssetRequest\x1a\x1d.asset.v1.DeleteAssetResponse\x12S\n" + + "\x0eGarbageCollect\x12\x1f.asset.v1.GarbageCollectRequest\x1a .asset.v1.GarbageCollectResponse\x12P\n" + + "\rPrepareAssets\x12\x1e.asset.v1.PrepareAssetsRequest\x1a\x1f.asset.v1.PrepareAssetsResponse\x12J\n" + + "\vQueryAssets\x12\x1c.asset.v1.QueryAssetsRequest\x1a\x1d.asset.v1.QueryAssetsResponseBGZEgithub.com/unkeyed/unkey/go/deploy/assetmanagerd/gen/asset/v1;assetv1b\x06proto3" + +var ( + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescOnce sync.Once + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescData []byte +) + +func file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescGZIP() []byte { + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescOnce.Do(func() { + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDesc), len(file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDesc))) + }) + return file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDescData +} + +var file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_deploy_assetmanagerd_proto_asset_v1_asset_proto_goTypes = []any{ + (AssetType)(0), // 0: asset.v1.AssetType + (AssetStatus)(0), // 1: asset.v1.AssetStatus + (StorageBackend)(0), // 2: asset.v1.StorageBackend + (*Asset)(nil), // 3: asset.v1.Asset + (*UploadAssetRequest)(nil), // 4: asset.v1.UploadAssetRequest + (*UploadAssetMetadata)(nil), // 5: asset.v1.UploadAssetMetadata + (*UploadAssetResponse)(nil), // 6: asset.v1.UploadAssetResponse + (*RegisterAssetRequest)(nil), // 7: asset.v1.RegisterAssetRequest + (*RegisterAssetResponse)(nil), // 8: asset.v1.RegisterAssetResponse + (*GetAssetRequest)(nil), // 9: asset.v1.GetAssetRequest + (*GetAssetResponse)(nil), // 10: asset.v1.GetAssetResponse + (*ListAssetsRequest)(nil), // 11: asset.v1.ListAssetsRequest + (*ListAssetsResponse)(nil), // 12: asset.v1.ListAssetsResponse + (*AcquireAssetRequest)(nil), // 13: asset.v1.AcquireAssetRequest + (*AcquireAssetResponse)(nil), // 14: asset.v1.AcquireAssetResponse + (*ReleaseAssetRequest)(nil), // 15: asset.v1.ReleaseAssetRequest + (*ReleaseAssetResponse)(nil), // 16: asset.v1.ReleaseAssetResponse + (*DeleteAssetRequest)(nil), // 17: asset.v1.DeleteAssetRequest + (*DeleteAssetResponse)(nil), // 18: asset.v1.DeleteAssetResponse + (*GarbageCollectRequest)(nil), // 19: asset.v1.GarbageCollectRequest + (*GarbageCollectResponse)(nil), // 20: asset.v1.GarbageCollectResponse + (*PrepareAssetsRequest)(nil), // 21: asset.v1.PrepareAssetsRequest + (*PrepareAssetsResponse)(nil), // 22: asset.v1.PrepareAssetsResponse + (*QueryAssetsRequest)(nil), // 23: asset.v1.QueryAssetsRequest + (*BuildOptions)(nil), // 24: asset.v1.BuildOptions + (*QueryAssetsResponse)(nil), // 25: asset.v1.QueryAssetsResponse + (*BuildInfo)(nil), // 26: asset.v1.BuildInfo + nil, // 27: asset.v1.Asset.LabelsEntry + nil, // 28: asset.v1.UploadAssetMetadata.LabelsEntry + nil, // 29: asset.v1.RegisterAssetRequest.LabelsEntry + nil, // 30: asset.v1.ListAssetsRequest.LabelSelectorEntry + nil, // 31: asset.v1.PrepareAssetsResponse.AssetPathsEntry + nil, // 32: asset.v1.QueryAssetsRequest.LabelSelectorEntry + nil, // 33: asset.v1.BuildOptions.BuildLabelsEntry +} +var file_deploy_assetmanagerd_proto_asset_v1_asset_proto_depIdxs = []int32{ + 0, // 0: asset.v1.Asset.type:type_name -> asset.v1.AssetType + 1, // 1: asset.v1.Asset.status:type_name -> asset.v1.AssetStatus + 2, // 2: asset.v1.Asset.backend:type_name -> asset.v1.StorageBackend + 27, // 3: asset.v1.Asset.labels:type_name -> asset.v1.Asset.LabelsEntry + 5, // 4: asset.v1.UploadAssetRequest.metadata:type_name -> asset.v1.UploadAssetMetadata + 0, // 5: asset.v1.UploadAssetMetadata.type:type_name -> asset.v1.AssetType + 28, // 6: asset.v1.UploadAssetMetadata.labels:type_name -> asset.v1.UploadAssetMetadata.LabelsEntry + 3, // 7: asset.v1.UploadAssetResponse.asset:type_name -> asset.v1.Asset + 0, // 8: asset.v1.RegisterAssetRequest.type:type_name -> asset.v1.AssetType + 2, // 9: asset.v1.RegisterAssetRequest.backend:type_name -> asset.v1.StorageBackend + 29, // 10: asset.v1.RegisterAssetRequest.labels:type_name -> asset.v1.RegisterAssetRequest.LabelsEntry + 3, // 11: asset.v1.RegisterAssetResponse.asset:type_name -> asset.v1.Asset + 3, // 12: asset.v1.GetAssetResponse.asset:type_name -> asset.v1.Asset + 0, // 13: asset.v1.ListAssetsRequest.type:type_name -> asset.v1.AssetType + 1, // 14: asset.v1.ListAssetsRequest.status:type_name -> asset.v1.AssetStatus + 30, // 15: asset.v1.ListAssetsRequest.label_selector:type_name -> asset.v1.ListAssetsRequest.LabelSelectorEntry + 3, // 16: asset.v1.ListAssetsResponse.assets:type_name -> asset.v1.Asset + 3, // 17: asset.v1.AcquireAssetResponse.asset:type_name -> asset.v1.Asset + 3, // 18: asset.v1.ReleaseAssetResponse.asset:type_name -> asset.v1.Asset + 3, // 19: asset.v1.GarbageCollectResponse.deleted_assets:type_name -> asset.v1.Asset + 31, // 20: asset.v1.PrepareAssetsResponse.asset_paths:type_name -> asset.v1.PrepareAssetsResponse.AssetPathsEntry + 0, // 21: asset.v1.QueryAssetsRequest.type:type_name -> asset.v1.AssetType + 1, // 22: asset.v1.QueryAssetsRequest.status:type_name -> asset.v1.AssetStatus + 32, // 23: asset.v1.QueryAssetsRequest.label_selector:type_name -> asset.v1.QueryAssetsRequest.LabelSelectorEntry + 24, // 24: asset.v1.QueryAssetsRequest.build_options:type_name -> asset.v1.BuildOptions + 33, // 25: asset.v1.BuildOptions.build_labels:type_name -> asset.v1.BuildOptions.BuildLabelsEntry + 3, // 26: asset.v1.QueryAssetsResponse.assets:type_name -> asset.v1.Asset + 26, // 27: asset.v1.QueryAssetsResponse.triggered_builds:type_name -> asset.v1.BuildInfo + 4, // 28: asset.v1.AssetManagerService.UploadAsset:input_type -> asset.v1.UploadAssetRequest + 7, // 29: asset.v1.AssetManagerService.RegisterAsset:input_type -> asset.v1.RegisterAssetRequest + 9, // 30: asset.v1.AssetManagerService.GetAsset:input_type -> asset.v1.GetAssetRequest + 11, // 31: asset.v1.AssetManagerService.ListAssets:input_type -> asset.v1.ListAssetsRequest + 13, // 32: asset.v1.AssetManagerService.AcquireAsset:input_type -> asset.v1.AcquireAssetRequest + 15, // 33: asset.v1.AssetManagerService.ReleaseAsset:input_type -> asset.v1.ReleaseAssetRequest + 17, // 34: asset.v1.AssetManagerService.DeleteAsset:input_type -> asset.v1.DeleteAssetRequest + 19, // 35: asset.v1.AssetManagerService.GarbageCollect:input_type -> asset.v1.GarbageCollectRequest + 21, // 36: asset.v1.AssetManagerService.PrepareAssets:input_type -> asset.v1.PrepareAssetsRequest + 23, // 37: asset.v1.AssetManagerService.QueryAssets:input_type -> asset.v1.QueryAssetsRequest + 6, // 38: asset.v1.AssetManagerService.UploadAsset:output_type -> asset.v1.UploadAssetResponse + 8, // 39: asset.v1.AssetManagerService.RegisterAsset:output_type -> asset.v1.RegisterAssetResponse + 10, // 40: asset.v1.AssetManagerService.GetAsset:output_type -> asset.v1.GetAssetResponse + 12, // 41: asset.v1.AssetManagerService.ListAssets:output_type -> asset.v1.ListAssetsResponse + 14, // 42: asset.v1.AssetManagerService.AcquireAsset:output_type -> asset.v1.AcquireAssetResponse + 16, // 43: asset.v1.AssetManagerService.ReleaseAsset:output_type -> asset.v1.ReleaseAssetResponse + 18, // 44: asset.v1.AssetManagerService.DeleteAsset:output_type -> asset.v1.DeleteAssetResponse + 20, // 45: asset.v1.AssetManagerService.GarbageCollect:output_type -> asset.v1.GarbageCollectResponse + 22, // 46: asset.v1.AssetManagerService.PrepareAssets:output_type -> asset.v1.PrepareAssetsResponse + 25, // 47: asset.v1.AssetManagerService.QueryAssets:output_type -> asset.v1.QueryAssetsResponse + 38, // [38:48] is the sub-list for method output_type + 28, // [28:38] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_deploy_assetmanagerd_proto_asset_v1_asset_proto_init() } +func file_deploy_assetmanagerd_proto_asset_v1_asset_proto_init() { + if File_deploy_assetmanagerd_proto_asset_v1_asset_proto != nil { + return + } + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes[1].OneofWrappers = []any{ + (*UploadAssetRequest_Metadata)(nil), + (*UploadAssetRequest_Chunk)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDesc), len(file_deploy_assetmanagerd_proto_asset_v1_asset_proto_rawDesc)), + NumEnums: 3, + NumMessages: 31, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_deploy_assetmanagerd_proto_asset_v1_asset_proto_goTypes, + DependencyIndexes: file_deploy_assetmanagerd_proto_asset_v1_asset_proto_depIdxs, + EnumInfos: file_deploy_assetmanagerd_proto_asset_v1_asset_proto_enumTypes, + MessageInfos: file_deploy_assetmanagerd_proto_asset_v1_asset_proto_msgTypes, + }.Build() + File_deploy_assetmanagerd_proto_asset_v1_asset_proto = out.File + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_goTypes = nil + file_deploy_assetmanagerd_proto_asset_v1_asset_proto_depIdxs = nil +} diff --git a/go/gen/deploy/assetmanagerd/proto/asset/v1/assetv1connect/asset.connect.go b/go/gen/deploy/assetmanagerd/proto/asset/v1/assetv1connect/asset.connect.go new file mode 100644 index 0000000000..238815eff1 --- /dev/null +++ b/go/gen/deploy/assetmanagerd/proto/asset/v1/assetv1connect/asset.connect.go @@ -0,0 +1,405 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: deploy/assetmanagerd/proto/asset/v1/asset.proto + +package assetv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/unkeyed/unkey/go/deploy/assetmanagerd/gen/asset/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // AssetManagerServiceName is the fully-qualified name of the AssetManagerService service. + AssetManagerServiceName = "asset.v1.AssetManagerService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // AssetManagerServiceUploadAssetProcedure is the fully-qualified name of the AssetManagerService's + // UploadAsset RPC. + AssetManagerServiceUploadAssetProcedure = "/asset.v1.AssetManagerService/UploadAsset" + // AssetManagerServiceRegisterAssetProcedure is the fully-qualified name of the + // AssetManagerService's RegisterAsset RPC. + AssetManagerServiceRegisterAssetProcedure = "/asset.v1.AssetManagerService/RegisterAsset" + // AssetManagerServiceGetAssetProcedure is the fully-qualified name of the AssetManagerService's + // GetAsset RPC. + AssetManagerServiceGetAssetProcedure = "/asset.v1.AssetManagerService/GetAsset" + // AssetManagerServiceListAssetsProcedure is the fully-qualified name of the AssetManagerService's + // ListAssets RPC. + AssetManagerServiceListAssetsProcedure = "/asset.v1.AssetManagerService/ListAssets" + // AssetManagerServiceAcquireAssetProcedure is the fully-qualified name of the AssetManagerService's + // AcquireAsset RPC. + AssetManagerServiceAcquireAssetProcedure = "/asset.v1.AssetManagerService/AcquireAsset" + // AssetManagerServiceReleaseAssetProcedure is the fully-qualified name of the AssetManagerService's + // ReleaseAsset RPC. + AssetManagerServiceReleaseAssetProcedure = "/asset.v1.AssetManagerService/ReleaseAsset" + // AssetManagerServiceDeleteAssetProcedure is the fully-qualified name of the AssetManagerService's + // DeleteAsset RPC. + AssetManagerServiceDeleteAssetProcedure = "/asset.v1.AssetManagerService/DeleteAsset" + // AssetManagerServiceGarbageCollectProcedure is the fully-qualified name of the + // AssetManagerService's GarbageCollect RPC. + AssetManagerServiceGarbageCollectProcedure = "/asset.v1.AssetManagerService/GarbageCollect" + // AssetManagerServicePrepareAssetsProcedure is the fully-qualified name of the + // AssetManagerService's PrepareAssets RPC. + AssetManagerServicePrepareAssetsProcedure = "/asset.v1.AssetManagerService/PrepareAssets" + // AssetManagerServiceQueryAssetsProcedure is the fully-qualified name of the AssetManagerService's + // QueryAssets RPC. + AssetManagerServiceQueryAssetsProcedure = "/asset.v1.AssetManagerService/QueryAssets" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + assetManagerServiceServiceDescriptor = v1.File_deploy_assetmanagerd_proto_asset_v1_asset_proto.Services().ByName("AssetManagerService") + assetManagerServiceUploadAssetMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("UploadAsset") + assetManagerServiceRegisterAssetMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("RegisterAsset") + assetManagerServiceGetAssetMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("GetAsset") + assetManagerServiceListAssetsMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("ListAssets") + assetManagerServiceAcquireAssetMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("AcquireAsset") + assetManagerServiceReleaseAssetMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("ReleaseAsset") + assetManagerServiceDeleteAssetMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("DeleteAsset") + assetManagerServiceGarbageCollectMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("GarbageCollect") + assetManagerServicePrepareAssetsMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("PrepareAssets") + assetManagerServiceQueryAssetsMethodDescriptor = assetManagerServiceServiceDescriptor.Methods().ByName("QueryAssets") +) + +// AssetManagerServiceClient is a client for the asset.v1.AssetManagerService service. +type AssetManagerServiceClient interface { + // Upload and register an asset in one operation + UploadAsset(context.Context) *connect.ClientStreamForClient[v1.UploadAssetRequest, v1.UploadAssetResponse] + // Register a new asset (called by builderd after creating images) + RegisterAsset(context.Context, *connect.Request[v1.RegisterAssetRequest]) (*connect.Response[v1.RegisterAssetResponse], error) + // Get asset location and metadata + GetAsset(context.Context, *connect.Request[v1.GetAssetRequest]) (*connect.Response[v1.GetAssetResponse], error) + // List available assets with filtering + ListAssets(context.Context, *connect.Request[v1.ListAssetsRequest]) (*connect.Response[v1.ListAssetsResponse], error) + // Mark asset as in-use (reference counting for GC) + AcquireAsset(context.Context, *connect.Request[v1.AcquireAssetRequest]) (*connect.Response[v1.AcquireAssetResponse], error) + // Release asset reference (decrements ref count) + ReleaseAsset(context.Context, *connect.Request[v1.ReleaseAssetRequest]) (*connect.Response[v1.ReleaseAssetResponse], error) + // Delete an asset (only if ref count is 0) + DeleteAsset(context.Context, *connect.Request[v1.DeleteAssetRequest]) (*connect.Response[v1.DeleteAssetResponse], error) + // Trigger garbage collection of unused assets + GarbageCollect(context.Context, *connect.Request[v1.GarbageCollectRequest]) (*connect.Response[v1.GarbageCollectResponse], error) + // Pre-stage assets for a specific host/jailer + PrepareAssets(context.Context, *connect.Request[v1.PrepareAssetsRequest]) (*connect.Response[v1.PrepareAssetsResponse], error) + // Query assets with automatic build triggering if not found + // This is the enhanced version of ListAssets that supports automatic asset creation + QueryAssets(context.Context, *connect.Request[v1.QueryAssetsRequest]) (*connect.Response[v1.QueryAssetsResponse], error) +} + +// NewAssetManagerServiceClient constructs a client for the asset.v1.AssetManagerService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewAssetManagerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AssetManagerServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &assetManagerServiceClient{ + uploadAsset: connect.NewClient[v1.UploadAssetRequest, v1.UploadAssetResponse]( + httpClient, + baseURL+AssetManagerServiceUploadAssetProcedure, + connect.WithSchema(assetManagerServiceUploadAssetMethodDescriptor), + connect.WithClientOptions(opts...), + ), + registerAsset: connect.NewClient[v1.RegisterAssetRequest, v1.RegisterAssetResponse]( + httpClient, + baseURL+AssetManagerServiceRegisterAssetProcedure, + connect.WithSchema(assetManagerServiceRegisterAssetMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getAsset: connect.NewClient[v1.GetAssetRequest, v1.GetAssetResponse]( + httpClient, + baseURL+AssetManagerServiceGetAssetProcedure, + connect.WithSchema(assetManagerServiceGetAssetMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listAssets: connect.NewClient[v1.ListAssetsRequest, v1.ListAssetsResponse]( + httpClient, + baseURL+AssetManagerServiceListAssetsProcedure, + connect.WithSchema(assetManagerServiceListAssetsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + acquireAsset: connect.NewClient[v1.AcquireAssetRequest, v1.AcquireAssetResponse]( + httpClient, + baseURL+AssetManagerServiceAcquireAssetProcedure, + connect.WithSchema(assetManagerServiceAcquireAssetMethodDescriptor), + connect.WithClientOptions(opts...), + ), + releaseAsset: connect.NewClient[v1.ReleaseAssetRequest, v1.ReleaseAssetResponse]( + httpClient, + baseURL+AssetManagerServiceReleaseAssetProcedure, + connect.WithSchema(assetManagerServiceReleaseAssetMethodDescriptor), + connect.WithClientOptions(opts...), + ), + deleteAsset: connect.NewClient[v1.DeleteAssetRequest, v1.DeleteAssetResponse]( + httpClient, + baseURL+AssetManagerServiceDeleteAssetProcedure, + connect.WithSchema(assetManagerServiceDeleteAssetMethodDescriptor), + connect.WithClientOptions(opts...), + ), + garbageCollect: connect.NewClient[v1.GarbageCollectRequest, v1.GarbageCollectResponse]( + httpClient, + baseURL+AssetManagerServiceGarbageCollectProcedure, + connect.WithSchema(assetManagerServiceGarbageCollectMethodDescriptor), + connect.WithClientOptions(opts...), + ), + prepareAssets: connect.NewClient[v1.PrepareAssetsRequest, v1.PrepareAssetsResponse]( + httpClient, + baseURL+AssetManagerServicePrepareAssetsProcedure, + connect.WithSchema(assetManagerServicePrepareAssetsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + queryAssets: connect.NewClient[v1.QueryAssetsRequest, v1.QueryAssetsResponse]( + httpClient, + baseURL+AssetManagerServiceQueryAssetsProcedure, + connect.WithSchema(assetManagerServiceQueryAssetsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// assetManagerServiceClient implements AssetManagerServiceClient. +type assetManagerServiceClient struct { + uploadAsset *connect.Client[v1.UploadAssetRequest, v1.UploadAssetResponse] + registerAsset *connect.Client[v1.RegisterAssetRequest, v1.RegisterAssetResponse] + getAsset *connect.Client[v1.GetAssetRequest, v1.GetAssetResponse] + listAssets *connect.Client[v1.ListAssetsRequest, v1.ListAssetsResponse] + acquireAsset *connect.Client[v1.AcquireAssetRequest, v1.AcquireAssetResponse] + releaseAsset *connect.Client[v1.ReleaseAssetRequest, v1.ReleaseAssetResponse] + deleteAsset *connect.Client[v1.DeleteAssetRequest, v1.DeleteAssetResponse] + garbageCollect *connect.Client[v1.GarbageCollectRequest, v1.GarbageCollectResponse] + prepareAssets *connect.Client[v1.PrepareAssetsRequest, v1.PrepareAssetsResponse] + queryAssets *connect.Client[v1.QueryAssetsRequest, v1.QueryAssetsResponse] +} + +// UploadAsset calls asset.v1.AssetManagerService.UploadAsset. +func (c *assetManagerServiceClient) UploadAsset(ctx context.Context) *connect.ClientStreamForClient[v1.UploadAssetRequest, v1.UploadAssetResponse] { + return c.uploadAsset.CallClientStream(ctx) +} + +// RegisterAsset calls asset.v1.AssetManagerService.RegisterAsset. +func (c *assetManagerServiceClient) RegisterAsset(ctx context.Context, req *connect.Request[v1.RegisterAssetRequest]) (*connect.Response[v1.RegisterAssetResponse], error) { + return c.registerAsset.CallUnary(ctx, req) +} + +// GetAsset calls asset.v1.AssetManagerService.GetAsset. +func (c *assetManagerServiceClient) GetAsset(ctx context.Context, req *connect.Request[v1.GetAssetRequest]) (*connect.Response[v1.GetAssetResponse], error) { + return c.getAsset.CallUnary(ctx, req) +} + +// ListAssets calls asset.v1.AssetManagerService.ListAssets. +func (c *assetManagerServiceClient) ListAssets(ctx context.Context, req *connect.Request[v1.ListAssetsRequest]) (*connect.Response[v1.ListAssetsResponse], error) { + return c.listAssets.CallUnary(ctx, req) +} + +// AcquireAsset calls asset.v1.AssetManagerService.AcquireAsset. +func (c *assetManagerServiceClient) AcquireAsset(ctx context.Context, req *connect.Request[v1.AcquireAssetRequest]) (*connect.Response[v1.AcquireAssetResponse], error) { + return c.acquireAsset.CallUnary(ctx, req) +} + +// ReleaseAsset calls asset.v1.AssetManagerService.ReleaseAsset. +func (c *assetManagerServiceClient) ReleaseAsset(ctx context.Context, req *connect.Request[v1.ReleaseAssetRequest]) (*connect.Response[v1.ReleaseAssetResponse], error) { + return c.releaseAsset.CallUnary(ctx, req) +} + +// DeleteAsset calls asset.v1.AssetManagerService.DeleteAsset. +func (c *assetManagerServiceClient) DeleteAsset(ctx context.Context, req *connect.Request[v1.DeleteAssetRequest]) (*connect.Response[v1.DeleteAssetResponse], error) { + return c.deleteAsset.CallUnary(ctx, req) +} + +// GarbageCollect calls asset.v1.AssetManagerService.GarbageCollect. +func (c *assetManagerServiceClient) GarbageCollect(ctx context.Context, req *connect.Request[v1.GarbageCollectRequest]) (*connect.Response[v1.GarbageCollectResponse], error) { + return c.garbageCollect.CallUnary(ctx, req) +} + +// PrepareAssets calls asset.v1.AssetManagerService.PrepareAssets. +func (c *assetManagerServiceClient) PrepareAssets(ctx context.Context, req *connect.Request[v1.PrepareAssetsRequest]) (*connect.Response[v1.PrepareAssetsResponse], error) { + return c.prepareAssets.CallUnary(ctx, req) +} + +// QueryAssets calls asset.v1.AssetManagerService.QueryAssets. +func (c *assetManagerServiceClient) QueryAssets(ctx context.Context, req *connect.Request[v1.QueryAssetsRequest]) (*connect.Response[v1.QueryAssetsResponse], error) { + return c.queryAssets.CallUnary(ctx, req) +} + +// AssetManagerServiceHandler is an implementation of the asset.v1.AssetManagerService service. +type AssetManagerServiceHandler interface { + // Upload and register an asset in one operation + UploadAsset(context.Context, *connect.ClientStream[v1.UploadAssetRequest]) (*connect.Response[v1.UploadAssetResponse], error) + // Register a new asset (called by builderd after creating images) + RegisterAsset(context.Context, *connect.Request[v1.RegisterAssetRequest]) (*connect.Response[v1.RegisterAssetResponse], error) + // Get asset location and metadata + GetAsset(context.Context, *connect.Request[v1.GetAssetRequest]) (*connect.Response[v1.GetAssetResponse], error) + // List available assets with filtering + ListAssets(context.Context, *connect.Request[v1.ListAssetsRequest]) (*connect.Response[v1.ListAssetsResponse], error) + // Mark asset as in-use (reference counting for GC) + AcquireAsset(context.Context, *connect.Request[v1.AcquireAssetRequest]) (*connect.Response[v1.AcquireAssetResponse], error) + // Release asset reference (decrements ref count) + ReleaseAsset(context.Context, *connect.Request[v1.ReleaseAssetRequest]) (*connect.Response[v1.ReleaseAssetResponse], error) + // Delete an asset (only if ref count is 0) + DeleteAsset(context.Context, *connect.Request[v1.DeleteAssetRequest]) (*connect.Response[v1.DeleteAssetResponse], error) + // Trigger garbage collection of unused assets + GarbageCollect(context.Context, *connect.Request[v1.GarbageCollectRequest]) (*connect.Response[v1.GarbageCollectResponse], error) + // Pre-stage assets for a specific host/jailer + PrepareAssets(context.Context, *connect.Request[v1.PrepareAssetsRequest]) (*connect.Response[v1.PrepareAssetsResponse], error) + // Query assets with automatic build triggering if not found + // This is the enhanced version of ListAssets that supports automatic asset creation + QueryAssets(context.Context, *connect.Request[v1.QueryAssetsRequest]) (*connect.Response[v1.QueryAssetsResponse], error) +} + +// NewAssetManagerServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewAssetManagerServiceHandler(svc AssetManagerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + assetManagerServiceUploadAssetHandler := connect.NewClientStreamHandler( + AssetManagerServiceUploadAssetProcedure, + svc.UploadAsset, + connect.WithSchema(assetManagerServiceUploadAssetMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceRegisterAssetHandler := connect.NewUnaryHandler( + AssetManagerServiceRegisterAssetProcedure, + svc.RegisterAsset, + connect.WithSchema(assetManagerServiceRegisterAssetMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceGetAssetHandler := connect.NewUnaryHandler( + AssetManagerServiceGetAssetProcedure, + svc.GetAsset, + connect.WithSchema(assetManagerServiceGetAssetMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceListAssetsHandler := connect.NewUnaryHandler( + AssetManagerServiceListAssetsProcedure, + svc.ListAssets, + connect.WithSchema(assetManagerServiceListAssetsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceAcquireAssetHandler := connect.NewUnaryHandler( + AssetManagerServiceAcquireAssetProcedure, + svc.AcquireAsset, + connect.WithSchema(assetManagerServiceAcquireAssetMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceReleaseAssetHandler := connect.NewUnaryHandler( + AssetManagerServiceReleaseAssetProcedure, + svc.ReleaseAsset, + connect.WithSchema(assetManagerServiceReleaseAssetMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceDeleteAssetHandler := connect.NewUnaryHandler( + AssetManagerServiceDeleteAssetProcedure, + svc.DeleteAsset, + connect.WithSchema(assetManagerServiceDeleteAssetMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceGarbageCollectHandler := connect.NewUnaryHandler( + AssetManagerServiceGarbageCollectProcedure, + svc.GarbageCollect, + connect.WithSchema(assetManagerServiceGarbageCollectMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServicePrepareAssetsHandler := connect.NewUnaryHandler( + AssetManagerServicePrepareAssetsProcedure, + svc.PrepareAssets, + connect.WithSchema(assetManagerServicePrepareAssetsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + assetManagerServiceQueryAssetsHandler := connect.NewUnaryHandler( + AssetManagerServiceQueryAssetsProcedure, + svc.QueryAssets, + connect.WithSchema(assetManagerServiceQueryAssetsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/asset.v1.AssetManagerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case AssetManagerServiceUploadAssetProcedure: + assetManagerServiceUploadAssetHandler.ServeHTTP(w, r) + case AssetManagerServiceRegisterAssetProcedure: + assetManagerServiceRegisterAssetHandler.ServeHTTP(w, r) + case AssetManagerServiceGetAssetProcedure: + assetManagerServiceGetAssetHandler.ServeHTTP(w, r) + case AssetManagerServiceListAssetsProcedure: + assetManagerServiceListAssetsHandler.ServeHTTP(w, r) + case AssetManagerServiceAcquireAssetProcedure: + assetManagerServiceAcquireAssetHandler.ServeHTTP(w, r) + case AssetManagerServiceReleaseAssetProcedure: + assetManagerServiceReleaseAssetHandler.ServeHTTP(w, r) + case AssetManagerServiceDeleteAssetProcedure: + assetManagerServiceDeleteAssetHandler.ServeHTTP(w, r) + case AssetManagerServiceGarbageCollectProcedure: + assetManagerServiceGarbageCollectHandler.ServeHTTP(w, r) + case AssetManagerServicePrepareAssetsProcedure: + assetManagerServicePrepareAssetsHandler.ServeHTTP(w, r) + case AssetManagerServiceQueryAssetsProcedure: + assetManagerServiceQueryAssetsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedAssetManagerServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedAssetManagerServiceHandler struct{} + +func (UnimplementedAssetManagerServiceHandler) UploadAsset(context.Context, *connect.ClientStream[v1.UploadAssetRequest]) (*connect.Response[v1.UploadAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.UploadAsset is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) RegisterAsset(context.Context, *connect.Request[v1.RegisterAssetRequest]) (*connect.Response[v1.RegisterAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.RegisterAsset is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) GetAsset(context.Context, *connect.Request[v1.GetAssetRequest]) (*connect.Response[v1.GetAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.GetAsset is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) ListAssets(context.Context, *connect.Request[v1.ListAssetsRequest]) (*connect.Response[v1.ListAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.ListAssets is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) AcquireAsset(context.Context, *connect.Request[v1.AcquireAssetRequest]) (*connect.Response[v1.AcquireAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.AcquireAsset is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) ReleaseAsset(context.Context, *connect.Request[v1.ReleaseAssetRequest]) (*connect.Response[v1.ReleaseAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.ReleaseAsset is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) DeleteAsset(context.Context, *connect.Request[v1.DeleteAssetRequest]) (*connect.Response[v1.DeleteAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.DeleteAsset is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) GarbageCollect(context.Context, *connect.Request[v1.GarbageCollectRequest]) (*connect.Response[v1.GarbageCollectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.GarbageCollect is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) PrepareAssets(context.Context, *connect.Request[v1.PrepareAssetsRequest]) (*connect.Response[v1.PrepareAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.PrepareAssets is not implemented")) +} + +func (UnimplementedAssetManagerServiceHandler) QueryAssets(context.Context, *connect.Request[v1.QueryAssetsRequest]) (*connect.Response[v1.QueryAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("asset.v1.AssetManagerService.QueryAssets is not implemented")) +} diff --git a/go/gen/deploy/billaged/proto/billing/v1/billing.pb.go b/go/gen/deploy/billaged/proto/billing/v1/billing.pb.go new file mode 100644 index 0000000000..1f4e0baca5 --- /dev/null +++ b/go/gen/deploy/billaged/proto/billing/v1/billing.pb.go @@ -0,0 +1,754 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc (unknown) +// source: deploy/billaged/proto/billing/v1/billing.proto + +package billingv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type VMMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + CpuTimeNanos int64 `protobuf:"varint,2,opt,name=cpu_time_nanos,json=cpuTimeNanos,proto3" json:"cpu_time_nanos,omitempty"` + MemoryUsageBytes int64 `protobuf:"varint,3,opt,name=memory_usage_bytes,json=memoryUsageBytes,proto3" json:"memory_usage_bytes,omitempty"` + DiskReadBytes int64 `protobuf:"varint,4,opt,name=disk_read_bytes,json=diskReadBytes,proto3" json:"disk_read_bytes,omitempty"` + DiskWriteBytes int64 `protobuf:"varint,5,opt,name=disk_write_bytes,json=diskWriteBytes,proto3" json:"disk_write_bytes,omitempty"` + NetworkRxBytes int64 `protobuf:"varint,6,opt,name=network_rx_bytes,json=networkRxBytes,proto3" json:"network_rx_bytes,omitempty"` + NetworkTxBytes int64 `protobuf:"varint,7,opt,name=network_tx_bytes,json=networkTxBytes,proto3" json:"network_tx_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VMMetrics) Reset() { + *x = VMMetrics{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMMetrics) ProtoMessage() {} + +func (x *VMMetrics) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VMMetrics.ProtoReflect.Descriptor instead. +func (*VMMetrics) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{0} +} + +func (x *VMMetrics) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *VMMetrics) GetCpuTimeNanos() int64 { + if x != nil { + return x.CpuTimeNanos + } + return 0 +} + +func (x *VMMetrics) GetMemoryUsageBytes() int64 { + if x != nil { + return x.MemoryUsageBytes + } + return 0 +} + +func (x *VMMetrics) GetDiskReadBytes() int64 { + if x != nil { + return x.DiskReadBytes + } + return 0 +} + +func (x *VMMetrics) GetDiskWriteBytes() int64 { + if x != nil { + return x.DiskWriteBytes + } + return 0 +} + +func (x *VMMetrics) GetNetworkRxBytes() int64 { + if x != nil { + return x.NetworkRxBytes + } + return 0 +} + +func (x *VMMetrics) GetNetworkTxBytes() int64 { + if x != nil { + return x.NetworkTxBytes + } + return 0 +} + +type SendMetricsBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` + Metrics []*VMMetrics `protobuf:"bytes,3,rep,name=metrics,proto3" json:"metrics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMetricsBatchRequest) Reset() { + *x = SendMetricsBatchRequest{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMetricsBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMetricsBatchRequest) ProtoMessage() {} + +func (x *SendMetricsBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMetricsBatchRequest.ProtoReflect.Descriptor instead. +func (*SendMetricsBatchRequest) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{1} +} + +func (x *SendMetricsBatchRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *SendMetricsBatchRequest) GetCustomerId() string { + if x != nil { + return x.CustomerId + } + return "" +} + +func (x *SendMetricsBatchRequest) GetMetrics() []*VMMetrics { + if x != nil { + return x.Metrics + } + return nil +} + +type SendMetricsBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMetricsBatchResponse) Reset() { + *x = SendMetricsBatchResponse{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMetricsBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMetricsBatchResponse) ProtoMessage() {} + +func (x *SendMetricsBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMetricsBatchResponse.ProtoReflect.Descriptor instead. +func (*SendMetricsBatchResponse) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{2} +} + +func (x *SendMetricsBatchResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *SendMetricsBatchResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type SendHeartbeatRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + ActiveVms []string `protobuf:"bytes,2,rep,name=active_vms,json=activeVms,proto3" json:"active_vms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendHeartbeatRequest) Reset() { + *x = SendHeartbeatRequest{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendHeartbeatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendHeartbeatRequest) ProtoMessage() {} + +func (x *SendHeartbeatRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendHeartbeatRequest.ProtoReflect.Descriptor instead. +func (*SendHeartbeatRequest) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{3} +} + +func (x *SendHeartbeatRequest) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *SendHeartbeatRequest) GetActiveVms() []string { + if x != nil { + return x.ActiveVms + } + return nil +} + +type SendHeartbeatResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendHeartbeatResponse) Reset() { + *x = SendHeartbeatResponse{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendHeartbeatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendHeartbeatResponse) ProtoMessage() {} + +func (x *SendHeartbeatResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendHeartbeatResponse.ProtoReflect.Descriptor instead. +func (*SendHeartbeatResponse) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{4} +} + +func (x *SendHeartbeatResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type NotifyVmStartedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` + StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotifyVmStartedRequest) Reset() { + *x = NotifyVmStartedRequest{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotifyVmStartedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyVmStartedRequest) ProtoMessage() {} + +func (x *NotifyVmStartedRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyVmStartedRequest.ProtoReflect.Descriptor instead. +func (*NotifyVmStartedRequest) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{5} +} + +func (x *NotifyVmStartedRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *NotifyVmStartedRequest) GetCustomerId() string { + if x != nil { + return x.CustomerId + } + return "" +} + +func (x *NotifyVmStartedRequest) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +type NotifyVmStartedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotifyVmStartedResponse) Reset() { + *x = NotifyVmStartedResponse{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotifyVmStartedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyVmStartedResponse) ProtoMessage() {} + +func (x *NotifyVmStartedResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyVmStartedResponse.ProtoReflect.Descriptor instead. +func (*NotifyVmStartedResponse) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{6} +} + +func (x *NotifyVmStartedResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type NotifyVmStoppedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + StopTime int64 `protobuf:"varint,2,opt,name=stop_time,json=stopTime,proto3" json:"stop_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotifyVmStoppedRequest) Reset() { + *x = NotifyVmStoppedRequest{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotifyVmStoppedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyVmStoppedRequest) ProtoMessage() {} + +func (x *NotifyVmStoppedRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyVmStoppedRequest.ProtoReflect.Descriptor instead. +func (*NotifyVmStoppedRequest) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{7} +} + +func (x *NotifyVmStoppedRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *NotifyVmStoppedRequest) GetStopTime() int64 { + if x != nil { + return x.StopTime + } + return 0 +} + +type NotifyVmStoppedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotifyVmStoppedResponse) Reset() { + *x = NotifyVmStoppedResponse{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotifyVmStoppedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyVmStoppedResponse) ProtoMessage() {} + +func (x *NotifyVmStoppedResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyVmStoppedResponse.ProtoReflect.Descriptor instead. +func (*NotifyVmStoppedResponse) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{8} +} + +func (x *NotifyVmStoppedResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type NotifyPossibleGapRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + LastSent int64 `protobuf:"varint,2,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` + ResumeTime int64 `protobuf:"varint,3,opt,name=resume_time,json=resumeTime,proto3" json:"resume_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotifyPossibleGapRequest) Reset() { + *x = NotifyPossibleGapRequest{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotifyPossibleGapRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyPossibleGapRequest) ProtoMessage() {} + +func (x *NotifyPossibleGapRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyPossibleGapRequest.ProtoReflect.Descriptor instead. +func (*NotifyPossibleGapRequest) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{9} +} + +func (x *NotifyPossibleGapRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *NotifyPossibleGapRequest) GetLastSent() int64 { + if x != nil { + return x.LastSent + } + return 0 +} + +func (x *NotifyPossibleGapRequest) GetResumeTime() int64 { + if x != nil { + return x.ResumeTime + } + return 0 +} + +type NotifyPossibleGapResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotifyPossibleGapResponse) Reset() { + *x = NotifyPossibleGapResponse{} + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotifyPossibleGapResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyPossibleGapResponse) ProtoMessage() {} + +func (x *NotifyPossibleGapResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyPossibleGapResponse.ProtoReflect.Descriptor instead. +func (*NotifyPossibleGapResponse) Descriptor() ([]byte, []int) { + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP(), []int{10} +} + +func (x *NotifyPossibleGapResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +var File_deploy_billaged_proto_billing_v1_billing_proto protoreflect.FileDescriptor + +const file_deploy_billaged_proto_billing_v1_billing_proto_rawDesc = "" + + "\n" + + ".deploy/billaged/proto/billing/v1/billing.proto\x12\n" + + "billing.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x02\n" + + "\tVMMetrics\x128\n" + + "\ttimestamp\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12$\n" + + "\x0ecpu_time_nanos\x18\x02 \x01(\x03R\fcpuTimeNanos\x12,\n" + + "\x12memory_usage_bytes\x18\x03 \x01(\x03R\x10memoryUsageBytes\x12&\n" + + "\x0fdisk_read_bytes\x18\x04 \x01(\x03R\rdiskReadBytes\x12(\n" + + "\x10disk_write_bytes\x18\x05 \x01(\x03R\x0ediskWriteBytes\x12(\n" + + "\x10network_rx_bytes\x18\x06 \x01(\x03R\x0enetworkRxBytes\x12(\n" + + "\x10network_tx_bytes\x18\a \x01(\x03R\x0enetworkTxBytes\"\x80\x01\n" + + "\x17SendMetricsBatchRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x1f\n" + + "\vcustomer_id\x18\x02 \x01(\tR\n" + + "customerId\x12/\n" + + "\ametrics\x18\x03 \x03(\v2\x15.billing.v1.VMMetricsR\ametrics\"N\n" + + "\x18SendMetricsBatchResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"V\n" + + "\x14SendHeartbeatRequest\x12\x1f\n" + + "\vinstance_id\x18\x01 \x01(\tR\n" + + "instanceId\x12\x1d\n" + + "\n" + + "active_vms\x18\x02 \x03(\tR\tactiveVms\"1\n" + + "\x15SendHeartbeatResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"m\n" + + "\x16NotifyVmStartedRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x1f\n" + + "\vcustomer_id\x18\x02 \x01(\tR\n" + + "customerId\x12\x1d\n" + + "\n" + + "start_time\x18\x03 \x01(\x03R\tstartTime\"3\n" + + "\x17NotifyVmStartedResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"J\n" + + "\x16NotifyVmStoppedRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x1b\n" + + "\tstop_time\x18\x02 \x01(\x03R\bstopTime\"3\n" + + "\x17NotifyVmStoppedResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"m\n" + + "\x18NotifyPossibleGapRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x1b\n" + + "\tlast_sent\x18\x02 \x01(\x03R\blastSent\x12\x1f\n" + + "\vresume_time\x18\x03 \x01(\x03R\n" + + "resumeTime\"5\n" + + "\x19NotifyPossibleGapResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess2\xdf\x03\n" + + "\x0eBillingService\x12]\n" + + "\x10SendMetricsBatch\x12#.billing.v1.SendMetricsBatchRequest\x1a$.billing.v1.SendMetricsBatchResponse\x12T\n" + + "\rSendHeartbeat\x12 .billing.v1.SendHeartbeatRequest\x1a!.billing.v1.SendHeartbeatResponse\x12Z\n" + + "\x0fNotifyVmStarted\x12\".billing.v1.NotifyVmStartedRequest\x1a#.billing.v1.NotifyVmStartedResponse\x12Z\n" + + "\x0fNotifyVmStopped\x12\".billing.v1.NotifyVmStoppedRequest\x1a#.billing.v1.NotifyVmStoppedResponse\x12`\n" + + "\x11NotifyPossibleGap\x12$.billing.v1.NotifyPossibleGapRequest\x1a%.billing.v1.NotifyPossibleGapResponseBFZDgithub.com/unkeyed/unkey/go/deploy/billaged/gen/billing/v1;billingv1b\x06proto3" + +var ( + file_deploy_billaged_proto_billing_v1_billing_proto_rawDescOnce sync.Once + file_deploy_billaged_proto_billing_v1_billing_proto_rawDescData []byte +) + +func file_deploy_billaged_proto_billing_v1_billing_proto_rawDescGZIP() []byte { + file_deploy_billaged_proto_billing_v1_billing_proto_rawDescOnce.Do(func() { + file_deploy_billaged_proto_billing_v1_billing_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_deploy_billaged_proto_billing_v1_billing_proto_rawDesc), len(file_deploy_billaged_proto_billing_v1_billing_proto_rawDesc))) + }) + return file_deploy_billaged_proto_billing_v1_billing_proto_rawDescData +} + +var file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_deploy_billaged_proto_billing_v1_billing_proto_goTypes = []any{ + (*VMMetrics)(nil), // 0: billing.v1.VMMetrics + (*SendMetricsBatchRequest)(nil), // 1: billing.v1.SendMetricsBatchRequest + (*SendMetricsBatchResponse)(nil), // 2: billing.v1.SendMetricsBatchResponse + (*SendHeartbeatRequest)(nil), // 3: billing.v1.SendHeartbeatRequest + (*SendHeartbeatResponse)(nil), // 4: billing.v1.SendHeartbeatResponse + (*NotifyVmStartedRequest)(nil), // 5: billing.v1.NotifyVmStartedRequest + (*NotifyVmStartedResponse)(nil), // 6: billing.v1.NotifyVmStartedResponse + (*NotifyVmStoppedRequest)(nil), // 7: billing.v1.NotifyVmStoppedRequest + (*NotifyVmStoppedResponse)(nil), // 8: billing.v1.NotifyVmStoppedResponse + (*NotifyPossibleGapRequest)(nil), // 9: billing.v1.NotifyPossibleGapRequest + (*NotifyPossibleGapResponse)(nil), // 10: billing.v1.NotifyPossibleGapResponse + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp +} +var file_deploy_billaged_proto_billing_v1_billing_proto_depIdxs = []int32{ + 11, // 0: billing.v1.VMMetrics.timestamp:type_name -> google.protobuf.Timestamp + 0, // 1: billing.v1.SendMetricsBatchRequest.metrics:type_name -> billing.v1.VMMetrics + 1, // 2: billing.v1.BillingService.SendMetricsBatch:input_type -> billing.v1.SendMetricsBatchRequest + 3, // 3: billing.v1.BillingService.SendHeartbeat:input_type -> billing.v1.SendHeartbeatRequest + 5, // 4: billing.v1.BillingService.NotifyVmStarted:input_type -> billing.v1.NotifyVmStartedRequest + 7, // 5: billing.v1.BillingService.NotifyVmStopped:input_type -> billing.v1.NotifyVmStoppedRequest + 9, // 6: billing.v1.BillingService.NotifyPossibleGap:input_type -> billing.v1.NotifyPossibleGapRequest + 2, // 7: billing.v1.BillingService.SendMetricsBatch:output_type -> billing.v1.SendMetricsBatchResponse + 4, // 8: billing.v1.BillingService.SendHeartbeat:output_type -> billing.v1.SendHeartbeatResponse + 6, // 9: billing.v1.BillingService.NotifyVmStarted:output_type -> billing.v1.NotifyVmStartedResponse + 8, // 10: billing.v1.BillingService.NotifyVmStopped:output_type -> billing.v1.NotifyVmStoppedResponse + 10, // 11: billing.v1.BillingService.NotifyPossibleGap:output_type -> billing.v1.NotifyPossibleGapResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_deploy_billaged_proto_billing_v1_billing_proto_init() } +func file_deploy_billaged_proto_billing_v1_billing_proto_init() { + if File_deploy_billaged_proto_billing_v1_billing_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_deploy_billaged_proto_billing_v1_billing_proto_rawDesc), len(file_deploy_billaged_proto_billing_v1_billing_proto_rawDesc)), + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_deploy_billaged_proto_billing_v1_billing_proto_goTypes, + DependencyIndexes: file_deploy_billaged_proto_billing_v1_billing_proto_depIdxs, + MessageInfos: file_deploy_billaged_proto_billing_v1_billing_proto_msgTypes, + }.Build() + File_deploy_billaged_proto_billing_v1_billing_proto = out.File + file_deploy_billaged_proto_billing_v1_billing_proto_goTypes = nil + file_deploy_billaged_proto_billing_v1_billing_proto_depIdxs = nil +} diff --git a/go/gen/deploy/billaged/proto/billing/v1/billingv1connect/billing.connect.go b/go/gen/deploy/billaged/proto/billing/v1/billingv1connect/billing.connect.go new file mode 100644 index 0000000000..7c44ea0558 --- /dev/null +++ b/go/gen/deploy/billaged/proto/billing/v1/billingv1connect/billing.connect.go @@ -0,0 +1,233 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: deploy/billaged/proto/billing/v1/billing.proto + +package billingv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/unkeyed/unkey/go/deploy/billaged/gen/billing/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // BillingServiceName is the fully-qualified name of the BillingService service. + BillingServiceName = "billing.v1.BillingService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // BillingServiceSendMetricsBatchProcedure is the fully-qualified name of the BillingService's + // SendMetricsBatch RPC. + BillingServiceSendMetricsBatchProcedure = "/billing.v1.BillingService/SendMetricsBatch" + // BillingServiceSendHeartbeatProcedure is the fully-qualified name of the BillingService's + // SendHeartbeat RPC. + BillingServiceSendHeartbeatProcedure = "/billing.v1.BillingService/SendHeartbeat" + // BillingServiceNotifyVmStartedProcedure is the fully-qualified name of the BillingService's + // NotifyVmStarted RPC. + BillingServiceNotifyVmStartedProcedure = "/billing.v1.BillingService/NotifyVmStarted" + // BillingServiceNotifyVmStoppedProcedure is the fully-qualified name of the BillingService's + // NotifyVmStopped RPC. + BillingServiceNotifyVmStoppedProcedure = "/billing.v1.BillingService/NotifyVmStopped" + // BillingServiceNotifyPossibleGapProcedure is the fully-qualified name of the BillingService's + // NotifyPossibleGap RPC. + BillingServiceNotifyPossibleGapProcedure = "/billing.v1.BillingService/NotifyPossibleGap" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + billingServiceServiceDescriptor = v1.File_deploy_billaged_proto_billing_v1_billing_proto.Services().ByName("BillingService") + billingServiceSendMetricsBatchMethodDescriptor = billingServiceServiceDescriptor.Methods().ByName("SendMetricsBatch") + billingServiceSendHeartbeatMethodDescriptor = billingServiceServiceDescriptor.Methods().ByName("SendHeartbeat") + billingServiceNotifyVmStartedMethodDescriptor = billingServiceServiceDescriptor.Methods().ByName("NotifyVmStarted") + billingServiceNotifyVmStoppedMethodDescriptor = billingServiceServiceDescriptor.Methods().ByName("NotifyVmStopped") + billingServiceNotifyPossibleGapMethodDescriptor = billingServiceServiceDescriptor.Methods().ByName("NotifyPossibleGap") +) + +// BillingServiceClient is a client for the billing.v1.BillingService service. +type BillingServiceClient interface { + SendMetricsBatch(context.Context, *connect.Request[v1.SendMetricsBatchRequest]) (*connect.Response[v1.SendMetricsBatchResponse], error) + SendHeartbeat(context.Context, *connect.Request[v1.SendHeartbeatRequest]) (*connect.Response[v1.SendHeartbeatResponse], error) + NotifyVmStarted(context.Context, *connect.Request[v1.NotifyVmStartedRequest]) (*connect.Response[v1.NotifyVmStartedResponse], error) + NotifyVmStopped(context.Context, *connect.Request[v1.NotifyVmStoppedRequest]) (*connect.Response[v1.NotifyVmStoppedResponse], error) + NotifyPossibleGap(context.Context, *connect.Request[v1.NotifyPossibleGapRequest]) (*connect.Response[v1.NotifyPossibleGapResponse], error) +} + +// NewBillingServiceClient constructs a client for the billing.v1.BillingService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewBillingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) BillingServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &billingServiceClient{ + sendMetricsBatch: connect.NewClient[v1.SendMetricsBatchRequest, v1.SendMetricsBatchResponse]( + httpClient, + baseURL+BillingServiceSendMetricsBatchProcedure, + connect.WithSchema(billingServiceSendMetricsBatchMethodDescriptor), + connect.WithClientOptions(opts...), + ), + sendHeartbeat: connect.NewClient[v1.SendHeartbeatRequest, v1.SendHeartbeatResponse]( + httpClient, + baseURL+BillingServiceSendHeartbeatProcedure, + connect.WithSchema(billingServiceSendHeartbeatMethodDescriptor), + connect.WithClientOptions(opts...), + ), + notifyVmStarted: connect.NewClient[v1.NotifyVmStartedRequest, v1.NotifyVmStartedResponse]( + httpClient, + baseURL+BillingServiceNotifyVmStartedProcedure, + connect.WithSchema(billingServiceNotifyVmStartedMethodDescriptor), + connect.WithClientOptions(opts...), + ), + notifyVmStopped: connect.NewClient[v1.NotifyVmStoppedRequest, v1.NotifyVmStoppedResponse]( + httpClient, + baseURL+BillingServiceNotifyVmStoppedProcedure, + connect.WithSchema(billingServiceNotifyVmStoppedMethodDescriptor), + connect.WithClientOptions(opts...), + ), + notifyPossibleGap: connect.NewClient[v1.NotifyPossibleGapRequest, v1.NotifyPossibleGapResponse]( + httpClient, + baseURL+BillingServiceNotifyPossibleGapProcedure, + connect.WithSchema(billingServiceNotifyPossibleGapMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// billingServiceClient implements BillingServiceClient. +type billingServiceClient struct { + sendMetricsBatch *connect.Client[v1.SendMetricsBatchRequest, v1.SendMetricsBatchResponse] + sendHeartbeat *connect.Client[v1.SendHeartbeatRequest, v1.SendHeartbeatResponse] + notifyVmStarted *connect.Client[v1.NotifyVmStartedRequest, v1.NotifyVmStartedResponse] + notifyVmStopped *connect.Client[v1.NotifyVmStoppedRequest, v1.NotifyVmStoppedResponse] + notifyPossibleGap *connect.Client[v1.NotifyPossibleGapRequest, v1.NotifyPossibleGapResponse] +} + +// SendMetricsBatch calls billing.v1.BillingService.SendMetricsBatch. +func (c *billingServiceClient) SendMetricsBatch(ctx context.Context, req *connect.Request[v1.SendMetricsBatchRequest]) (*connect.Response[v1.SendMetricsBatchResponse], error) { + return c.sendMetricsBatch.CallUnary(ctx, req) +} + +// SendHeartbeat calls billing.v1.BillingService.SendHeartbeat. +func (c *billingServiceClient) SendHeartbeat(ctx context.Context, req *connect.Request[v1.SendHeartbeatRequest]) (*connect.Response[v1.SendHeartbeatResponse], error) { + return c.sendHeartbeat.CallUnary(ctx, req) +} + +// NotifyVmStarted calls billing.v1.BillingService.NotifyVmStarted. +func (c *billingServiceClient) NotifyVmStarted(ctx context.Context, req *connect.Request[v1.NotifyVmStartedRequest]) (*connect.Response[v1.NotifyVmStartedResponse], error) { + return c.notifyVmStarted.CallUnary(ctx, req) +} + +// NotifyVmStopped calls billing.v1.BillingService.NotifyVmStopped. +func (c *billingServiceClient) NotifyVmStopped(ctx context.Context, req *connect.Request[v1.NotifyVmStoppedRequest]) (*connect.Response[v1.NotifyVmStoppedResponse], error) { + return c.notifyVmStopped.CallUnary(ctx, req) +} + +// NotifyPossibleGap calls billing.v1.BillingService.NotifyPossibleGap. +func (c *billingServiceClient) NotifyPossibleGap(ctx context.Context, req *connect.Request[v1.NotifyPossibleGapRequest]) (*connect.Response[v1.NotifyPossibleGapResponse], error) { + return c.notifyPossibleGap.CallUnary(ctx, req) +} + +// BillingServiceHandler is an implementation of the billing.v1.BillingService service. +type BillingServiceHandler interface { + SendMetricsBatch(context.Context, *connect.Request[v1.SendMetricsBatchRequest]) (*connect.Response[v1.SendMetricsBatchResponse], error) + SendHeartbeat(context.Context, *connect.Request[v1.SendHeartbeatRequest]) (*connect.Response[v1.SendHeartbeatResponse], error) + NotifyVmStarted(context.Context, *connect.Request[v1.NotifyVmStartedRequest]) (*connect.Response[v1.NotifyVmStartedResponse], error) + NotifyVmStopped(context.Context, *connect.Request[v1.NotifyVmStoppedRequest]) (*connect.Response[v1.NotifyVmStoppedResponse], error) + NotifyPossibleGap(context.Context, *connect.Request[v1.NotifyPossibleGapRequest]) (*connect.Response[v1.NotifyPossibleGapResponse], error) +} + +// NewBillingServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewBillingServiceHandler(svc BillingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + billingServiceSendMetricsBatchHandler := connect.NewUnaryHandler( + BillingServiceSendMetricsBatchProcedure, + svc.SendMetricsBatch, + connect.WithSchema(billingServiceSendMetricsBatchMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + billingServiceSendHeartbeatHandler := connect.NewUnaryHandler( + BillingServiceSendHeartbeatProcedure, + svc.SendHeartbeat, + connect.WithSchema(billingServiceSendHeartbeatMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + billingServiceNotifyVmStartedHandler := connect.NewUnaryHandler( + BillingServiceNotifyVmStartedProcedure, + svc.NotifyVmStarted, + connect.WithSchema(billingServiceNotifyVmStartedMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + billingServiceNotifyVmStoppedHandler := connect.NewUnaryHandler( + BillingServiceNotifyVmStoppedProcedure, + svc.NotifyVmStopped, + connect.WithSchema(billingServiceNotifyVmStoppedMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + billingServiceNotifyPossibleGapHandler := connect.NewUnaryHandler( + BillingServiceNotifyPossibleGapProcedure, + svc.NotifyPossibleGap, + connect.WithSchema(billingServiceNotifyPossibleGapMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/billing.v1.BillingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case BillingServiceSendMetricsBatchProcedure: + billingServiceSendMetricsBatchHandler.ServeHTTP(w, r) + case BillingServiceSendHeartbeatProcedure: + billingServiceSendHeartbeatHandler.ServeHTTP(w, r) + case BillingServiceNotifyVmStartedProcedure: + billingServiceNotifyVmStartedHandler.ServeHTTP(w, r) + case BillingServiceNotifyVmStoppedProcedure: + billingServiceNotifyVmStoppedHandler.ServeHTTP(w, r) + case BillingServiceNotifyPossibleGapProcedure: + billingServiceNotifyPossibleGapHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedBillingServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedBillingServiceHandler struct{} + +func (UnimplementedBillingServiceHandler) SendMetricsBatch(context.Context, *connect.Request[v1.SendMetricsBatchRequest]) (*connect.Response[v1.SendMetricsBatchResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("billing.v1.BillingService.SendMetricsBatch is not implemented")) +} + +func (UnimplementedBillingServiceHandler) SendHeartbeat(context.Context, *connect.Request[v1.SendHeartbeatRequest]) (*connect.Response[v1.SendHeartbeatResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("billing.v1.BillingService.SendHeartbeat is not implemented")) +} + +func (UnimplementedBillingServiceHandler) NotifyVmStarted(context.Context, *connect.Request[v1.NotifyVmStartedRequest]) (*connect.Response[v1.NotifyVmStartedResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("billing.v1.BillingService.NotifyVmStarted is not implemented")) +} + +func (UnimplementedBillingServiceHandler) NotifyVmStopped(context.Context, *connect.Request[v1.NotifyVmStoppedRequest]) (*connect.Response[v1.NotifyVmStoppedResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("billing.v1.BillingService.NotifyVmStopped is not implemented")) +} + +func (UnimplementedBillingServiceHandler) NotifyPossibleGap(context.Context, *connect.Request[v1.NotifyPossibleGapRequest]) (*connect.Response[v1.NotifyPossibleGapResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("billing.v1.BillingService.NotifyPossibleGap is not implemented")) +} diff --git a/go/gen/deploy/builderd/proto/builder/v1/builder.pb.go b/go/gen/deploy/builderd/proto/builder/v1/builder.pb.go new file mode 100644 index 0000000000..5ae066dedc --- /dev/null +++ b/go/gen/deploy/builderd/proto/builder/v1/builder.pb.go @@ -0,0 +1,3829 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc (unknown) +// source: deploy/builderd/proto/builder/v1/builder.proto + +package builderv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Build job lifecycle states +type BuildState int32 + +const ( + BuildState_BUILD_STATE_UNSPECIFIED BuildState = 0 + BuildState_BUILD_STATE_PENDING BuildState = 1 // Job queued + BuildState_BUILD_STATE_PULLING BuildState = 2 // Pulling Docker image or source + BuildState_BUILD_STATE_EXTRACTING BuildState = 3 // Extracting/preparing source + BuildState_BUILD_STATE_BUILDING BuildState = 4 // Building rootfs + BuildState_BUILD_STATE_OPTIMIZING BuildState = 5 // Applying optimizations + BuildState_BUILD_STATE_COMPLETED BuildState = 6 // Build successful + BuildState_BUILD_STATE_FAILED BuildState = 7 // Build failed + BuildState_BUILD_STATE_CANCELLED BuildState = 8 // Build cancelled + BuildState_BUILD_STATE_CLEANING BuildState = 9 // Cleaning up resources +) + +// Enum value maps for BuildState. +var ( + BuildState_name = map[int32]string{ + 0: "BUILD_STATE_UNSPECIFIED", + 1: "BUILD_STATE_PENDING", + 2: "BUILD_STATE_PULLING", + 3: "BUILD_STATE_EXTRACTING", + 4: "BUILD_STATE_BUILDING", + 5: "BUILD_STATE_OPTIMIZING", + 6: "BUILD_STATE_COMPLETED", + 7: "BUILD_STATE_FAILED", + 8: "BUILD_STATE_CANCELLED", + 9: "BUILD_STATE_CLEANING", + } + BuildState_value = map[string]int32{ + "BUILD_STATE_UNSPECIFIED": 0, + "BUILD_STATE_PENDING": 1, + "BUILD_STATE_PULLING": 2, + "BUILD_STATE_EXTRACTING": 3, + "BUILD_STATE_BUILDING": 4, + "BUILD_STATE_OPTIMIZING": 5, + "BUILD_STATE_COMPLETED": 6, + "BUILD_STATE_FAILED": 7, + "BUILD_STATE_CANCELLED": 8, + "BUILD_STATE_CLEANING": 9, + } +) + +func (x BuildState) Enum() *BuildState { + p := new(BuildState) + *p = x + return p +} + +func (x BuildState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BuildState) Descriptor() protoreflect.EnumDescriptor { + return file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes[0].Descriptor() +} + +func (BuildState) Type() protoreflect.EnumType { + return &file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes[0] +} + +func (x BuildState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BuildState.Descriptor instead. +func (BuildState) EnumDescriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{0} +} + +// Tenant service tiers +type TenantTier int32 + +const ( + TenantTier_TENANT_TIER_UNSPECIFIED TenantTier = 0 + TenantTier_TENANT_TIER_FREE TenantTier = 1 // Limited resources + TenantTier_TENANT_TIER_PRO TenantTier = 2 // Standard resources + TenantTier_TENANT_TIER_ENTERPRISE TenantTier = 3 // Higher limits + isolation + TenantTier_TENANT_TIER_DEDICATED TenantTier = 4 // Dedicated infrastructure +) + +// Enum value maps for TenantTier. +var ( + TenantTier_name = map[int32]string{ + 0: "TENANT_TIER_UNSPECIFIED", + 1: "TENANT_TIER_FREE", + 2: "TENANT_TIER_PRO", + 3: "TENANT_TIER_ENTERPRISE", + 4: "TENANT_TIER_DEDICATED", + } + TenantTier_value = map[string]int32{ + "TENANT_TIER_UNSPECIFIED": 0, + "TENANT_TIER_FREE": 1, + "TENANT_TIER_PRO": 2, + "TENANT_TIER_ENTERPRISE": 3, + "TENANT_TIER_DEDICATED": 4, + } +) + +func (x TenantTier) Enum() *TenantTier { + p := new(TenantTier) + *p = x + return p +} + +func (x TenantTier) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TenantTier) Descriptor() protoreflect.EnumDescriptor { + return file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes[1].Descriptor() +} + +func (TenantTier) Type() protoreflect.EnumType { + return &file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes[1] +} + +func (x TenantTier) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TenantTier.Descriptor instead. +func (TenantTier) EnumDescriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{1} +} + +// Init process strategies for microVMs +type InitStrategy int32 + +const ( + InitStrategy_INIT_STRATEGY_UNSPECIFIED InitStrategy = 0 + InitStrategy_INIT_STRATEGY_TINI InitStrategy = 1 // Use tini as init (recommended) + InitStrategy_INIT_STRATEGY_DIRECT InitStrategy = 2 // Direct exec (risky) + InitStrategy_INIT_STRATEGY_CUSTOM InitStrategy = 3 // Custom init script +) + +// Enum value maps for InitStrategy. +var ( + InitStrategy_name = map[int32]string{ + 0: "INIT_STRATEGY_UNSPECIFIED", + 1: "INIT_STRATEGY_TINI", + 2: "INIT_STRATEGY_DIRECT", + 3: "INIT_STRATEGY_CUSTOM", + } + InitStrategy_value = map[string]int32{ + "INIT_STRATEGY_UNSPECIFIED": 0, + "INIT_STRATEGY_TINI": 1, + "INIT_STRATEGY_DIRECT": 2, + "INIT_STRATEGY_CUSTOM": 3, + } +) + +func (x InitStrategy) Enum() *InitStrategy { + p := new(InitStrategy) + *p = x + return p +} + +func (x InitStrategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InitStrategy) Descriptor() protoreflect.EnumDescriptor { + return file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes[2].Descriptor() +} + +func (InitStrategy) Type() protoreflect.EnumType { + return &file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes[2] +} + +func (x InitStrategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InitStrategy.Descriptor instead. +func (InitStrategy) EnumDescriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{2} +} + +// Multi-tenant context +type TenantContext struct { + state protoimpl.MessageState `protogen:"open.v1"` + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // Primary tenant identifier + CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` // Customer within tenant (for billing) + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` // Organization (for enterprise) + Tier TenantTier `protobuf:"varint,4,opt,name=tier,proto3,enum=builder.v1.TenantTier" json:"tier,omitempty"` // Service tier + Permissions []string `protobuf:"bytes,5,rep,name=permissions,proto3" json:"permissions,omitempty"` // Build permissions + Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Tenant metadata + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TenantContext) Reset() { + *x = TenantContext{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TenantContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantContext) ProtoMessage() {} + +func (x *TenantContext) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantContext.ProtoReflect.Descriptor instead. +func (*TenantContext) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{0} +} + +func (x *TenantContext) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *TenantContext) GetCustomerId() string { + if x != nil { + return x.CustomerId + } + return "" +} + +func (x *TenantContext) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *TenantContext) GetTier() TenantTier { + if x != nil { + return x.Tier + } + return TenantTier_TENANT_TIER_UNSPECIFIED +} + +func (x *TenantContext) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +func (x *TenantContext) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +// Build source types - extensible for future build types +type BuildSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to SourceType: + // + // *BuildSource_DockerImage + // *BuildSource_GitRepository + // *BuildSource_Archive + SourceType isBuildSource_SourceType `protobuf_oneof:"source_type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildSource) Reset() { + *x = BuildSource{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildSource) ProtoMessage() {} + +func (x *BuildSource) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildSource.ProtoReflect.Descriptor instead. +func (*BuildSource) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{1} +} + +func (x *BuildSource) GetSourceType() isBuildSource_SourceType { + if x != nil { + return x.SourceType + } + return nil +} + +func (x *BuildSource) GetDockerImage() *DockerImageSource { + if x != nil { + if x, ok := x.SourceType.(*BuildSource_DockerImage); ok { + return x.DockerImage + } + } + return nil +} + +func (x *BuildSource) GetGitRepository() *GitRepositorySource { + if x != nil { + if x, ok := x.SourceType.(*BuildSource_GitRepository); ok { + return x.GitRepository + } + } + return nil +} + +func (x *BuildSource) GetArchive() *ArchiveSource { + if x != nil { + if x, ok := x.SourceType.(*BuildSource_Archive); ok { + return x.Archive + } + } + return nil +} + +type isBuildSource_SourceType interface { + isBuildSource_SourceType() +} + +type BuildSource_DockerImage struct { + DockerImage *DockerImageSource `protobuf:"bytes,1,opt,name=docker_image,json=dockerImage,proto3,oneof"` +} + +type BuildSource_GitRepository struct { + GitRepository *GitRepositorySource `protobuf:"bytes,2,opt,name=git_repository,json=gitRepository,proto3,oneof"` +} + +type BuildSource_Archive struct { + Archive *ArchiveSource `protobuf:"bytes,3,opt,name=archive,proto3,oneof"` // Future: nix_flake = 4, buildpack = 5, etc. +} + +func (*BuildSource_DockerImage) isBuildSource_SourceType() {} + +func (*BuildSource_GitRepository) isBuildSource_SourceType() {} + +func (*BuildSource_Archive) isBuildSource_SourceType() {} + +// Docker image extraction (first implementation) +type DockerImageSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + ImageUri string `protobuf:"bytes,1,opt,name=image_uri,json=imageUri,proto3" json:"image_uri,omitempty"` // "ghcr.io/unkeyed/unkey:f4cfee5" + Auth *DockerAuth `protobuf:"bytes,2,opt,name=auth,proto3" json:"auth,omitempty"` // Registry authentication + PullTags []string `protobuf:"bytes,3,rep,name=pull_tags,json=pullTags,proto3" json:"pull_tags,omitempty"` // Additional tags to consider + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DockerImageSource) Reset() { + *x = DockerImageSource{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DockerImageSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DockerImageSource) ProtoMessage() {} + +func (x *DockerImageSource) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DockerImageSource.ProtoReflect.Descriptor instead. +func (*DockerImageSource) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{2} +} + +func (x *DockerImageSource) GetImageUri() string { + if x != nil { + return x.ImageUri + } + return "" +} + +func (x *DockerImageSource) GetAuth() *DockerAuth { + if x != nil { + return x.Auth + } + return nil +} + +func (x *DockerImageSource) GetPullTags() []string { + if x != nil { + return x.PullTags + } + return nil +} + +type DockerAuth struct { + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + Registry string `protobuf:"bytes,4,opt,name=registry,proto3" json:"registry,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DockerAuth) Reset() { + *x = DockerAuth{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DockerAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DockerAuth) ProtoMessage() {} + +func (x *DockerAuth) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DockerAuth.ProtoReflect.Descriptor instead. +func (*DockerAuth) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{3} +} + +func (x *DockerAuth) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *DockerAuth) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *DockerAuth) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *DockerAuth) GetRegistry() string { + if x != nil { + return x.Registry + } + return "" +} + +// Git repository builds (future) +type GitRepositorySource struct { + state protoimpl.MessageState `protogen:"open.v1"` + RepositoryUrl string `protobuf:"bytes,1,opt,name=repository_url,json=repositoryUrl,proto3" json:"repository_url,omitempty"` // "https://github.com/unkeyed/unkey" + Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` // branch/tag/commit + BuildContext string `protobuf:"bytes,3,opt,name=build_context,json=buildContext,proto3" json:"build_context,omitempty"` // subdirectory if needed + Auth *GitAuth `protobuf:"bytes,4,opt,name=auth,proto3" json:"auth,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GitRepositorySource) Reset() { + *x = GitRepositorySource{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GitRepositorySource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitRepositorySource) ProtoMessage() {} + +func (x *GitRepositorySource) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitRepositorySource.ProtoReflect.Descriptor instead. +func (*GitRepositorySource) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{4} +} + +func (x *GitRepositorySource) GetRepositoryUrl() string { + if x != nil { + return x.RepositoryUrl + } + return "" +} + +func (x *GitRepositorySource) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *GitRepositorySource) GetBuildContext() string { + if x != nil { + return x.BuildContext + } + return "" +} + +func (x *GitRepositorySource) GetAuth() *GitAuth { + if x != nil { + return x.Auth + } + return nil +} + +type GitAuth struct { + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + SshKey string `protobuf:"bytes,3,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` + Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GitAuth) Reset() { + *x = GitAuth{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GitAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitAuth) ProtoMessage() {} + +func (x *GitAuth) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitAuth.ProtoReflect.Descriptor instead. +func (*GitAuth) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{5} +} + +func (x *GitAuth) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *GitAuth) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *GitAuth) GetSshKey() string { + if x != nil { + return x.SshKey + } + return "" +} + +func (x *GitAuth) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +// Archive builds (future) +type ArchiveSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + ArchiveUrl string `protobuf:"bytes,1,opt,name=archive_url,json=archiveUrl,proto3" json:"archive_url,omitempty"` // URL to tar.gz, zip, etc. + ArchiveType string `protobuf:"bytes,2,opt,name=archive_type,json=archiveType,proto3" json:"archive_type,omitempty"` // "tar.gz", "zip" + BuildContext string `protobuf:"bytes,3,opt,name=build_context,json=buildContext,proto3" json:"build_context,omitempty"` // subdirectory in archive + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchiveSource) Reset() { + *x = ArchiveSource{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchiveSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveSource) ProtoMessage() {} + +func (x *ArchiveSource) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveSource.ProtoReflect.Descriptor instead. +func (*ArchiveSource) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{6} +} + +func (x *ArchiveSource) GetArchiveUrl() string { + if x != nil { + return x.ArchiveUrl + } + return "" +} + +func (x *ArchiveSource) GetArchiveType() string { + if x != nil { + return x.ArchiveType + } + return "" +} + +func (x *ArchiveSource) GetBuildContext() string { + if x != nil { + return x.BuildContext + } + return "" +} + +// Build target types - extensible +type BuildTarget struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to TargetType: + // + // *BuildTarget_MicrovmRootfs + // *BuildTarget_ContainerImage + TargetType isBuildTarget_TargetType `protobuf_oneof:"target_type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildTarget) Reset() { + *x = BuildTarget{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildTarget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildTarget) ProtoMessage() {} + +func (x *BuildTarget) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildTarget.ProtoReflect.Descriptor instead. +func (*BuildTarget) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{7} +} + +func (x *BuildTarget) GetTargetType() isBuildTarget_TargetType { + if x != nil { + return x.TargetType + } + return nil +} + +func (x *BuildTarget) GetMicrovmRootfs() *MicroVMRootfs { + if x != nil { + if x, ok := x.TargetType.(*BuildTarget_MicrovmRootfs); ok { + return x.MicrovmRootfs + } + } + return nil +} + +func (x *BuildTarget) GetContainerImage() *ContainerImage { + if x != nil { + if x, ok := x.TargetType.(*BuildTarget_ContainerImage); ok { + return x.ContainerImage + } + } + return nil +} + +type isBuildTarget_TargetType interface { + isBuildTarget_TargetType() +} + +type BuildTarget_MicrovmRootfs struct { + MicrovmRootfs *MicroVMRootfs `protobuf:"bytes,1,opt,name=microvm_rootfs,json=microvmRootfs,proto3,oneof"` +} + +type BuildTarget_ContainerImage struct { + ContainerImage *ContainerImage `protobuf:"bytes,2,opt,name=container_image,json=containerImage,proto3,oneof"` // Future: wasm_module = 3, lambda_layer = 4, etc. +} + +func (*BuildTarget_MicrovmRootfs) isBuildTarget_TargetType() {} + +func (*BuildTarget_ContainerImage) isBuildTarget_TargetType() {} + +// MicroVM rootfs (our focus) +type MicroVMRootfs struct { + state protoimpl.MessageState `protogen:"open.v1"` + InitStrategy InitStrategy `protobuf:"varint,1,opt,name=init_strategy,json=initStrategy,proto3,enum=builder.v1.InitStrategy" json:"init_strategy,omitempty"` + RuntimeConfig *RuntimeConfig `protobuf:"bytes,2,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` + Optimization *OptimizationSettings `protobuf:"bytes,3,opt,name=optimization,proto3" json:"optimization,omitempty"` + PreservePaths []string `protobuf:"bytes,4,rep,name=preserve_paths,json=preservePaths,proto3" json:"preserve_paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MicroVMRootfs) Reset() { + *x = MicroVMRootfs{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MicroVMRootfs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MicroVMRootfs) ProtoMessage() {} + +func (x *MicroVMRootfs) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MicroVMRootfs.ProtoReflect.Descriptor instead. +func (*MicroVMRootfs) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{8} +} + +func (x *MicroVMRootfs) GetInitStrategy() InitStrategy { + if x != nil { + return x.InitStrategy + } + return InitStrategy_INIT_STRATEGY_UNSPECIFIED +} + +func (x *MicroVMRootfs) GetRuntimeConfig() *RuntimeConfig { + if x != nil { + return x.RuntimeConfig + } + return nil +} + +func (x *MicroVMRootfs) GetOptimization() *OptimizationSettings { + if x != nil { + return x.Optimization + } + return nil +} + +func (x *MicroVMRootfs) GetPreservePaths() []string { + if x != nil { + return x.PreservePaths + } + return nil +} + +// Container image (future) +type ContainerImage struct { + state protoimpl.MessageState `protogen:"open.v1"` + BaseImage string `protobuf:"bytes,1,opt,name=base_image,json=baseImage,proto3" json:"base_image,omitempty"` + Layers []string `protobuf:"bytes,2,rep,name=layers,proto3" json:"layers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContainerImage) Reset() { + *x = ContainerImage{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContainerImage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerImage) ProtoMessage() {} + +func (x *ContainerImage) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerImage.ProtoReflect.Descriptor instead. +func (*ContainerImage) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{9} +} + +func (x *ContainerImage) GetBaseImage() string { + if x != nil { + return x.BaseImage + } + return "" +} + +func (x *ContainerImage) GetLayers() []string { + if x != nil { + return x.Layers + } + return nil +} + +type RuntimeConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Command []string `protobuf:"bytes,1,rep,name=command,proto3" json:"command,omitempty"` // Override CMD + Entrypoint []string `protobuf:"bytes,2,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` // Override ENTRYPOINT + WorkingDir string `protobuf:"bytes,3,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"` // Override WORKDIR + Environment map[string]string `protobuf:"bytes,4,rep,name=environment,proto3" json:"environment,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Environment variables + ExposedPorts []string `protobuf:"bytes,5,rep,name=exposed_ports,json=exposedPorts,proto3" json:"exposed_ports,omitempty"` // Ports to expose + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RuntimeConfig) Reset() { + *x = RuntimeConfig{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RuntimeConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuntimeConfig) ProtoMessage() {} + +func (x *RuntimeConfig) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuntimeConfig.ProtoReflect.Descriptor instead. +func (*RuntimeConfig) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{10} +} + +func (x *RuntimeConfig) GetCommand() []string { + if x != nil { + return x.Command + } + return nil +} + +func (x *RuntimeConfig) GetEntrypoint() []string { + if x != nil { + return x.Entrypoint + } + return nil +} + +func (x *RuntimeConfig) GetWorkingDir() string { + if x != nil { + return x.WorkingDir + } + return "" +} + +func (x *RuntimeConfig) GetEnvironment() map[string]string { + if x != nil { + return x.Environment + } + return nil +} + +func (x *RuntimeConfig) GetExposedPorts() []string { + if x != nil { + return x.ExposedPorts + } + return nil +} + +type OptimizationSettings struct { + state protoimpl.MessageState `protogen:"open.v1"` + StripDebugSymbols bool `protobuf:"varint,1,opt,name=strip_debug_symbols,json=stripDebugSymbols,proto3" json:"strip_debug_symbols,omitempty"` // Strip debug info + CompressBinaries bool `protobuf:"varint,2,opt,name=compress_binaries,json=compressBinaries,proto3" json:"compress_binaries,omitempty"` // Compress with UPX + RemoveDocs bool `protobuf:"varint,3,opt,name=remove_docs,json=removeDocs,proto3" json:"remove_docs,omitempty"` // Remove documentation + RemoveCache bool `protobuf:"varint,4,opt,name=remove_cache,json=removeCache,proto3" json:"remove_cache,omitempty"` // Remove package caches + PreservePaths []string `protobuf:"bytes,5,rep,name=preserve_paths,json=preservePaths,proto3" json:"preserve_paths,omitempty"` // Paths to always keep + ExcludePatterns []string `protobuf:"bytes,6,rep,name=exclude_patterns,json=excludePatterns,proto3" json:"exclude_patterns,omitempty"` // Files to exclude + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OptimizationSettings) Reset() { + *x = OptimizationSettings{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OptimizationSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OptimizationSettings) ProtoMessage() {} + +func (x *OptimizationSettings) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OptimizationSettings.ProtoReflect.Descriptor instead. +func (*OptimizationSettings) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{11} +} + +func (x *OptimizationSettings) GetStripDebugSymbols() bool { + if x != nil { + return x.StripDebugSymbols + } + return false +} + +func (x *OptimizationSettings) GetCompressBinaries() bool { + if x != nil { + return x.CompressBinaries + } + return false +} + +func (x *OptimizationSettings) GetRemoveDocs() bool { + if x != nil { + return x.RemoveDocs + } + return false +} + +func (x *OptimizationSettings) GetRemoveCache() bool { + if x != nil { + return x.RemoveCache + } + return false +} + +func (x *OptimizationSettings) GetPreservePaths() []string { + if x != nil { + return x.PreservePaths + } + return nil +} + +func (x *OptimizationSettings) GetExcludePatterns() []string { + if x != nil { + return x.ExcludePatterns + } + return nil +} + +// Build strategies - how to build from source to target +type BuildStrategy struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to StrategyType: + // + // *BuildStrategy_DockerExtract + // *BuildStrategy_GoApi + // *BuildStrategy_Sinatra + // *BuildStrategy_Nodejs + StrategyType isBuildStrategy_StrategyType `protobuf_oneof:"strategy_type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildStrategy) Reset() { + *x = BuildStrategy{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildStrategy) ProtoMessage() {} + +func (x *BuildStrategy) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildStrategy.ProtoReflect.Descriptor instead. +func (*BuildStrategy) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{12} +} + +func (x *BuildStrategy) GetStrategyType() isBuildStrategy_StrategyType { + if x != nil { + return x.StrategyType + } + return nil +} + +func (x *BuildStrategy) GetDockerExtract() *DockerExtractStrategy { + if x != nil { + if x, ok := x.StrategyType.(*BuildStrategy_DockerExtract); ok { + return x.DockerExtract + } + } + return nil +} + +func (x *BuildStrategy) GetGoApi() *GoApiStrategy { + if x != nil { + if x, ok := x.StrategyType.(*BuildStrategy_GoApi); ok { + return x.GoApi + } + } + return nil +} + +func (x *BuildStrategy) GetSinatra() *SinatraStrategy { + if x != nil { + if x, ok := x.StrategyType.(*BuildStrategy_Sinatra); ok { + return x.Sinatra + } + } + return nil +} + +func (x *BuildStrategy) GetNodejs() *NodejsStrategy { + if x != nil { + if x, ok := x.StrategyType.(*BuildStrategy_Nodejs); ok { + return x.Nodejs + } + } + return nil +} + +type isBuildStrategy_StrategyType interface { + isBuildStrategy_StrategyType() +} + +type BuildStrategy_DockerExtract struct { + DockerExtract *DockerExtractStrategy `protobuf:"bytes,1,opt,name=docker_extract,json=dockerExtract,proto3,oneof"` +} + +type BuildStrategy_GoApi struct { + GoApi *GoApiStrategy `protobuf:"bytes,2,opt,name=go_api,json=goApi,proto3,oneof"` +} + +type BuildStrategy_Sinatra struct { + Sinatra *SinatraStrategy `protobuf:"bytes,3,opt,name=sinatra,proto3,oneof"` +} + +type BuildStrategy_Nodejs struct { + Nodejs *NodejsStrategy `protobuf:"bytes,4,opt,name=nodejs,proto3,oneof"` // Future: python_wsgi = 5, rust_binary = 6, etc. +} + +func (*BuildStrategy_DockerExtract) isBuildStrategy_StrategyType() {} + +func (*BuildStrategy_GoApi) isBuildStrategy_StrategyType() {} + +func (*BuildStrategy_Sinatra) isBuildStrategy_StrategyType() {} + +func (*BuildStrategy_Nodejs) isBuildStrategy_StrategyType() {} + +// Docker extraction strategy (first implementation) +type DockerExtractStrategy struct { + state protoimpl.MessageState `protogen:"open.v1"` + PreserveLayers bool `protobuf:"varint,1,opt,name=preserve_layers,json=preserveLayers,proto3" json:"preserve_layers,omitempty"` // Keep layer structure + FlattenFilesystem bool `protobuf:"varint,2,opt,name=flatten_filesystem,json=flattenFilesystem,proto3" json:"flatten_filesystem,omitempty"` // Merge all layers + ExcludePatterns []string `protobuf:"bytes,3,rep,name=exclude_patterns,json=excludePatterns,proto3" json:"exclude_patterns,omitempty"` // Files to exclude + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DockerExtractStrategy) Reset() { + *x = DockerExtractStrategy{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DockerExtractStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DockerExtractStrategy) ProtoMessage() {} + +func (x *DockerExtractStrategy) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DockerExtractStrategy.ProtoReflect.Descriptor instead. +func (*DockerExtractStrategy) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{13} +} + +func (x *DockerExtractStrategy) GetPreserveLayers() bool { + if x != nil { + return x.PreserveLayers + } + return false +} + +func (x *DockerExtractStrategy) GetFlattenFilesystem() bool { + if x != nil { + return x.FlattenFilesystem + } + return false +} + +func (x *DockerExtractStrategy) GetExcludePatterns() []string { + if x != nil { + return x.ExcludePatterns + } + return nil +} + +// Go API strategy (future) +type GoApiStrategy struct { + state protoimpl.MessageState `protogen:"open.v1"` + GoVersion string `protobuf:"bytes,1,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` // "1.21", "latest" + BuildFlags []string `protobuf:"bytes,2,rep,name=build_flags,json=buildFlags,proto3" json:"build_flags,omitempty"` // "-ldflags", "-tags" + MainPackage string `protobuf:"bytes,3,opt,name=main_package,json=mainPackage,proto3" json:"main_package,omitempty"` // "./cmd/api" + EnableCgo bool `protobuf:"varint,4,opt,name=enable_cgo,json=enableCgo,proto3" json:"enable_cgo,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GoApiStrategy) Reset() { + *x = GoApiStrategy{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GoApiStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoApiStrategy) ProtoMessage() {} + +func (x *GoApiStrategy) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoApiStrategy.ProtoReflect.Descriptor instead. +func (*GoApiStrategy) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{14} +} + +func (x *GoApiStrategy) GetGoVersion() string { + if x != nil { + return x.GoVersion + } + return "" +} + +func (x *GoApiStrategy) GetBuildFlags() []string { + if x != nil { + return x.BuildFlags + } + return nil +} + +func (x *GoApiStrategy) GetMainPackage() string { + if x != nil { + return x.MainPackage + } + return "" +} + +func (x *GoApiStrategy) GetEnableCgo() bool { + if x != nil { + return x.EnableCgo + } + return false +} + +// Sinatra strategy (future) +type SinatraStrategy struct { + state protoimpl.MessageState `protogen:"open.v1"` + RubyVersion string `protobuf:"bytes,1,opt,name=ruby_version,json=rubyVersion,proto3" json:"ruby_version,omitempty"` // "3.2", "latest" + GemfilePath string `protobuf:"bytes,2,opt,name=gemfile_path,json=gemfilePath,proto3" json:"gemfile_path,omitempty"` // "Gemfile" + RackServer string `protobuf:"bytes,3,opt,name=rack_server,json=rackServer,proto3" json:"rack_server,omitempty"` // "puma", "unicorn" + RackConfig map[string]string `protobuf:"bytes,4,rep,name=rack_config,json=rackConfig,proto3" json:"rack_config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Server-specific config + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SinatraStrategy) Reset() { + *x = SinatraStrategy{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SinatraStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SinatraStrategy) ProtoMessage() {} + +func (x *SinatraStrategy) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SinatraStrategy.ProtoReflect.Descriptor instead. +func (*SinatraStrategy) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{15} +} + +func (x *SinatraStrategy) GetRubyVersion() string { + if x != nil { + return x.RubyVersion + } + return "" +} + +func (x *SinatraStrategy) GetGemfilePath() string { + if x != nil { + return x.GemfilePath + } + return "" +} + +func (x *SinatraStrategy) GetRackServer() string { + if x != nil { + return x.RackServer + } + return "" +} + +func (x *SinatraStrategy) GetRackConfig() map[string]string { + if x != nil { + return x.RackConfig + } + return nil +} + +// Node.js strategy (future) +type NodejsStrategy struct { + state protoimpl.MessageState `protogen:"open.v1"` + NodeVersion string `protobuf:"bytes,1,opt,name=node_version,json=nodeVersion,proto3" json:"node_version,omitempty"` // "18", "20", "latest" + PackageManager string `protobuf:"bytes,2,opt,name=package_manager,json=packageManager,proto3" json:"package_manager,omitempty"` // "npm", "yarn", "pnpm" + StartScript string `protobuf:"bytes,3,opt,name=start_script,json=startScript,proto3" json:"start_script,omitempty"` // "start", "server" + EnableProduction bool `protobuf:"varint,4,opt,name=enable_production,json=enableProduction,proto3" json:"enable_production,omitempty"` // NODE_ENV=production + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NodejsStrategy) Reset() { + *x = NodejsStrategy{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NodejsStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodejsStrategy) ProtoMessage() {} + +func (x *NodejsStrategy) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodejsStrategy.ProtoReflect.Descriptor instead. +func (*NodejsStrategy) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{16} +} + +func (x *NodejsStrategy) GetNodeVersion() string { + if x != nil { + return x.NodeVersion + } + return "" +} + +func (x *NodejsStrategy) GetPackageManager() string { + if x != nil { + return x.PackageManager + } + return "" +} + +func (x *NodejsStrategy) GetStartScript() string { + if x != nil { + return x.StartScript + } + return "" +} + +func (x *NodejsStrategy) GetEnableProduction() bool { + if x != nil { + return x.EnableProduction + } + return false +} + +// Tenant-aware resource limits +type TenantResourceLimits struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Per-build limits + MaxMemoryBytes int64 `protobuf:"varint,1,opt,name=max_memory_bytes,json=maxMemoryBytes,proto3" json:"max_memory_bytes,omitempty"` + MaxCpuCores int32 `protobuf:"varint,2,opt,name=max_cpu_cores,json=maxCpuCores,proto3" json:"max_cpu_cores,omitempty"` + MaxDiskBytes int64 `protobuf:"varint,3,opt,name=max_disk_bytes,json=maxDiskBytes,proto3" json:"max_disk_bytes,omitempty"` + TimeoutSeconds int32 `protobuf:"varint,4,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + // Tenant-wide quotas + MaxConcurrentBuilds int32 `protobuf:"varint,5,opt,name=max_concurrent_builds,json=maxConcurrentBuilds,proto3" json:"max_concurrent_builds,omitempty"` // Concurrent builds per tenant + MaxDailyBuilds int32 `protobuf:"varint,6,opt,name=max_daily_builds,json=maxDailyBuilds,proto3" json:"max_daily_builds,omitempty"` // Daily build quota + MaxStorageBytes int64 `protobuf:"varint,7,opt,name=max_storage_bytes,json=maxStorageBytes,proto3" json:"max_storage_bytes,omitempty"` // Total storage quota + MaxBuildTimeMinutes int32 `protobuf:"varint,8,opt,name=max_build_time_minutes,json=maxBuildTimeMinutes,proto3" json:"max_build_time_minutes,omitempty"` // Max time per build + // Network restrictions + AllowedRegistries []string `protobuf:"bytes,9,rep,name=allowed_registries,json=allowedRegistries,proto3" json:"allowed_registries,omitempty"` // Docker registries + AllowedGitHosts []string `protobuf:"bytes,10,rep,name=allowed_git_hosts,json=allowedGitHosts,proto3" json:"allowed_git_hosts,omitempty"` // Git hosts + AllowExternalNetwork bool `protobuf:"varint,11,opt,name=allow_external_network,json=allowExternalNetwork,proto3" json:"allow_external_network,omitempty"` // External network access + // Security restrictions + AllowPrivilegedBuilds bool `protobuf:"varint,12,opt,name=allow_privileged_builds,json=allowPrivilegedBuilds,proto3" json:"allow_privileged_builds,omitempty"` // Privileged containers + BlockedCommands []string `protobuf:"bytes,13,rep,name=blocked_commands,json=blockedCommands,proto3" json:"blocked_commands,omitempty"` // Forbidden commands + SandboxLevel int32 `protobuf:"varint,14,opt,name=sandbox_level,json=sandboxLevel,proto3" json:"sandbox_level,omitempty"` // Isolation level (0-3) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TenantResourceLimits) Reset() { + *x = TenantResourceLimits{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TenantResourceLimits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantResourceLimits) ProtoMessage() {} + +func (x *TenantResourceLimits) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantResourceLimits.ProtoReflect.Descriptor instead. +func (*TenantResourceLimits) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{17} +} + +func (x *TenantResourceLimits) GetMaxMemoryBytes() int64 { + if x != nil { + return x.MaxMemoryBytes + } + return 0 +} + +func (x *TenantResourceLimits) GetMaxCpuCores() int32 { + if x != nil { + return x.MaxCpuCores + } + return 0 +} + +func (x *TenantResourceLimits) GetMaxDiskBytes() int64 { + if x != nil { + return x.MaxDiskBytes + } + return 0 +} + +func (x *TenantResourceLimits) GetTimeoutSeconds() int32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +func (x *TenantResourceLimits) GetMaxConcurrentBuilds() int32 { + if x != nil { + return x.MaxConcurrentBuilds + } + return 0 +} + +func (x *TenantResourceLimits) GetMaxDailyBuilds() int32 { + if x != nil { + return x.MaxDailyBuilds + } + return 0 +} + +func (x *TenantResourceLimits) GetMaxStorageBytes() int64 { + if x != nil { + return x.MaxStorageBytes + } + return 0 +} + +func (x *TenantResourceLimits) GetMaxBuildTimeMinutes() int32 { + if x != nil { + return x.MaxBuildTimeMinutes + } + return 0 +} + +func (x *TenantResourceLimits) GetAllowedRegistries() []string { + if x != nil { + return x.AllowedRegistries + } + return nil +} + +func (x *TenantResourceLimits) GetAllowedGitHosts() []string { + if x != nil { + return x.AllowedGitHosts + } + return nil +} + +func (x *TenantResourceLimits) GetAllowExternalNetwork() bool { + if x != nil { + return x.AllowExternalNetwork + } + return false +} + +func (x *TenantResourceLimits) GetAllowPrivilegedBuilds() bool { + if x != nil { + return x.AllowPrivilegedBuilds + } + return false +} + +func (x *TenantResourceLimits) GetBlockedCommands() []string { + if x != nil { + return x.BlockedCommands + } + return nil +} + +func (x *TenantResourceLimits) GetSandboxLevel() int32 { + if x != nil { + return x.SandboxLevel + } + return 0 +} + +// Main build configuration +type BuildConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Tenant identification + Tenant *TenantContext `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"` + // What we're building from + Source *BuildSource `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + // What we're building to + Target *BuildTarget `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // How to build it + Strategy *BuildStrategy `protobuf:"bytes,4,opt,name=strategy,proto3" json:"strategy,omitempty"` + // Build constraints (tenant-aware) + Limits *TenantResourceLimits `protobuf:"bytes,5,opt,name=limits,proto3" json:"limits,omitempty"` + // Build metadata + BuildName string `protobuf:"bytes,6,opt,name=build_name,json=buildName,proto3" json:"build_name,omitempty"` // Human-readable name + Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Custom labels + // Suggested asset ID to use when registering the built artifact + // This allows the caller to pre-generate the asset ID + SuggestedAssetId string `protobuf:"bytes,8,opt,name=suggested_asset_id,json=suggestedAssetId,proto3" json:"suggested_asset_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildConfig) Reset() { + *x = BuildConfig{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildConfig) ProtoMessage() {} + +func (x *BuildConfig) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildConfig.ProtoReflect.Descriptor instead. +func (*BuildConfig) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{18} +} + +func (x *BuildConfig) GetTenant() *TenantContext { + if x != nil { + return x.Tenant + } + return nil +} + +func (x *BuildConfig) GetSource() *BuildSource { + if x != nil { + return x.Source + } + return nil +} + +func (x *BuildConfig) GetTarget() *BuildTarget { + if x != nil { + return x.Target + } + return nil +} + +func (x *BuildConfig) GetStrategy() *BuildStrategy { + if x != nil { + return x.Strategy + } + return nil +} + +func (x *BuildConfig) GetLimits() *TenantResourceLimits { + if x != nil { + return x.Limits + } + return nil +} + +func (x *BuildConfig) GetBuildName() string { + if x != nil { + return x.BuildName + } + return "" +} + +func (x *BuildConfig) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *BuildConfig) GetSuggestedAssetId() string { + if x != nil { + return x.SuggestedAssetId + } + return "" +} + +// Build isolation metadata +type BuildIsolation struct { + state protoimpl.MessageState `protogen:"open.v1"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` // Unique sandbox identifier + NetworkNamespace string `protobuf:"bytes,2,opt,name=network_namespace,json=networkNamespace,proto3" json:"network_namespace,omitempty"` // Network isolation + FilesystemNamespace string `protobuf:"bytes,3,opt,name=filesystem_namespace,json=filesystemNamespace,proto3" json:"filesystem_namespace,omitempty"` // Filesystem isolation + SecurityContexts []string `protobuf:"bytes,4,rep,name=security_contexts,json=securityContexts,proto3" json:"security_contexts,omitempty"` // SELinux/AppArmor contexts + CgroupPath string `protobuf:"bytes,5,opt,name=cgroup_path,json=cgroupPath,proto3" json:"cgroup_path,omitempty"` // Resource cgroup + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildIsolation) Reset() { + *x = BuildIsolation{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildIsolation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildIsolation) ProtoMessage() {} + +func (x *BuildIsolation) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildIsolation.ProtoReflect.Descriptor instead. +func (*BuildIsolation) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{19} +} + +func (x *BuildIsolation) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +func (x *BuildIsolation) GetNetworkNamespace() string { + if x != nil { + return x.NetworkNamespace + } + return "" +} + +func (x *BuildIsolation) GetFilesystemNamespace() string { + if x != nil { + return x.FilesystemNamespace + } + return "" +} + +func (x *BuildIsolation) GetSecurityContexts() []string { + if x != nil { + return x.SecurityContexts + } + return nil +} + +func (x *BuildIsolation) GetCgroupPath() string { + if x != nil { + return x.CgroupPath + } + return "" +} + +// Image metadata extracted from Docker images +type ImageMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + OriginalImage string `protobuf:"bytes,1,opt,name=original_image,json=originalImage,proto3" json:"original_image,omitempty"` // Original Docker image + ImageDigest string `protobuf:"bytes,2,opt,name=image_digest,json=imageDigest,proto3" json:"image_digest,omitempty"` // Docker image SHA256 + Layers []string `protobuf:"bytes,3,rep,name=layers,proto3" json:"layers,omitempty"` // Layer digests + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Docker labels + Command []string `protobuf:"bytes,5,rep,name=command,proto3" json:"command,omitempty"` // Original CMD + Entrypoint []string `protobuf:"bytes,6,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` // Original ENTRYPOINT + WorkingDir string `protobuf:"bytes,7,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"` // WORKDIR + Env map[string]string `protobuf:"bytes,8,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Environment variables + ExposedPorts []string `protobuf:"bytes,9,rep,name=exposed_ports,json=exposedPorts,proto3" json:"exposed_ports,omitempty"` // EXPOSE ports + User string `protobuf:"bytes,10,opt,name=user,proto3" json:"user,omitempty"` // USER directive + Volumes []string `protobuf:"bytes,11,rep,name=volumes,proto3" json:"volumes,omitempty"` // VOLUME directives + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ImageMetadata) Reset() { + *x = ImageMetadata{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ImageMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageMetadata) ProtoMessage() {} + +func (x *ImageMetadata) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageMetadata.ProtoReflect.Descriptor instead. +func (*ImageMetadata) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{20} +} + +func (x *ImageMetadata) GetOriginalImage() string { + if x != nil { + return x.OriginalImage + } + return "" +} + +func (x *ImageMetadata) GetImageDigest() string { + if x != nil { + return x.ImageDigest + } + return "" +} + +func (x *ImageMetadata) GetLayers() []string { + if x != nil { + return x.Layers + } + return nil +} + +func (x *ImageMetadata) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *ImageMetadata) GetCommand() []string { + if x != nil { + return x.Command + } + return nil +} + +func (x *ImageMetadata) GetEntrypoint() []string { + if x != nil { + return x.Entrypoint + } + return nil +} + +func (x *ImageMetadata) GetWorkingDir() string { + if x != nil { + return x.WorkingDir + } + return "" +} + +func (x *ImageMetadata) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + +func (x *ImageMetadata) GetExposedPorts() []string { + if x != nil { + return x.ExposedPorts + } + return nil +} + +func (x *ImageMetadata) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *ImageMetadata) GetVolumes() []string { + if x != nil { + return x.Volumes + } + return nil +} + +// Build performance metrics +type BuildMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + PullDurationMs int64 `protobuf:"varint,1,opt,name=pull_duration_ms,json=pullDurationMs,proto3" json:"pull_duration_ms,omitempty"` // Time to pull image/source + ExtractDurationMs int64 `protobuf:"varint,2,opt,name=extract_duration_ms,json=extractDurationMs,proto3" json:"extract_duration_ms,omitempty"` // Time to extract layers + BuildDurationMs int64 `protobuf:"varint,3,opt,name=build_duration_ms,json=buildDurationMs,proto3" json:"build_duration_ms,omitempty"` // Time to build rootfs + OptimizeDurationMs int64 `protobuf:"varint,4,opt,name=optimize_duration_ms,json=optimizeDurationMs,proto3" json:"optimize_duration_ms,omitempty"` // Time for optimizations + TotalDurationMs int64 `protobuf:"varint,5,opt,name=total_duration_ms,json=totalDurationMs,proto3" json:"total_duration_ms,omitempty"` // Total build time + OriginalSizeBytes int64 `protobuf:"varint,6,opt,name=original_size_bytes,json=originalSizeBytes,proto3" json:"original_size_bytes,omitempty"` // Original image/source size + RootfsSizeBytes int64 `protobuf:"varint,7,opt,name=rootfs_size_bytes,json=rootfsSizeBytes,proto3" json:"rootfs_size_bytes,omitempty"` // Final rootfs size + CompressionRatio int64 `protobuf:"varint,8,opt,name=compression_ratio,json=compressionRatio,proto3" json:"compression_ratio,omitempty"` // Size reduction percentage + MemoryPeakBytes int64 `protobuf:"varint,9,opt,name=memory_peak_bytes,json=memoryPeakBytes,proto3" json:"memory_peak_bytes,omitempty"` // Peak memory usage + DiskUsageBytes int64 `protobuf:"varint,10,opt,name=disk_usage_bytes,json=diskUsageBytes,proto3" json:"disk_usage_bytes,omitempty"` // Temporary disk usage + CpuCoresUsed int32 `protobuf:"varint,11,opt,name=cpu_cores_used,json=cpuCoresUsed,proto3" json:"cpu_cores_used,omitempty"` // CPU cores utilized + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildMetrics) Reset() { + *x = BuildMetrics{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildMetrics) ProtoMessage() {} + +func (x *BuildMetrics) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildMetrics.ProtoReflect.Descriptor instead. +func (*BuildMetrics) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{21} +} + +func (x *BuildMetrics) GetPullDurationMs() int64 { + if x != nil { + return x.PullDurationMs + } + return 0 +} + +func (x *BuildMetrics) GetExtractDurationMs() int64 { + if x != nil { + return x.ExtractDurationMs + } + return 0 +} + +func (x *BuildMetrics) GetBuildDurationMs() int64 { + if x != nil { + return x.BuildDurationMs + } + return 0 +} + +func (x *BuildMetrics) GetOptimizeDurationMs() int64 { + if x != nil { + return x.OptimizeDurationMs + } + return 0 +} + +func (x *BuildMetrics) GetTotalDurationMs() int64 { + if x != nil { + return x.TotalDurationMs + } + return 0 +} + +func (x *BuildMetrics) GetOriginalSizeBytes() int64 { + if x != nil { + return x.OriginalSizeBytes + } + return 0 +} + +func (x *BuildMetrics) GetRootfsSizeBytes() int64 { + if x != nil { + return x.RootfsSizeBytes + } + return 0 +} + +func (x *BuildMetrics) GetCompressionRatio() int64 { + if x != nil { + return x.CompressionRatio + } + return 0 +} + +func (x *BuildMetrics) GetMemoryPeakBytes() int64 { + if x != nil { + return x.MemoryPeakBytes + } + return 0 +} + +func (x *BuildMetrics) GetDiskUsageBytes() int64 { + if x != nil { + return x.DiskUsageBytes + } + return 0 +} + +func (x *BuildMetrics) GetCpuCoresUsed() int32 { + if x != nil { + return x.CpuCoresUsed + } + return 0 +} + +// Complete build job information +type BuildJob struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` // Unique build identifier + Config *BuildConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` // Build configuration + State BuildState `protobuf:"varint,3,opt,name=state,proto3,enum=builder.v1.BuildState" json:"state,omitempty"` // Current build state + // Timestamps + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + CompletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + // Results + RootfsPath string `protobuf:"bytes,7,opt,name=rootfs_path,json=rootfsPath,proto3" json:"rootfs_path,omitempty"` // Path to built rootfs + RootfsSizeBytes int64 `protobuf:"varint,8,opt,name=rootfs_size_bytes,json=rootfsSizeBytes,proto3" json:"rootfs_size_bytes,omitempty"` // Size of rootfs + RootfsChecksum string `protobuf:"bytes,9,opt,name=rootfs_checksum,json=rootfsChecksum,proto3" json:"rootfs_checksum,omitempty"` // SHA256 of rootfs + // Build metadata + ImageMetadata *ImageMetadata `protobuf:"bytes,10,opt,name=image_metadata,json=imageMetadata,proto3" json:"image_metadata,omitempty"` + Metrics *BuildMetrics `protobuf:"bytes,11,opt,name=metrics,proto3" json:"metrics,omitempty"` + Isolation *BuildIsolation `protobuf:"bytes,12,opt,name=isolation,proto3" json:"isolation,omitempty"` + // Error information + ErrorMessage string `protobuf:"bytes,13,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + BuildLogs []string `protobuf:"bytes,14,rep,name=build_logs,json=buildLogs,proto3" json:"build_logs,omitempty"` + // Progress information + ProgressPercent int32 `protobuf:"varint,15,opt,name=progress_percent,json=progressPercent,proto3" json:"progress_percent,omitempty"` // 0-100 + CurrentStep string `protobuf:"bytes,16,opt,name=current_step,json=currentStep,proto3" json:"current_step,omitempty"` // Current build step + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BuildJob) Reset() { + *x = BuildJob{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BuildJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildJob) ProtoMessage() {} + +func (x *BuildJob) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildJob.ProtoReflect.Descriptor instead. +func (*BuildJob) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{22} +} + +func (x *BuildJob) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *BuildJob) GetConfig() *BuildConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *BuildJob) GetState() BuildState { + if x != nil { + return x.State + } + return BuildState_BUILD_STATE_UNSPECIFIED +} + +func (x *BuildJob) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *BuildJob) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *BuildJob) GetCompletedAt() *timestamppb.Timestamp { + if x != nil { + return x.CompletedAt + } + return nil +} + +func (x *BuildJob) GetRootfsPath() string { + if x != nil { + return x.RootfsPath + } + return "" +} + +func (x *BuildJob) GetRootfsSizeBytes() int64 { + if x != nil { + return x.RootfsSizeBytes + } + return 0 +} + +func (x *BuildJob) GetRootfsChecksum() string { + if x != nil { + return x.RootfsChecksum + } + return "" +} + +func (x *BuildJob) GetImageMetadata() *ImageMetadata { + if x != nil { + return x.ImageMetadata + } + return nil +} + +func (x *BuildJob) GetMetrics() *BuildMetrics { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *BuildJob) GetIsolation() *BuildIsolation { + if x != nil { + return x.Isolation + } + return nil +} + +func (x *BuildJob) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *BuildJob) GetBuildLogs() []string { + if x != nil { + return x.BuildLogs + } + return nil +} + +func (x *BuildJob) GetProgressPercent() int32 { + if x != nil { + return x.ProgressPercent + } + return 0 +} + +func (x *BuildJob) GetCurrentStep() string { + if x != nil { + return x.CurrentStep + } + return "" +} + +// Build log entry for streaming +type StreamBuildLogsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` // "info", "warn", "error", "debug" + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Component string `protobuf:"bytes,4,opt,name=component,proto3" json:"component,omitempty"` // "puller", "extractor", "builder" + Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamBuildLogsResponse) Reset() { + *x = StreamBuildLogsResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamBuildLogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBuildLogsResponse) ProtoMessage() {} + +func (x *StreamBuildLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBuildLogsResponse.ProtoReflect.Descriptor instead. +func (*StreamBuildLogsResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{23} +} + +func (x *StreamBuildLogsResponse) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *StreamBuildLogsResponse) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +func (x *StreamBuildLogsResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *StreamBuildLogsResponse) GetComponent() string { + if x != nil { + return x.Component + } + return "" +} + +func (x *StreamBuildLogsResponse) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +// Tenant usage statistics +type TenantUsageStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActiveBuilds int32 `protobuf:"varint,1,opt,name=active_builds,json=activeBuilds,proto3" json:"active_builds,omitempty"` + DailyBuildsUsed int32 `protobuf:"varint,2,opt,name=daily_builds_used,json=dailyBuildsUsed,proto3" json:"daily_builds_used,omitempty"` + StorageBytesUsed int64 `protobuf:"varint,3,opt,name=storage_bytes_used,json=storageBytesUsed,proto3" json:"storage_bytes_used,omitempty"` + ComputeMinutesUsed int64 `protobuf:"varint,4,opt,name=compute_minutes_used,json=computeMinutesUsed,proto3" json:"compute_minutes_used,omitempty"` + BuildsQueued int32 `protobuf:"varint,5,opt,name=builds_queued,json=buildsQueued,proto3" json:"builds_queued,omitempty"` + BuildsCompletedToday int32 `protobuf:"varint,6,opt,name=builds_completed_today,json=buildsCompletedToday,proto3" json:"builds_completed_today,omitempty"` + BuildsFailedToday int32 `protobuf:"varint,7,opt,name=builds_failed_today,json=buildsFailedToday,proto3" json:"builds_failed_today,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TenantUsageStats) Reset() { + *x = TenantUsageStats{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TenantUsageStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantUsageStats) ProtoMessage() {} + +func (x *TenantUsageStats) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantUsageStats.ProtoReflect.Descriptor instead. +func (*TenantUsageStats) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{24} +} + +func (x *TenantUsageStats) GetActiveBuilds() int32 { + if x != nil { + return x.ActiveBuilds + } + return 0 +} + +func (x *TenantUsageStats) GetDailyBuildsUsed() int32 { + if x != nil { + return x.DailyBuildsUsed + } + return 0 +} + +func (x *TenantUsageStats) GetStorageBytesUsed() int64 { + if x != nil { + return x.StorageBytesUsed + } + return 0 +} + +func (x *TenantUsageStats) GetComputeMinutesUsed() int64 { + if x != nil { + return x.ComputeMinutesUsed + } + return 0 +} + +func (x *TenantUsageStats) GetBuildsQueued() int32 { + if x != nil { + return x.BuildsQueued + } + return 0 +} + +func (x *TenantUsageStats) GetBuildsCompletedToday() int32 { + if x != nil { + return x.BuildsCompletedToday + } + return 0 +} + +func (x *TenantUsageStats) GetBuildsFailedToday() int32 { + if x != nil { + return x.BuildsFailedToday + } + return 0 +} + +type QuotaViolation struct { + state protoimpl.MessageState `protogen:"open.v1"` + QuotaType string `protobuf:"bytes,1,opt,name=quota_type,json=quotaType,proto3" json:"quota_type,omitempty"` // "concurrent_builds", "daily_builds", etc. + CurrentValue int64 `protobuf:"varint,2,opt,name=current_value,json=currentValue,proto3" json:"current_value,omitempty"` + LimitValue int64 `protobuf:"varint,3,opt,name=limit_value,json=limitValue,proto3" json:"limit_value,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QuotaViolation) Reset() { + *x = QuotaViolation{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QuotaViolation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuotaViolation) ProtoMessage() {} + +func (x *QuotaViolation) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuotaViolation.ProtoReflect.Descriptor instead. +func (*QuotaViolation) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{25} +} + +func (x *QuotaViolation) GetQuotaType() string { + if x != nil { + return x.QuotaType + } + return "" +} + +func (x *QuotaViolation) GetCurrentValue() int64 { + if x != nil { + return x.CurrentValue + } + return 0 +} + +func (x *QuotaViolation) GetLimitValue() int64 { + if x != nil { + return x.LimitValue + } + return 0 +} + +func (x *QuotaViolation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Request/Response messages +type CreateBuildRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Config *BuildConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBuildRequest) Reset() { + *x = CreateBuildRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBuildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBuildRequest) ProtoMessage() {} + +func (x *CreateBuildRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBuildRequest.ProtoReflect.Descriptor instead. +func (*CreateBuildRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{26} +} + +func (x *CreateBuildRequest) GetConfig() *BuildConfig { + if x != nil { + return x.Config + } + return nil +} + +type CreateBuildResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + State BuildState `protobuf:"varint,2,opt,name=state,proto3,enum=builder.v1.BuildState" json:"state,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + RootfsPath string `protobuf:"bytes,4,opt,name=rootfs_path,json=rootfsPath,proto3" json:"rootfs_path,omitempty"` // Path to the generated rootfs for VM creation + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBuildResponse) Reset() { + *x = CreateBuildResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBuildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBuildResponse) ProtoMessage() {} + +func (x *CreateBuildResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBuildResponse.ProtoReflect.Descriptor instead. +func (*CreateBuildResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{27} +} + +func (x *CreateBuildResponse) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *CreateBuildResponse) GetState() BuildState { + if x != nil { + return x.State + } + return BuildState_BUILD_STATE_UNSPECIFIED +} + +func (x *CreateBuildResponse) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *CreateBuildResponse) GetRootfsPath() string { + if x != nil { + return x.RootfsPath + } + return "" +} + +type GetBuildRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // For authorization + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBuildRequest) Reset() { + *x = GetBuildRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBuildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBuildRequest) ProtoMessage() {} + +func (x *GetBuildRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBuildRequest.ProtoReflect.Descriptor instead. +func (*GetBuildRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{28} +} + +func (x *GetBuildRequest) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *GetBuildRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +type GetBuildResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Build *BuildJob `protobuf:"bytes,1,opt,name=build,proto3" json:"build,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBuildResponse) Reset() { + *x = GetBuildResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBuildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBuildResponse) ProtoMessage() {} + +func (x *GetBuildResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBuildResponse.ProtoReflect.Descriptor instead. +func (*GetBuildResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{29} +} + +func (x *GetBuildResponse) GetBuild() *BuildJob { + if x != nil { + return x.Build + } + return nil +} + +type ListBuildsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // Required for filtering + StateFilter []BuildState `protobuf:"varint,2,rep,packed,name=state_filter,json=stateFilter,proto3,enum=builder.v1.BuildState" json:"state_filter,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBuildsRequest) Reset() { + *x = ListBuildsRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBuildsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBuildsRequest) ProtoMessage() {} + +func (x *ListBuildsRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBuildsRequest.ProtoReflect.Descriptor instead. +func (*ListBuildsRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{30} +} + +func (x *ListBuildsRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *ListBuildsRequest) GetStateFilter() []BuildState { + if x != nil { + return x.StateFilter + } + return nil +} + +func (x *ListBuildsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListBuildsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListBuildsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Builds []*BuildJob `protobuf:"bytes,1,rep,name=builds,proto3" json:"builds,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBuildsResponse) Reset() { + *x = ListBuildsResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBuildsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBuildsResponse) ProtoMessage() {} + +func (x *ListBuildsResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBuildsResponse.ProtoReflect.Descriptor instead. +func (*ListBuildsResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{31} +} + +func (x *ListBuildsResponse) GetBuilds() []*BuildJob { + if x != nil { + return x.Builds + } + return nil +} + +func (x *ListBuildsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListBuildsResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type CancelBuildRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // For authorization + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelBuildRequest) Reset() { + *x = CancelBuildRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelBuildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelBuildRequest) ProtoMessage() {} + +func (x *CancelBuildRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelBuildRequest.ProtoReflect.Descriptor instead. +func (*CancelBuildRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{32} +} + +func (x *CancelBuildRequest) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *CancelBuildRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +type CancelBuildResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + State BuildState `protobuf:"varint,2,opt,name=state,proto3,enum=builder.v1.BuildState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelBuildResponse) Reset() { + *x = CancelBuildResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelBuildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelBuildResponse) ProtoMessage() {} + +func (x *CancelBuildResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelBuildResponse.ProtoReflect.Descriptor instead. +func (*CancelBuildResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{33} +} + +func (x *CancelBuildResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *CancelBuildResponse) GetState() BuildState { + if x != nil { + return x.State + } + return BuildState_BUILD_STATE_UNSPECIFIED +} + +type DeleteBuildRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // For authorization + Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` // Delete even if running + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteBuildRequest) Reset() { + *x = DeleteBuildRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteBuildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBuildRequest) ProtoMessage() {} + +func (x *DeleteBuildRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBuildRequest.ProtoReflect.Descriptor instead. +func (*DeleteBuildRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{34} +} + +func (x *DeleteBuildRequest) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *DeleteBuildRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *DeleteBuildRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type DeleteBuildResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteBuildResponse) Reset() { + *x = DeleteBuildResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteBuildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBuildResponse) ProtoMessage() {} + +func (x *DeleteBuildResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBuildResponse.ProtoReflect.Descriptor instead. +func (*DeleteBuildResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{35} +} + +func (x *DeleteBuildResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type StreamBuildLogsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BuildId string `protobuf:"bytes,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // For authorization + Follow bool `protobuf:"varint,3,opt,name=follow,proto3" json:"follow,omitempty"` // Continue streaming new logs + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamBuildLogsRequest) Reset() { + *x = StreamBuildLogsRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamBuildLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBuildLogsRequest) ProtoMessage() {} + +func (x *StreamBuildLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBuildLogsRequest.ProtoReflect.Descriptor instead. +func (*StreamBuildLogsRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{36} +} + +func (x *StreamBuildLogsRequest) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *StreamBuildLogsRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *StreamBuildLogsRequest) GetFollow() bool { + if x != nil { + return x.Follow + } + return false +} + +type GetTenantQuotasRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTenantQuotasRequest) Reset() { + *x = GetTenantQuotasRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTenantQuotasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTenantQuotasRequest) ProtoMessage() {} + +func (x *GetTenantQuotasRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTenantQuotasRequest.ProtoReflect.Descriptor instead. +func (*GetTenantQuotasRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{37} +} + +func (x *GetTenantQuotasRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +type GetTenantQuotasResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + CurrentLimits *TenantResourceLimits `protobuf:"bytes,1,opt,name=current_limits,json=currentLimits,proto3" json:"current_limits,omitempty"` + CurrentUsage *TenantUsageStats `protobuf:"bytes,2,opt,name=current_usage,json=currentUsage,proto3" json:"current_usage,omitempty"` + Violations []*QuotaViolation `protobuf:"bytes,3,rep,name=violations,proto3" json:"violations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTenantQuotasResponse) Reset() { + *x = GetTenantQuotasResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTenantQuotasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTenantQuotasResponse) ProtoMessage() {} + +func (x *GetTenantQuotasResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTenantQuotasResponse.ProtoReflect.Descriptor instead. +func (*GetTenantQuotasResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{38} +} + +func (x *GetTenantQuotasResponse) GetCurrentLimits() *TenantResourceLimits { + if x != nil { + return x.CurrentLimits + } + return nil +} + +func (x *GetTenantQuotasResponse) GetCurrentUsage() *TenantUsageStats { + if x != nil { + return x.CurrentUsage + } + return nil +} + +func (x *GetTenantQuotasResponse) GetViolations() []*QuotaViolation { + if x != nil { + return x.Violations + } + return nil +} + +type GetBuildStatsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBuildStatsRequest) Reset() { + *x = GetBuildStatsRequest{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBuildStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBuildStatsRequest) ProtoMessage() {} + +func (x *GetBuildStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBuildStatsRequest.ProtoReflect.Descriptor instead. +func (*GetBuildStatsRequest) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{39} +} + +func (x *GetBuildStatsRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *GetBuildStatsRequest) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *GetBuildStatsRequest) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +type GetBuildStatsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalBuilds int32 `protobuf:"varint,1,opt,name=total_builds,json=totalBuilds,proto3" json:"total_builds,omitempty"` + SuccessfulBuilds int32 `protobuf:"varint,2,opt,name=successful_builds,json=successfulBuilds,proto3" json:"successful_builds,omitempty"` + FailedBuilds int32 `protobuf:"varint,3,opt,name=failed_builds,json=failedBuilds,proto3" json:"failed_builds,omitempty"` + AvgBuildTimeMs int64 `protobuf:"varint,4,opt,name=avg_build_time_ms,json=avgBuildTimeMs,proto3" json:"avg_build_time_ms,omitempty"` + TotalStorageBytes int64 `protobuf:"varint,5,opt,name=total_storage_bytes,json=totalStorageBytes,proto3" json:"total_storage_bytes,omitempty"` + TotalComputeMinutes int64 `protobuf:"varint,6,opt,name=total_compute_minutes,json=totalComputeMinutes,proto3" json:"total_compute_minutes,omitempty"` + RecentBuilds []*BuildJob `protobuf:"bytes,7,rep,name=recent_builds,json=recentBuilds,proto3" json:"recent_builds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBuildStatsResponse) Reset() { + *x = GetBuildStatsResponse{} + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBuildStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBuildStatsResponse) ProtoMessage() {} + +func (x *GetBuildStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBuildStatsResponse.ProtoReflect.Descriptor instead. +func (*GetBuildStatsResponse) Descriptor() ([]byte, []int) { + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP(), []int{40} +} + +func (x *GetBuildStatsResponse) GetTotalBuilds() int32 { + if x != nil { + return x.TotalBuilds + } + return 0 +} + +func (x *GetBuildStatsResponse) GetSuccessfulBuilds() int32 { + if x != nil { + return x.SuccessfulBuilds + } + return 0 +} + +func (x *GetBuildStatsResponse) GetFailedBuilds() int32 { + if x != nil { + return x.FailedBuilds + } + return 0 +} + +func (x *GetBuildStatsResponse) GetAvgBuildTimeMs() int64 { + if x != nil { + return x.AvgBuildTimeMs + } + return 0 +} + +func (x *GetBuildStatsResponse) GetTotalStorageBytes() int64 { + if x != nil { + return x.TotalStorageBytes + } + return 0 +} + +func (x *GetBuildStatsResponse) GetTotalComputeMinutes() int64 { + if x != nil { + return x.TotalComputeMinutes + } + return 0 +} + +func (x *GetBuildStatsResponse) GetRecentBuilds() []*BuildJob { + if x != nil { + return x.RecentBuilds + } + return nil +} + +var File_deploy_builderd_proto_builder_v1_builder_proto protoreflect.FileDescriptor + +const file_deploy_builderd_proto_builder_v1_builder_proto_rawDesc = "" + + "\n" + + ".deploy/builderd/proto/builder/v1/builder.proto\x12\n" + + "builder.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc6\x02\n" + + "\rTenantContext\x12\x1b\n" + + "\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x1f\n" + + "\vcustomer_id\x18\x02 \x01(\tR\n" + + "customerId\x12'\n" + + "\x0forganization_id\x18\x03 \x01(\tR\x0eorganizationId\x12*\n" + + "\x04tier\x18\x04 \x01(\x0e2\x16.builder.v1.TenantTierR\x04tier\x12 \n" + + "\vpermissions\x18\x05 \x03(\tR\vpermissions\x12C\n" + + "\bmetadata\x18\x06 \x03(\v2'.builder.v1.TenantContext.MetadataEntryR\bmetadata\x1a;\n" + + "\rMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xe1\x01\n" + + "\vBuildSource\x12B\n" + + "\fdocker_image\x18\x01 \x01(\v2\x1d.builder.v1.DockerImageSourceH\x00R\vdockerImage\x12H\n" + + "\x0egit_repository\x18\x02 \x01(\v2\x1f.builder.v1.GitRepositorySourceH\x00R\rgitRepository\x125\n" + + "\aarchive\x18\x03 \x01(\v2\x19.builder.v1.ArchiveSourceH\x00R\aarchiveB\r\n" + + "\vsource_type\"y\n" + + "\x11DockerImageSource\x12\x1b\n" + + "\timage_uri\x18\x01 \x01(\tR\bimageUri\x12*\n" + + "\x04auth\x18\x02 \x01(\v2\x16.builder.v1.DockerAuthR\x04auth\x12\x1b\n" + + "\tpull_tags\x18\x03 \x03(\tR\bpullTags\"v\n" + + "\n" + + "DockerAuth\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x14\n" + + "\x05token\x18\x03 \x01(\tR\x05token\x12\x1a\n" + + "\bregistry\x18\x04 \x01(\tR\bregistry\"\x9c\x01\n" + + "\x13GitRepositorySource\x12%\n" + + "\x0erepository_url\x18\x01 \x01(\tR\rrepositoryUrl\x12\x10\n" + + "\x03ref\x18\x02 \x01(\tR\x03ref\x12#\n" + + "\rbuild_context\x18\x03 \x01(\tR\fbuildContext\x12'\n" + + "\x04auth\x18\x04 \x01(\v2\x13.builder.v1.GitAuthR\x04auth\"p\n" + + "\aGitAuth\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x17\n" + + "\assh_key\x18\x03 \x01(\tR\x06sshKey\x12\x14\n" + + "\x05token\x18\x04 \x01(\tR\x05token\"x\n" + + "\rArchiveSource\x12\x1f\n" + + "\varchive_url\x18\x01 \x01(\tR\n" + + "archiveUrl\x12!\n" + + "\farchive_type\x18\x02 \x01(\tR\varchiveType\x12#\n" + + "\rbuild_context\x18\x03 \x01(\tR\fbuildContext\"\xa7\x01\n" + + "\vBuildTarget\x12B\n" + + "\x0emicrovm_rootfs\x18\x01 \x01(\v2\x19.builder.v1.MicroVMRootfsH\x00R\rmicrovmRootfs\x12E\n" + + "\x0fcontainer_image\x18\x02 \x01(\v2\x1a.builder.v1.ContainerImageH\x00R\x0econtainerImageB\r\n" + + "\vtarget_type\"\xfd\x01\n" + + "\rMicroVMRootfs\x12=\n" + + "\rinit_strategy\x18\x01 \x01(\x0e2\x18.builder.v1.InitStrategyR\finitStrategy\x12@\n" + + "\x0eruntime_config\x18\x02 \x01(\v2\x19.builder.v1.RuntimeConfigR\rruntimeConfig\x12D\n" + + "\foptimization\x18\x03 \x01(\v2 .builder.v1.OptimizationSettingsR\foptimization\x12%\n" + + "\x0epreserve_paths\x18\x04 \x03(\tR\rpreservePaths\"G\n" + + "\x0eContainerImage\x12\x1d\n" + + "\n" + + "base_image\x18\x01 \x01(\tR\tbaseImage\x12\x16\n" + + "\x06layers\x18\x02 \x03(\tR\x06layers\"\x9d\x02\n" + + "\rRuntimeConfig\x12\x18\n" + + "\acommand\x18\x01 \x03(\tR\acommand\x12\x1e\n" + + "\n" + + "entrypoint\x18\x02 \x03(\tR\n" + + "entrypoint\x12\x1f\n" + + "\vworking_dir\x18\x03 \x01(\tR\n" + + "workingDir\x12L\n" + + "\venvironment\x18\x04 \x03(\v2*.builder.v1.RuntimeConfig.EnvironmentEntryR\venvironment\x12#\n" + + "\rexposed_ports\x18\x05 \x03(\tR\fexposedPorts\x1a>\n" + + "\x10EnvironmentEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x89\x02\n" + + "\x14OptimizationSettings\x12.\n" + + "\x13strip_debug_symbols\x18\x01 \x01(\bR\x11stripDebugSymbols\x12+\n" + + "\x11compress_binaries\x18\x02 \x01(\bR\x10compressBinaries\x12\x1f\n" + + "\vremove_docs\x18\x03 \x01(\bR\n" + + "removeDocs\x12!\n" + + "\fremove_cache\x18\x04 \x01(\bR\vremoveCache\x12%\n" + + "\x0epreserve_paths\x18\x05 \x03(\tR\rpreservePaths\x12)\n" + + "\x10exclude_patterns\x18\x06 \x03(\tR\x0fexcludePatterns\"\x8f\x02\n" + + "\rBuildStrategy\x12J\n" + + "\x0edocker_extract\x18\x01 \x01(\v2!.builder.v1.DockerExtractStrategyH\x00R\rdockerExtract\x122\n" + + "\x06go_api\x18\x02 \x01(\v2\x19.builder.v1.GoApiStrategyH\x00R\x05goApi\x127\n" + + "\asinatra\x18\x03 \x01(\v2\x1b.builder.v1.SinatraStrategyH\x00R\asinatra\x124\n" + + "\x06nodejs\x18\x04 \x01(\v2\x1a.builder.v1.NodejsStrategyH\x00R\x06nodejsB\x0f\n" + + "\rstrategy_type\"\x9a\x01\n" + + "\x15DockerExtractStrategy\x12'\n" + + "\x0fpreserve_layers\x18\x01 \x01(\bR\x0epreserveLayers\x12-\n" + + "\x12flatten_filesystem\x18\x02 \x01(\bR\x11flattenFilesystem\x12)\n" + + "\x10exclude_patterns\x18\x03 \x03(\tR\x0fexcludePatterns\"\x91\x01\n" + + "\rGoApiStrategy\x12\x1d\n" + + "\n" + + "go_version\x18\x01 \x01(\tR\tgoVersion\x12\x1f\n" + + "\vbuild_flags\x18\x02 \x03(\tR\n" + + "buildFlags\x12!\n" + + "\fmain_package\x18\x03 \x01(\tR\vmainPackage\x12\x1d\n" + + "\n" + + "enable_cgo\x18\x04 \x01(\bR\tenableCgo\"\x85\x02\n" + + "\x0fSinatraStrategy\x12!\n" + + "\fruby_version\x18\x01 \x01(\tR\vrubyVersion\x12!\n" + + "\fgemfile_path\x18\x02 \x01(\tR\vgemfilePath\x12\x1f\n" + + "\vrack_server\x18\x03 \x01(\tR\n" + + "rackServer\x12L\n" + + "\vrack_config\x18\x04 \x03(\v2+.builder.v1.SinatraStrategy.RackConfigEntryR\n" + + "rackConfig\x1a=\n" + + "\x0fRackConfigEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xac\x01\n" + + "\x0eNodejsStrategy\x12!\n" + + "\fnode_version\x18\x01 \x01(\tR\vnodeVersion\x12'\n" + + "\x0fpackage_manager\x18\x02 \x01(\tR\x0epackageManager\x12!\n" + + "\fstart_script\x18\x03 \x01(\tR\vstartScript\x12+\n" + + "\x11enable_production\x18\x04 \x01(\bR\x10enableProduction\"\x8b\x05\n" + + "\x14TenantResourceLimits\x12(\n" + + "\x10max_memory_bytes\x18\x01 \x01(\x03R\x0emaxMemoryBytes\x12\"\n" + + "\rmax_cpu_cores\x18\x02 \x01(\x05R\vmaxCpuCores\x12$\n" + + "\x0emax_disk_bytes\x18\x03 \x01(\x03R\fmaxDiskBytes\x12'\n" + + "\x0ftimeout_seconds\x18\x04 \x01(\x05R\x0etimeoutSeconds\x122\n" + + "\x15max_concurrent_builds\x18\x05 \x01(\x05R\x13maxConcurrentBuilds\x12(\n" + + "\x10max_daily_builds\x18\x06 \x01(\x05R\x0emaxDailyBuilds\x12*\n" + + "\x11max_storage_bytes\x18\a \x01(\x03R\x0fmaxStorageBytes\x123\n" + + "\x16max_build_time_minutes\x18\b \x01(\x05R\x13maxBuildTimeMinutes\x12-\n" + + "\x12allowed_registries\x18\t \x03(\tR\x11allowedRegistries\x12*\n" + + "\x11allowed_git_hosts\x18\n" + + " \x03(\tR\x0fallowedGitHosts\x124\n" + + "\x16allow_external_network\x18\v \x01(\bR\x14allowExternalNetwork\x126\n" + + "\x17allow_privileged_builds\x18\f \x01(\bR\x15allowPrivilegedBuilds\x12)\n" + + "\x10blocked_commands\x18\r \x03(\tR\x0fblockedCommands\x12#\n" + + "\rsandbox_level\x18\x0e \x01(\x05R\fsandboxLevel\"\xd8\x03\n" + + "\vBuildConfig\x121\n" + + "\x06tenant\x18\x01 \x01(\v2\x19.builder.v1.TenantContextR\x06tenant\x12/\n" + + "\x06source\x18\x02 \x01(\v2\x17.builder.v1.BuildSourceR\x06source\x12/\n" + + "\x06target\x18\x03 \x01(\v2\x17.builder.v1.BuildTargetR\x06target\x125\n" + + "\bstrategy\x18\x04 \x01(\v2\x19.builder.v1.BuildStrategyR\bstrategy\x128\n" + + "\x06limits\x18\x05 \x01(\v2 .builder.v1.TenantResourceLimitsR\x06limits\x12\x1d\n" + + "\n" + + "build_name\x18\x06 \x01(\tR\tbuildName\x12;\n" + + "\x06labels\x18\a \x03(\v2#.builder.v1.BuildConfig.LabelsEntryR\x06labels\x12,\n" + + "\x12suggested_asset_id\x18\b \x01(\tR\x10suggestedAssetId\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xdd\x01\n" + + "\x0eBuildIsolation\x12\x1d\n" + + "\n" + + "sandbox_id\x18\x01 \x01(\tR\tsandboxId\x12+\n" + + "\x11network_namespace\x18\x02 \x01(\tR\x10networkNamespace\x121\n" + + "\x14filesystem_namespace\x18\x03 \x01(\tR\x13filesystemNamespace\x12+\n" + + "\x11security_contexts\x18\x04 \x03(\tR\x10securityContexts\x12\x1f\n" + + "\vcgroup_path\x18\x05 \x01(\tR\n" + + "cgroupPath\"\x87\x04\n" + + "\rImageMetadata\x12%\n" + + "\x0eoriginal_image\x18\x01 \x01(\tR\roriginalImage\x12!\n" + + "\fimage_digest\x18\x02 \x01(\tR\vimageDigest\x12\x16\n" + + "\x06layers\x18\x03 \x03(\tR\x06layers\x12=\n" + + "\x06labels\x18\x04 \x03(\v2%.builder.v1.ImageMetadata.LabelsEntryR\x06labels\x12\x18\n" + + "\acommand\x18\x05 \x03(\tR\acommand\x12\x1e\n" + + "\n" + + "entrypoint\x18\x06 \x03(\tR\n" + + "entrypoint\x12\x1f\n" + + "\vworking_dir\x18\a \x01(\tR\n" + + "workingDir\x124\n" + + "\x03env\x18\b \x03(\v2\".builder.v1.ImageMetadata.EnvEntryR\x03env\x12#\n" + + "\rexposed_ports\x18\t \x03(\tR\fexposedPorts\x12\x12\n" + + "\x04user\x18\n" + + " \x01(\tR\x04user\x12\x18\n" + + "\avolumes\x18\v \x03(\tR\avolumes\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a6\n" + + "\bEnvEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xf7\x03\n" + + "\fBuildMetrics\x12(\n" + + "\x10pull_duration_ms\x18\x01 \x01(\x03R\x0epullDurationMs\x12.\n" + + "\x13extract_duration_ms\x18\x02 \x01(\x03R\x11extractDurationMs\x12*\n" + + "\x11build_duration_ms\x18\x03 \x01(\x03R\x0fbuildDurationMs\x120\n" + + "\x14optimize_duration_ms\x18\x04 \x01(\x03R\x12optimizeDurationMs\x12*\n" + + "\x11total_duration_ms\x18\x05 \x01(\x03R\x0ftotalDurationMs\x12.\n" + + "\x13original_size_bytes\x18\x06 \x01(\x03R\x11originalSizeBytes\x12*\n" + + "\x11rootfs_size_bytes\x18\a \x01(\x03R\x0frootfsSizeBytes\x12+\n" + + "\x11compression_ratio\x18\b \x01(\x03R\x10compressionRatio\x12*\n" + + "\x11memory_peak_bytes\x18\t \x01(\x03R\x0fmemoryPeakBytes\x12(\n" + + "\x10disk_usage_bytes\x18\n" + + " \x01(\x03R\x0ediskUsageBytes\x12$\n" + + "\x0ecpu_cores_used\x18\v \x01(\x05R\fcpuCoresUsed\"\xf1\x05\n" + + "\bBuildJob\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12/\n" + + "\x06config\x18\x02 \x01(\v2\x17.builder.v1.BuildConfigR\x06config\x12,\n" + + "\x05state\x18\x03 \x01(\x0e2\x16.builder.v1.BuildStateR\x05state\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "started_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12=\n" + + "\fcompleted_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\vcompletedAt\x12\x1f\n" + + "\vrootfs_path\x18\a \x01(\tR\n" + + "rootfsPath\x12*\n" + + "\x11rootfs_size_bytes\x18\b \x01(\x03R\x0frootfsSizeBytes\x12'\n" + + "\x0frootfs_checksum\x18\t \x01(\tR\x0erootfsChecksum\x12@\n" + + "\x0eimage_metadata\x18\n" + + " \x01(\v2\x19.builder.v1.ImageMetadataR\rimageMetadata\x122\n" + + "\ametrics\x18\v \x01(\v2\x18.builder.v1.BuildMetricsR\ametrics\x128\n" + + "\tisolation\x18\f \x01(\v2\x1a.builder.v1.BuildIsolationR\tisolation\x12#\n" + + "\rerror_message\x18\r \x01(\tR\ferrorMessage\x12\x1d\n" + + "\n" + + "build_logs\x18\x0e \x03(\tR\tbuildLogs\x12)\n" + + "\x10progress_percent\x18\x0f \x01(\x05R\x0fprogressPercent\x12!\n" + + "\fcurrent_step\x18\x10 \x01(\tR\vcurrentStep\"\xad\x02\n" + + "\x17StreamBuildLogsResponse\x128\n" + + "\ttimestamp\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12\x14\n" + + "\x05level\x18\x02 \x01(\tR\x05level\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\x12\x1c\n" + + "\tcomponent\x18\x04 \x01(\tR\tcomponent\x12M\n" + + "\bmetadata\x18\x05 \x03(\v21.builder.v1.StreamBuildLogsResponse.MetadataEntryR\bmetadata\x1a;\n" + + "\rMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xce\x02\n" + + "\x10TenantUsageStats\x12#\n" + + "\ractive_builds\x18\x01 \x01(\x05R\factiveBuilds\x12*\n" + + "\x11daily_builds_used\x18\x02 \x01(\x05R\x0fdailyBuildsUsed\x12,\n" + + "\x12storage_bytes_used\x18\x03 \x01(\x03R\x10storageBytesUsed\x120\n" + + "\x14compute_minutes_used\x18\x04 \x01(\x03R\x12computeMinutesUsed\x12#\n" + + "\rbuilds_queued\x18\x05 \x01(\x05R\fbuildsQueued\x124\n" + + "\x16builds_completed_today\x18\x06 \x01(\x05R\x14buildsCompletedToday\x12.\n" + + "\x13builds_failed_today\x18\a \x01(\x05R\x11buildsFailedToday\"\x8f\x01\n" + + "\x0eQuotaViolation\x12\x1d\n" + + "\n" + + "quota_type\x18\x01 \x01(\tR\tquotaType\x12#\n" + + "\rcurrent_value\x18\x02 \x01(\x03R\fcurrentValue\x12\x1f\n" + + "\vlimit_value\x18\x03 \x01(\x03R\n" + + "limitValue\x12\x18\n" + + "\amessage\x18\x04 \x01(\tR\amessage\"E\n" + + "\x12CreateBuildRequest\x12/\n" + + "\x06config\x18\x01 \x01(\v2\x17.builder.v1.BuildConfigR\x06config\"\xba\x01\n" + + "\x13CreateBuildResponse\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12,\n" + + "\x05state\x18\x02 \x01(\x0e2\x16.builder.v1.BuildStateR\x05state\x129\n" + + "\n" + + "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x1f\n" + + "\vrootfs_path\x18\x04 \x01(\tR\n" + + "rootfsPath\"I\n" + + "\x0fGetBuildRequest\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12\x1b\n" + + "\ttenant_id\x18\x02 \x01(\tR\btenantId\">\n" + + "\x10GetBuildResponse\x12*\n" + + "\x05build\x18\x01 \x01(\v2\x14.builder.v1.BuildJobR\x05build\"\xa7\x01\n" + + "\x11ListBuildsRequest\x12\x1b\n" + + "\ttenant_id\x18\x01 \x01(\tR\btenantId\x129\n" + + "\fstate_filter\x18\x02 \x03(\x0e2\x16.builder.v1.BuildStateR\vstateFilter\x12\x1b\n" + + "\tpage_size\x18\x03 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x04 \x01(\tR\tpageToken\"\x8b\x01\n" + + "\x12ListBuildsResponse\x12,\n" + + "\x06builds\x18\x01 \x03(\v2\x14.builder.v1.BuildJobR\x06builds\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1f\n" + + "\vtotal_count\x18\x03 \x01(\x05R\n" + + "totalCount\"L\n" + + "\x12CancelBuildRequest\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12\x1b\n" + + "\ttenant_id\x18\x02 \x01(\tR\btenantId\"]\n" + + "\x13CancelBuildResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12,\n" + + "\x05state\x18\x02 \x01(\x0e2\x16.builder.v1.BuildStateR\x05state\"b\n" + + "\x12DeleteBuildRequest\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12\x1b\n" + + "\ttenant_id\x18\x02 \x01(\tR\btenantId\x12\x14\n" + + "\x05force\x18\x03 \x01(\bR\x05force\"/\n" + + "\x13DeleteBuildResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"h\n" + + "\x16StreamBuildLogsRequest\x12\x19\n" + + "\bbuild_id\x18\x01 \x01(\tR\abuildId\x12\x1b\n" + + "\ttenant_id\x18\x02 \x01(\tR\btenantId\x12\x16\n" + + "\x06follow\x18\x03 \x01(\bR\x06follow\"5\n" + + "\x16GetTenantQuotasRequest\x12\x1b\n" + + "\ttenant_id\x18\x01 \x01(\tR\btenantId\"\xe1\x01\n" + + "\x17GetTenantQuotasResponse\x12G\n" + + "\x0ecurrent_limits\x18\x01 \x01(\v2 .builder.v1.TenantResourceLimitsR\rcurrentLimits\x12A\n" + + "\rcurrent_usage\x18\x02 \x01(\v2\x1c.builder.v1.TenantUsageStatsR\fcurrentUsage\x12:\n" + + "\n" + + "violations\x18\x03 \x03(\v2\x1a.builder.v1.QuotaViolationR\n" + + "violations\"\xa5\x01\n" + + "\x14GetBuildStatsRequest\x12\x1b\n" + + "\ttenant_id\x18\x01 \x01(\tR\btenantId\x129\n" + + "\n" + + "start_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" + + "\bend_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\aendTime\"\xd6\x02\n" + + "\x15GetBuildStatsResponse\x12!\n" + + "\ftotal_builds\x18\x01 \x01(\x05R\vtotalBuilds\x12+\n" + + "\x11successful_builds\x18\x02 \x01(\x05R\x10successfulBuilds\x12#\n" + + "\rfailed_builds\x18\x03 \x01(\x05R\ffailedBuilds\x12)\n" + + "\x11avg_build_time_ms\x18\x04 \x01(\x03R\x0eavgBuildTimeMs\x12.\n" + + "\x13total_storage_bytes\x18\x05 \x01(\x03R\x11totalStorageBytes\x122\n" + + "\x15total_compute_minutes\x18\x06 \x01(\x03R\x13totalComputeMinutes\x129\n" + + "\rrecent_builds\x18\a \x03(\v2\x14.builder.v1.BuildJobR\frecentBuilds*\x95\x02\n" + + "\n" + + "BuildState\x12\x1b\n" + + "\x17BUILD_STATE_UNSPECIFIED\x10\x00\x12\x17\n" + + "\x13BUILD_STATE_PENDING\x10\x01\x12\x17\n" + + "\x13BUILD_STATE_PULLING\x10\x02\x12\x1a\n" + + "\x16BUILD_STATE_EXTRACTING\x10\x03\x12\x18\n" + + "\x14BUILD_STATE_BUILDING\x10\x04\x12\x1a\n" + + "\x16BUILD_STATE_OPTIMIZING\x10\x05\x12\x19\n" + + "\x15BUILD_STATE_COMPLETED\x10\x06\x12\x16\n" + + "\x12BUILD_STATE_FAILED\x10\a\x12\x19\n" + + "\x15BUILD_STATE_CANCELLED\x10\b\x12\x18\n" + + "\x14BUILD_STATE_CLEANING\x10\t*\x8b\x01\n" + + "\n" + + "TenantTier\x12\x1b\n" + + "\x17TENANT_TIER_UNSPECIFIED\x10\x00\x12\x14\n" + + "\x10TENANT_TIER_FREE\x10\x01\x12\x13\n" + + "\x0fTENANT_TIER_PRO\x10\x02\x12\x1a\n" + + "\x16TENANT_TIER_ENTERPRISE\x10\x03\x12\x19\n" + + "\x15TENANT_TIER_DEDICATED\x10\x04*y\n" + + "\fInitStrategy\x12\x1d\n" + + "\x19INIT_STRATEGY_UNSPECIFIED\x10\x00\x12\x16\n" + + "\x12INIT_STRATEGY_TINI\x10\x01\x12\x18\n" + + "\x14INIT_STRATEGY_DIRECT\x10\x02\x12\x18\n" + + "\x14INIT_STRATEGY_CUSTOM\x10\x032\xa4\x05\n" + + "\x0eBuilderService\x12N\n" + + "\vCreateBuild\x12\x1e.builder.v1.CreateBuildRequest\x1a\x1f.builder.v1.CreateBuildResponse\x12E\n" + + "\bGetBuild\x12\x1b.builder.v1.GetBuildRequest\x1a\x1c.builder.v1.GetBuildResponse\x12K\n" + + "\n" + + "ListBuilds\x12\x1d.builder.v1.ListBuildsRequest\x1a\x1e.builder.v1.ListBuildsResponse\x12N\n" + + "\vCancelBuild\x12\x1e.builder.v1.CancelBuildRequest\x1a\x1f.builder.v1.CancelBuildResponse\x12N\n" + + "\vDeleteBuild\x12\x1e.builder.v1.DeleteBuildRequest\x1a\x1f.builder.v1.DeleteBuildResponse\x12\\\n" + + "\x0fStreamBuildLogs\x12\".builder.v1.StreamBuildLogsRequest\x1a#.builder.v1.StreamBuildLogsResponse0\x01\x12Z\n" + + "\x0fGetTenantQuotas\x12\".builder.v1.GetTenantQuotasRequest\x1a#.builder.v1.GetTenantQuotasResponse\x12T\n" + + "\rGetBuildStats\x12 .builder.v1.GetBuildStatsRequest\x1a!.builder.v1.GetBuildStatsResponseBFZDgithub.com/unkeyed/unkey/go/deploy/builderd/gen/builder/v1;builderv1b\x06proto3" + +var ( + file_deploy_builderd_proto_builder_v1_builder_proto_rawDescOnce sync.Once + file_deploy_builderd_proto_builder_v1_builder_proto_rawDescData []byte +) + +func file_deploy_builderd_proto_builder_v1_builder_proto_rawDescGZIP() []byte { + file_deploy_builderd_proto_builder_v1_builder_proto_rawDescOnce.Do(func() { + file_deploy_builderd_proto_builder_v1_builder_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_deploy_builderd_proto_builder_v1_builder_proto_rawDesc), len(file_deploy_builderd_proto_builder_v1_builder_proto_rawDesc))) + }) + return file_deploy_builderd_proto_builder_v1_builder_proto_rawDescData +} + +var file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes = make([]protoimpl.MessageInfo, 48) +var file_deploy_builderd_proto_builder_v1_builder_proto_goTypes = []any{ + (BuildState)(0), // 0: builder.v1.BuildState + (TenantTier)(0), // 1: builder.v1.TenantTier + (InitStrategy)(0), // 2: builder.v1.InitStrategy + (*TenantContext)(nil), // 3: builder.v1.TenantContext + (*BuildSource)(nil), // 4: builder.v1.BuildSource + (*DockerImageSource)(nil), // 5: builder.v1.DockerImageSource + (*DockerAuth)(nil), // 6: builder.v1.DockerAuth + (*GitRepositorySource)(nil), // 7: builder.v1.GitRepositorySource + (*GitAuth)(nil), // 8: builder.v1.GitAuth + (*ArchiveSource)(nil), // 9: builder.v1.ArchiveSource + (*BuildTarget)(nil), // 10: builder.v1.BuildTarget + (*MicroVMRootfs)(nil), // 11: builder.v1.MicroVMRootfs + (*ContainerImage)(nil), // 12: builder.v1.ContainerImage + (*RuntimeConfig)(nil), // 13: builder.v1.RuntimeConfig + (*OptimizationSettings)(nil), // 14: builder.v1.OptimizationSettings + (*BuildStrategy)(nil), // 15: builder.v1.BuildStrategy + (*DockerExtractStrategy)(nil), // 16: builder.v1.DockerExtractStrategy + (*GoApiStrategy)(nil), // 17: builder.v1.GoApiStrategy + (*SinatraStrategy)(nil), // 18: builder.v1.SinatraStrategy + (*NodejsStrategy)(nil), // 19: builder.v1.NodejsStrategy + (*TenantResourceLimits)(nil), // 20: builder.v1.TenantResourceLimits + (*BuildConfig)(nil), // 21: builder.v1.BuildConfig + (*BuildIsolation)(nil), // 22: builder.v1.BuildIsolation + (*ImageMetadata)(nil), // 23: builder.v1.ImageMetadata + (*BuildMetrics)(nil), // 24: builder.v1.BuildMetrics + (*BuildJob)(nil), // 25: builder.v1.BuildJob + (*StreamBuildLogsResponse)(nil), // 26: builder.v1.StreamBuildLogsResponse + (*TenantUsageStats)(nil), // 27: builder.v1.TenantUsageStats + (*QuotaViolation)(nil), // 28: builder.v1.QuotaViolation + (*CreateBuildRequest)(nil), // 29: builder.v1.CreateBuildRequest + (*CreateBuildResponse)(nil), // 30: builder.v1.CreateBuildResponse + (*GetBuildRequest)(nil), // 31: builder.v1.GetBuildRequest + (*GetBuildResponse)(nil), // 32: builder.v1.GetBuildResponse + (*ListBuildsRequest)(nil), // 33: builder.v1.ListBuildsRequest + (*ListBuildsResponse)(nil), // 34: builder.v1.ListBuildsResponse + (*CancelBuildRequest)(nil), // 35: builder.v1.CancelBuildRequest + (*CancelBuildResponse)(nil), // 36: builder.v1.CancelBuildResponse + (*DeleteBuildRequest)(nil), // 37: builder.v1.DeleteBuildRequest + (*DeleteBuildResponse)(nil), // 38: builder.v1.DeleteBuildResponse + (*StreamBuildLogsRequest)(nil), // 39: builder.v1.StreamBuildLogsRequest + (*GetTenantQuotasRequest)(nil), // 40: builder.v1.GetTenantQuotasRequest + (*GetTenantQuotasResponse)(nil), // 41: builder.v1.GetTenantQuotasResponse + (*GetBuildStatsRequest)(nil), // 42: builder.v1.GetBuildStatsRequest + (*GetBuildStatsResponse)(nil), // 43: builder.v1.GetBuildStatsResponse + nil, // 44: builder.v1.TenantContext.MetadataEntry + nil, // 45: builder.v1.RuntimeConfig.EnvironmentEntry + nil, // 46: builder.v1.SinatraStrategy.RackConfigEntry + nil, // 47: builder.v1.BuildConfig.LabelsEntry + nil, // 48: builder.v1.ImageMetadata.LabelsEntry + nil, // 49: builder.v1.ImageMetadata.EnvEntry + nil, // 50: builder.v1.StreamBuildLogsResponse.MetadataEntry + (*timestamppb.Timestamp)(nil), // 51: google.protobuf.Timestamp +} +var file_deploy_builderd_proto_builder_v1_builder_proto_depIdxs = []int32{ + 1, // 0: builder.v1.TenantContext.tier:type_name -> builder.v1.TenantTier + 44, // 1: builder.v1.TenantContext.metadata:type_name -> builder.v1.TenantContext.MetadataEntry + 5, // 2: builder.v1.BuildSource.docker_image:type_name -> builder.v1.DockerImageSource + 7, // 3: builder.v1.BuildSource.git_repository:type_name -> builder.v1.GitRepositorySource + 9, // 4: builder.v1.BuildSource.archive:type_name -> builder.v1.ArchiveSource + 6, // 5: builder.v1.DockerImageSource.auth:type_name -> builder.v1.DockerAuth + 8, // 6: builder.v1.GitRepositorySource.auth:type_name -> builder.v1.GitAuth + 11, // 7: builder.v1.BuildTarget.microvm_rootfs:type_name -> builder.v1.MicroVMRootfs + 12, // 8: builder.v1.BuildTarget.container_image:type_name -> builder.v1.ContainerImage + 2, // 9: builder.v1.MicroVMRootfs.init_strategy:type_name -> builder.v1.InitStrategy + 13, // 10: builder.v1.MicroVMRootfs.runtime_config:type_name -> builder.v1.RuntimeConfig + 14, // 11: builder.v1.MicroVMRootfs.optimization:type_name -> builder.v1.OptimizationSettings + 45, // 12: builder.v1.RuntimeConfig.environment:type_name -> builder.v1.RuntimeConfig.EnvironmentEntry + 16, // 13: builder.v1.BuildStrategy.docker_extract:type_name -> builder.v1.DockerExtractStrategy + 17, // 14: builder.v1.BuildStrategy.go_api:type_name -> builder.v1.GoApiStrategy + 18, // 15: builder.v1.BuildStrategy.sinatra:type_name -> builder.v1.SinatraStrategy + 19, // 16: builder.v1.BuildStrategy.nodejs:type_name -> builder.v1.NodejsStrategy + 46, // 17: builder.v1.SinatraStrategy.rack_config:type_name -> builder.v1.SinatraStrategy.RackConfigEntry + 3, // 18: builder.v1.BuildConfig.tenant:type_name -> builder.v1.TenantContext + 4, // 19: builder.v1.BuildConfig.source:type_name -> builder.v1.BuildSource + 10, // 20: builder.v1.BuildConfig.target:type_name -> builder.v1.BuildTarget + 15, // 21: builder.v1.BuildConfig.strategy:type_name -> builder.v1.BuildStrategy + 20, // 22: builder.v1.BuildConfig.limits:type_name -> builder.v1.TenantResourceLimits + 47, // 23: builder.v1.BuildConfig.labels:type_name -> builder.v1.BuildConfig.LabelsEntry + 48, // 24: builder.v1.ImageMetadata.labels:type_name -> builder.v1.ImageMetadata.LabelsEntry + 49, // 25: builder.v1.ImageMetadata.env:type_name -> builder.v1.ImageMetadata.EnvEntry + 21, // 26: builder.v1.BuildJob.config:type_name -> builder.v1.BuildConfig + 0, // 27: builder.v1.BuildJob.state:type_name -> builder.v1.BuildState + 51, // 28: builder.v1.BuildJob.created_at:type_name -> google.protobuf.Timestamp + 51, // 29: builder.v1.BuildJob.started_at:type_name -> google.protobuf.Timestamp + 51, // 30: builder.v1.BuildJob.completed_at:type_name -> google.protobuf.Timestamp + 23, // 31: builder.v1.BuildJob.image_metadata:type_name -> builder.v1.ImageMetadata + 24, // 32: builder.v1.BuildJob.metrics:type_name -> builder.v1.BuildMetrics + 22, // 33: builder.v1.BuildJob.isolation:type_name -> builder.v1.BuildIsolation + 51, // 34: builder.v1.StreamBuildLogsResponse.timestamp:type_name -> google.protobuf.Timestamp + 50, // 35: builder.v1.StreamBuildLogsResponse.metadata:type_name -> builder.v1.StreamBuildLogsResponse.MetadataEntry + 21, // 36: builder.v1.CreateBuildRequest.config:type_name -> builder.v1.BuildConfig + 0, // 37: builder.v1.CreateBuildResponse.state:type_name -> builder.v1.BuildState + 51, // 38: builder.v1.CreateBuildResponse.created_at:type_name -> google.protobuf.Timestamp + 25, // 39: builder.v1.GetBuildResponse.build:type_name -> builder.v1.BuildJob + 0, // 40: builder.v1.ListBuildsRequest.state_filter:type_name -> builder.v1.BuildState + 25, // 41: builder.v1.ListBuildsResponse.builds:type_name -> builder.v1.BuildJob + 0, // 42: builder.v1.CancelBuildResponse.state:type_name -> builder.v1.BuildState + 20, // 43: builder.v1.GetTenantQuotasResponse.current_limits:type_name -> builder.v1.TenantResourceLimits + 27, // 44: builder.v1.GetTenantQuotasResponse.current_usage:type_name -> builder.v1.TenantUsageStats + 28, // 45: builder.v1.GetTenantQuotasResponse.violations:type_name -> builder.v1.QuotaViolation + 51, // 46: builder.v1.GetBuildStatsRequest.start_time:type_name -> google.protobuf.Timestamp + 51, // 47: builder.v1.GetBuildStatsRequest.end_time:type_name -> google.protobuf.Timestamp + 25, // 48: builder.v1.GetBuildStatsResponse.recent_builds:type_name -> builder.v1.BuildJob + 29, // 49: builder.v1.BuilderService.CreateBuild:input_type -> builder.v1.CreateBuildRequest + 31, // 50: builder.v1.BuilderService.GetBuild:input_type -> builder.v1.GetBuildRequest + 33, // 51: builder.v1.BuilderService.ListBuilds:input_type -> builder.v1.ListBuildsRequest + 35, // 52: builder.v1.BuilderService.CancelBuild:input_type -> builder.v1.CancelBuildRequest + 37, // 53: builder.v1.BuilderService.DeleteBuild:input_type -> builder.v1.DeleteBuildRequest + 39, // 54: builder.v1.BuilderService.StreamBuildLogs:input_type -> builder.v1.StreamBuildLogsRequest + 40, // 55: builder.v1.BuilderService.GetTenantQuotas:input_type -> builder.v1.GetTenantQuotasRequest + 42, // 56: builder.v1.BuilderService.GetBuildStats:input_type -> builder.v1.GetBuildStatsRequest + 30, // 57: builder.v1.BuilderService.CreateBuild:output_type -> builder.v1.CreateBuildResponse + 32, // 58: builder.v1.BuilderService.GetBuild:output_type -> builder.v1.GetBuildResponse + 34, // 59: builder.v1.BuilderService.ListBuilds:output_type -> builder.v1.ListBuildsResponse + 36, // 60: builder.v1.BuilderService.CancelBuild:output_type -> builder.v1.CancelBuildResponse + 38, // 61: builder.v1.BuilderService.DeleteBuild:output_type -> builder.v1.DeleteBuildResponse + 26, // 62: builder.v1.BuilderService.StreamBuildLogs:output_type -> builder.v1.StreamBuildLogsResponse + 41, // 63: builder.v1.BuilderService.GetTenantQuotas:output_type -> builder.v1.GetTenantQuotasResponse + 43, // 64: builder.v1.BuilderService.GetBuildStats:output_type -> builder.v1.GetBuildStatsResponse + 57, // [57:65] is the sub-list for method output_type + 49, // [49:57] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name +} + +func init() { file_deploy_builderd_proto_builder_v1_builder_proto_init() } +func file_deploy_builderd_proto_builder_v1_builder_proto_init() { + if File_deploy_builderd_proto_builder_v1_builder_proto != nil { + return + } + file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[1].OneofWrappers = []any{ + (*BuildSource_DockerImage)(nil), + (*BuildSource_GitRepository)(nil), + (*BuildSource_Archive)(nil), + } + file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[7].OneofWrappers = []any{ + (*BuildTarget_MicrovmRootfs)(nil), + (*BuildTarget_ContainerImage)(nil), + } + file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes[12].OneofWrappers = []any{ + (*BuildStrategy_DockerExtract)(nil), + (*BuildStrategy_GoApi)(nil), + (*BuildStrategy_Sinatra)(nil), + (*BuildStrategy_Nodejs)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_deploy_builderd_proto_builder_v1_builder_proto_rawDesc), len(file_deploy_builderd_proto_builder_v1_builder_proto_rawDesc)), + NumEnums: 3, + NumMessages: 48, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_deploy_builderd_proto_builder_v1_builder_proto_goTypes, + DependencyIndexes: file_deploy_builderd_proto_builder_v1_builder_proto_depIdxs, + EnumInfos: file_deploy_builderd_proto_builder_v1_builder_proto_enumTypes, + MessageInfos: file_deploy_builderd_proto_builder_v1_builder_proto_msgTypes, + }.Build() + File_deploy_builderd_proto_builder_v1_builder_proto = out.File + file_deploy_builderd_proto_builder_v1_builder_proto_goTypes = nil + file_deploy_builderd_proto_builder_v1_builder_proto_depIdxs = nil +} diff --git a/go/gen/deploy/builderd/proto/builder/v1/builderv1connect/builder.connect.go b/go/gen/deploy/builderd/proto/builder/v1/builderv1connect/builder.connect.go new file mode 100644 index 0000000000..b317edf9c8 --- /dev/null +++ b/go/gen/deploy/builderd/proto/builder/v1/builderv1connect/builder.connect.go @@ -0,0 +1,338 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: deploy/builderd/proto/builder/v1/builder.proto + +package builderv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/unkeyed/unkey/go/deploy/builderd/gen/builder/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // BuilderServiceName is the fully-qualified name of the BuilderService service. + BuilderServiceName = "builder.v1.BuilderService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // BuilderServiceCreateBuildProcedure is the fully-qualified name of the BuilderService's + // CreateBuild RPC. + BuilderServiceCreateBuildProcedure = "/builder.v1.BuilderService/CreateBuild" + // BuilderServiceGetBuildProcedure is the fully-qualified name of the BuilderService's GetBuild RPC. + BuilderServiceGetBuildProcedure = "/builder.v1.BuilderService/GetBuild" + // BuilderServiceListBuildsProcedure is the fully-qualified name of the BuilderService's ListBuilds + // RPC. + BuilderServiceListBuildsProcedure = "/builder.v1.BuilderService/ListBuilds" + // BuilderServiceCancelBuildProcedure is the fully-qualified name of the BuilderService's + // CancelBuild RPC. + BuilderServiceCancelBuildProcedure = "/builder.v1.BuilderService/CancelBuild" + // BuilderServiceDeleteBuildProcedure is the fully-qualified name of the BuilderService's + // DeleteBuild RPC. + BuilderServiceDeleteBuildProcedure = "/builder.v1.BuilderService/DeleteBuild" + // BuilderServiceStreamBuildLogsProcedure is the fully-qualified name of the BuilderService's + // StreamBuildLogs RPC. + BuilderServiceStreamBuildLogsProcedure = "/builder.v1.BuilderService/StreamBuildLogs" + // BuilderServiceGetTenantQuotasProcedure is the fully-qualified name of the BuilderService's + // GetTenantQuotas RPC. + BuilderServiceGetTenantQuotasProcedure = "/builder.v1.BuilderService/GetTenantQuotas" + // BuilderServiceGetBuildStatsProcedure is the fully-qualified name of the BuilderService's + // GetBuildStats RPC. + BuilderServiceGetBuildStatsProcedure = "/builder.v1.BuilderService/GetBuildStats" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + builderServiceServiceDescriptor = v1.File_deploy_builderd_proto_builder_v1_builder_proto.Services().ByName("BuilderService") + builderServiceCreateBuildMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("CreateBuild") + builderServiceGetBuildMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("GetBuild") + builderServiceListBuildsMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("ListBuilds") + builderServiceCancelBuildMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("CancelBuild") + builderServiceDeleteBuildMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("DeleteBuild") + builderServiceStreamBuildLogsMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("StreamBuildLogs") + builderServiceGetTenantQuotasMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("GetTenantQuotas") + builderServiceGetBuildStatsMethodDescriptor = builderServiceServiceDescriptor.Methods().ByName("GetBuildStats") +) + +// BuilderServiceClient is a client for the builder.v1.BuilderService service. +type BuilderServiceClient interface { + // Create a new build job + CreateBuild(context.Context, *connect.Request[v1.CreateBuildRequest]) (*connect.Response[v1.CreateBuildResponse], error) + // Get build status and progress + GetBuild(context.Context, *connect.Request[v1.GetBuildRequest]) (*connect.Response[v1.GetBuildResponse], error) + // List builds with filtering (tenant-scoped) + ListBuilds(context.Context, *connect.Request[v1.ListBuildsRequest]) (*connect.Response[v1.ListBuildsResponse], error) + // Cancel a running build + CancelBuild(context.Context, *connect.Request[v1.CancelBuildRequest]) (*connect.Response[v1.CancelBuildResponse], error) + // Delete a build and its artifacts + DeleteBuild(context.Context, *connect.Request[v1.DeleteBuildRequest]) (*connect.Response[v1.DeleteBuildResponse], error) + // Stream build logs in real-time + StreamBuildLogs(context.Context, *connect.Request[v1.StreamBuildLogsRequest]) (*connect.ServerStreamForClient[v1.StreamBuildLogsResponse], error) + // Get tenant quotas and usage + GetTenantQuotas(context.Context, *connect.Request[v1.GetTenantQuotasRequest]) (*connect.Response[v1.GetTenantQuotasResponse], error) + // Get build statistics + GetBuildStats(context.Context, *connect.Request[v1.GetBuildStatsRequest]) (*connect.Response[v1.GetBuildStatsResponse], error) +} + +// NewBuilderServiceClient constructs a client for the builder.v1.BuilderService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewBuilderServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) BuilderServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &builderServiceClient{ + createBuild: connect.NewClient[v1.CreateBuildRequest, v1.CreateBuildResponse]( + httpClient, + baseURL+BuilderServiceCreateBuildProcedure, + connect.WithSchema(builderServiceCreateBuildMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getBuild: connect.NewClient[v1.GetBuildRequest, v1.GetBuildResponse]( + httpClient, + baseURL+BuilderServiceGetBuildProcedure, + connect.WithSchema(builderServiceGetBuildMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listBuilds: connect.NewClient[v1.ListBuildsRequest, v1.ListBuildsResponse]( + httpClient, + baseURL+BuilderServiceListBuildsProcedure, + connect.WithSchema(builderServiceListBuildsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + cancelBuild: connect.NewClient[v1.CancelBuildRequest, v1.CancelBuildResponse]( + httpClient, + baseURL+BuilderServiceCancelBuildProcedure, + connect.WithSchema(builderServiceCancelBuildMethodDescriptor), + connect.WithClientOptions(opts...), + ), + deleteBuild: connect.NewClient[v1.DeleteBuildRequest, v1.DeleteBuildResponse]( + httpClient, + baseURL+BuilderServiceDeleteBuildProcedure, + connect.WithSchema(builderServiceDeleteBuildMethodDescriptor), + connect.WithClientOptions(opts...), + ), + streamBuildLogs: connect.NewClient[v1.StreamBuildLogsRequest, v1.StreamBuildLogsResponse]( + httpClient, + baseURL+BuilderServiceStreamBuildLogsProcedure, + connect.WithSchema(builderServiceStreamBuildLogsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getTenantQuotas: connect.NewClient[v1.GetTenantQuotasRequest, v1.GetTenantQuotasResponse]( + httpClient, + baseURL+BuilderServiceGetTenantQuotasProcedure, + connect.WithSchema(builderServiceGetTenantQuotasMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getBuildStats: connect.NewClient[v1.GetBuildStatsRequest, v1.GetBuildStatsResponse]( + httpClient, + baseURL+BuilderServiceGetBuildStatsProcedure, + connect.WithSchema(builderServiceGetBuildStatsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// builderServiceClient implements BuilderServiceClient. +type builderServiceClient struct { + createBuild *connect.Client[v1.CreateBuildRequest, v1.CreateBuildResponse] + getBuild *connect.Client[v1.GetBuildRequest, v1.GetBuildResponse] + listBuilds *connect.Client[v1.ListBuildsRequest, v1.ListBuildsResponse] + cancelBuild *connect.Client[v1.CancelBuildRequest, v1.CancelBuildResponse] + deleteBuild *connect.Client[v1.DeleteBuildRequest, v1.DeleteBuildResponse] + streamBuildLogs *connect.Client[v1.StreamBuildLogsRequest, v1.StreamBuildLogsResponse] + getTenantQuotas *connect.Client[v1.GetTenantQuotasRequest, v1.GetTenantQuotasResponse] + getBuildStats *connect.Client[v1.GetBuildStatsRequest, v1.GetBuildStatsResponse] +} + +// CreateBuild calls builder.v1.BuilderService.CreateBuild. +func (c *builderServiceClient) CreateBuild(ctx context.Context, req *connect.Request[v1.CreateBuildRequest]) (*connect.Response[v1.CreateBuildResponse], error) { + return c.createBuild.CallUnary(ctx, req) +} + +// GetBuild calls builder.v1.BuilderService.GetBuild. +func (c *builderServiceClient) GetBuild(ctx context.Context, req *connect.Request[v1.GetBuildRequest]) (*connect.Response[v1.GetBuildResponse], error) { + return c.getBuild.CallUnary(ctx, req) +} + +// ListBuilds calls builder.v1.BuilderService.ListBuilds. +func (c *builderServiceClient) ListBuilds(ctx context.Context, req *connect.Request[v1.ListBuildsRequest]) (*connect.Response[v1.ListBuildsResponse], error) { + return c.listBuilds.CallUnary(ctx, req) +} + +// CancelBuild calls builder.v1.BuilderService.CancelBuild. +func (c *builderServiceClient) CancelBuild(ctx context.Context, req *connect.Request[v1.CancelBuildRequest]) (*connect.Response[v1.CancelBuildResponse], error) { + return c.cancelBuild.CallUnary(ctx, req) +} + +// DeleteBuild calls builder.v1.BuilderService.DeleteBuild. +func (c *builderServiceClient) DeleteBuild(ctx context.Context, req *connect.Request[v1.DeleteBuildRequest]) (*connect.Response[v1.DeleteBuildResponse], error) { + return c.deleteBuild.CallUnary(ctx, req) +} + +// StreamBuildLogs calls builder.v1.BuilderService.StreamBuildLogs. +func (c *builderServiceClient) StreamBuildLogs(ctx context.Context, req *connect.Request[v1.StreamBuildLogsRequest]) (*connect.ServerStreamForClient[v1.StreamBuildLogsResponse], error) { + return c.streamBuildLogs.CallServerStream(ctx, req) +} + +// GetTenantQuotas calls builder.v1.BuilderService.GetTenantQuotas. +func (c *builderServiceClient) GetTenantQuotas(ctx context.Context, req *connect.Request[v1.GetTenantQuotasRequest]) (*connect.Response[v1.GetTenantQuotasResponse], error) { + return c.getTenantQuotas.CallUnary(ctx, req) +} + +// GetBuildStats calls builder.v1.BuilderService.GetBuildStats. +func (c *builderServiceClient) GetBuildStats(ctx context.Context, req *connect.Request[v1.GetBuildStatsRequest]) (*connect.Response[v1.GetBuildStatsResponse], error) { + return c.getBuildStats.CallUnary(ctx, req) +} + +// BuilderServiceHandler is an implementation of the builder.v1.BuilderService service. +type BuilderServiceHandler interface { + // Create a new build job + CreateBuild(context.Context, *connect.Request[v1.CreateBuildRequest]) (*connect.Response[v1.CreateBuildResponse], error) + // Get build status and progress + GetBuild(context.Context, *connect.Request[v1.GetBuildRequest]) (*connect.Response[v1.GetBuildResponse], error) + // List builds with filtering (tenant-scoped) + ListBuilds(context.Context, *connect.Request[v1.ListBuildsRequest]) (*connect.Response[v1.ListBuildsResponse], error) + // Cancel a running build + CancelBuild(context.Context, *connect.Request[v1.CancelBuildRequest]) (*connect.Response[v1.CancelBuildResponse], error) + // Delete a build and its artifacts + DeleteBuild(context.Context, *connect.Request[v1.DeleteBuildRequest]) (*connect.Response[v1.DeleteBuildResponse], error) + // Stream build logs in real-time + StreamBuildLogs(context.Context, *connect.Request[v1.StreamBuildLogsRequest], *connect.ServerStream[v1.StreamBuildLogsResponse]) error + // Get tenant quotas and usage + GetTenantQuotas(context.Context, *connect.Request[v1.GetTenantQuotasRequest]) (*connect.Response[v1.GetTenantQuotasResponse], error) + // Get build statistics + GetBuildStats(context.Context, *connect.Request[v1.GetBuildStatsRequest]) (*connect.Response[v1.GetBuildStatsResponse], error) +} + +// NewBuilderServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewBuilderServiceHandler(svc BuilderServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + builderServiceCreateBuildHandler := connect.NewUnaryHandler( + BuilderServiceCreateBuildProcedure, + svc.CreateBuild, + connect.WithSchema(builderServiceCreateBuildMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceGetBuildHandler := connect.NewUnaryHandler( + BuilderServiceGetBuildProcedure, + svc.GetBuild, + connect.WithSchema(builderServiceGetBuildMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceListBuildsHandler := connect.NewUnaryHandler( + BuilderServiceListBuildsProcedure, + svc.ListBuilds, + connect.WithSchema(builderServiceListBuildsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceCancelBuildHandler := connect.NewUnaryHandler( + BuilderServiceCancelBuildProcedure, + svc.CancelBuild, + connect.WithSchema(builderServiceCancelBuildMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceDeleteBuildHandler := connect.NewUnaryHandler( + BuilderServiceDeleteBuildProcedure, + svc.DeleteBuild, + connect.WithSchema(builderServiceDeleteBuildMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceStreamBuildLogsHandler := connect.NewServerStreamHandler( + BuilderServiceStreamBuildLogsProcedure, + svc.StreamBuildLogs, + connect.WithSchema(builderServiceStreamBuildLogsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceGetTenantQuotasHandler := connect.NewUnaryHandler( + BuilderServiceGetTenantQuotasProcedure, + svc.GetTenantQuotas, + connect.WithSchema(builderServiceGetTenantQuotasMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + builderServiceGetBuildStatsHandler := connect.NewUnaryHandler( + BuilderServiceGetBuildStatsProcedure, + svc.GetBuildStats, + connect.WithSchema(builderServiceGetBuildStatsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/builder.v1.BuilderService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case BuilderServiceCreateBuildProcedure: + builderServiceCreateBuildHandler.ServeHTTP(w, r) + case BuilderServiceGetBuildProcedure: + builderServiceGetBuildHandler.ServeHTTP(w, r) + case BuilderServiceListBuildsProcedure: + builderServiceListBuildsHandler.ServeHTTP(w, r) + case BuilderServiceCancelBuildProcedure: + builderServiceCancelBuildHandler.ServeHTTP(w, r) + case BuilderServiceDeleteBuildProcedure: + builderServiceDeleteBuildHandler.ServeHTTP(w, r) + case BuilderServiceStreamBuildLogsProcedure: + builderServiceStreamBuildLogsHandler.ServeHTTP(w, r) + case BuilderServiceGetTenantQuotasProcedure: + builderServiceGetTenantQuotasHandler.ServeHTTP(w, r) + case BuilderServiceGetBuildStatsProcedure: + builderServiceGetBuildStatsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedBuilderServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedBuilderServiceHandler struct{} + +func (UnimplementedBuilderServiceHandler) CreateBuild(context.Context, *connect.Request[v1.CreateBuildRequest]) (*connect.Response[v1.CreateBuildResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.CreateBuild is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) GetBuild(context.Context, *connect.Request[v1.GetBuildRequest]) (*connect.Response[v1.GetBuildResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.GetBuild is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) ListBuilds(context.Context, *connect.Request[v1.ListBuildsRequest]) (*connect.Response[v1.ListBuildsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.ListBuilds is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) CancelBuild(context.Context, *connect.Request[v1.CancelBuildRequest]) (*connect.Response[v1.CancelBuildResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.CancelBuild is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) DeleteBuild(context.Context, *connect.Request[v1.DeleteBuildRequest]) (*connect.Response[v1.DeleteBuildResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.DeleteBuild is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) StreamBuildLogs(context.Context, *connect.Request[v1.StreamBuildLogsRequest], *connect.ServerStream[v1.StreamBuildLogsResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.StreamBuildLogs is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) GetTenantQuotas(context.Context, *connect.Request[v1.GetTenantQuotasRequest]) (*connect.Response[v1.GetTenantQuotasResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.GetTenantQuotas is not implemented")) +} + +func (UnimplementedBuilderServiceHandler) GetBuildStats(context.Context, *connect.Request[v1.GetBuildStatsRequest]) (*connect.Response[v1.GetBuildStatsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("builder.v1.BuilderService.GetBuildStats is not implemented")) +} diff --git a/go/deploy/metald/gen/vmprovisioner/v1/vm.pb.go b/go/gen/deploy/metald/proto/vmprovisioner/v1/vm.pb.go similarity index 88% rename from go/deploy/metald/gen/vmprovisioner/v1/vm.pb.go rename to go/gen/deploy/metald/proto/vmprovisioner/v1/vm.pb.go index d88ecc763c..0c366e9041 100644 --- a/go/deploy/metald/gen/vmprovisioner/v1/vm.pb.go +++ b/go/gen/deploy/metald/proto/vmprovisioner/v1/vm.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.36.6 // protoc (unknown) -// source: vmprovisioner/v1/vm.proto +// source: deploy/metald/proto/vmprovisioner/v1/vm.proto package vmprovisionerv1 @@ -61,11 +61,11 @@ func (x VmState) String() string { } func (VmState) Descriptor() protoreflect.EnumDescriptor { - return file_vmprovisioner_v1_vm_proto_enumTypes[0].Descriptor() + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_enumTypes[0].Descriptor() } func (VmState) Type() protoreflect.EnumType { - return &file_vmprovisioner_v1_vm_proto_enumTypes[0] + return &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_enumTypes[0] } func (x VmState) Number() protoreflect.EnumNumber { @@ -74,7 +74,7 @@ func (x VmState) Number() protoreflect.EnumNumber { // Deprecated: Use VmState.Descriptor instead. func (VmState) EnumDescriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{0} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{0} } // Network mode for the interface @@ -114,11 +114,11 @@ func (x NetworkMode) String() string { } func (NetworkMode) Descriptor() protoreflect.EnumDescriptor { - return file_vmprovisioner_v1_vm_proto_enumTypes[1].Descriptor() + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_enumTypes[1].Descriptor() } func (NetworkMode) Type() protoreflect.EnumType { - return &file_vmprovisioner_v1_vm_proto_enumTypes[1] + return &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_enumTypes[1] } func (x NetworkMode) Number() protoreflect.EnumNumber { @@ -127,7 +127,7 @@ func (x NetworkMode) Number() protoreflect.EnumNumber { // Deprecated: Use NetworkMode.Descriptor instead. func (NetworkMode) EnumDescriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{1} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{1} } // Unified VM configuration that works across different hypervisors @@ -153,7 +153,7 @@ type VmConfig struct { func (x *VmConfig) Reset() { *x = VmConfig{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[0] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -165,7 +165,7 @@ func (x *VmConfig) String() string { func (*VmConfig) ProtoMessage() {} func (x *VmConfig) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[0] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -178,7 +178,7 @@ func (x *VmConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use VmConfig.ProtoReflect.Descriptor instead. func (*VmConfig) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{0} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{0} } func (x *VmConfig) GetCpu() *CpuConfig { @@ -246,7 +246,7 @@ type CpuConfig struct { func (x *CpuConfig) Reset() { *x = CpuConfig{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[1] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -258,7 +258,7 @@ func (x *CpuConfig) String() string { func (*CpuConfig) ProtoMessage() {} func (x *CpuConfig) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[1] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -271,7 +271,7 @@ func (x *CpuConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use CpuConfig.ProtoReflect.Descriptor instead. func (*CpuConfig) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{1} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{1} } func (x *CpuConfig) GetVcpuCount() int32 { @@ -313,7 +313,7 @@ type CpuTopology struct { func (x *CpuTopology) Reset() { *x = CpuTopology{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[2] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -325,7 +325,7 @@ func (x *CpuTopology) String() string { func (*CpuTopology) ProtoMessage() {} func (x *CpuTopology) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[2] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -338,7 +338,7 @@ func (x *CpuTopology) ProtoReflect() protoreflect.Message { // Deprecated: Use CpuTopology.ProtoReflect.Descriptor instead. func (*CpuTopology) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{2} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{2} } func (x *CpuTopology) GetSockets() int32 { @@ -378,7 +378,7 @@ type MemoryConfig struct { func (x *MemoryConfig) Reset() { *x = MemoryConfig{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[3] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -390,7 +390,7 @@ func (x *MemoryConfig) String() string { func (*MemoryConfig) ProtoMessage() {} func (x *MemoryConfig) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[3] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -403,7 +403,7 @@ func (x *MemoryConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use MemoryConfig.ProtoReflect.Descriptor instead. func (*MemoryConfig) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{3} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{3} } func (x *MemoryConfig) GetSizeBytes() int64 { @@ -450,7 +450,7 @@ type BootConfig struct { func (x *BootConfig) Reset() { *x = BootConfig{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[4] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -462,7 +462,7 @@ func (x *BootConfig) String() string { func (*BootConfig) ProtoMessage() {} func (x *BootConfig) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[4] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -475,7 +475,7 @@ func (x *BootConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use BootConfig.ProtoReflect.Descriptor instead. func (*BootConfig) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{4} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{4} } func (x *BootConfig) GetKernelPath() string { @@ -526,7 +526,7 @@ type StorageDevice struct { func (x *StorageDevice) Reset() { *x = StorageDevice{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[5] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -538,7 +538,7 @@ func (x *StorageDevice) String() string { func (*StorageDevice) ProtoMessage() {} func (x *StorageDevice) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[5] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -551,7 +551,7 @@ func (x *StorageDevice) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageDevice.ProtoReflect.Descriptor instead. func (*StorageDevice) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{5} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{5} } func (x *StorageDevice) GetId() string { @@ -623,7 +623,7 @@ type NetworkInterface struct { func (x *NetworkInterface) Reset() { *x = NetworkInterface{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[6] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -635,7 +635,7 @@ func (x *NetworkInterface) String() string { func (*NetworkInterface) ProtoMessage() {} func (x *NetworkInterface) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[6] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -648,7 +648,7 @@ func (x *NetworkInterface) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead. func (*NetworkInterface) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{6} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{6} } func (x *NetworkInterface) GetId() string { @@ -735,7 +735,7 @@ type IPv4Config struct { func (x *IPv4Config) Reset() { *x = IPv4Config{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[7] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -747,7 +747,7 @@ func (x *IPv4Config) String() string { func (*IPv4Config) ProtoMessage() {} func (x *IPv4Config) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[7] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -760,7 +760,7 @@ func (x *IPv4Config) ProtoReflect() protoreflect.Message { // Deprecated: Use IPv4Config.ProtoReflect.Descriptor instead. func (*IPv4Config) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{7} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{7} } func (x *IPv4Config) GetAddress() string { @@ -814,7 +814,7 @@ type IPv6Config struct { func (x *IPv6Config) Reset() { *x = IPv6Config{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[8] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -826,7 +826,7 @@ func (x *IPv6Config) String() string { func (*IPv6Config) ProtoMessage() {} func (x *IPv6Config) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[8] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -839,7 +839,7 @@ func (x *IPv6Config) ProtoReflect() protoreflect.Message { // Deprecated: Use IPv6Config.ProtoReflect.Descriptor instead. func (*IPv6Config) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{8} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{8} } func (x *IPv6Config) GetAddress() string { @@ -903,7 +903,7 @@ type RateLimit struct { func (x *RateLimit) Reset() { *x = RateLimit{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[9] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -915,7 +915,7 @@ func (x *RateLimit) String() string { func (*RateLimit) ProtoMessage() {} func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[9] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -928,7 +928,7 @@ func (x *RateLimit) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. func (*RateLimit) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{9} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{9} } func (x *RateLimit) GetBandwidth() int64 { @@ -968,7 +968,7 @@ type ConsoleConfig struct { func (x *ConsoleConfig) Reset() { *x = ConsoleConfig{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[10] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -980,7 +980,7 @@ func (x *ConsoleConfig) String() string { func (*ConsoleConfig) ProtoMessage() {} func (x *ConsoleConfig) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[10] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -993,7 +993,7 @@ func (x *ConsoleConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ConsoleConfig.ProtoReflect.Descriptor instead. func (*ConsoleConfig) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{10} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{10} } func (x *ConsoleConfig) GetEnabled() bool { @@ -1039,7 +1039,7 @@ type CreateVmRequest struct { func (x *CreateVmRequest) Reset() { *x = CreateVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[11] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1051,7 +1051,7 @@ func (x *CreateVmRequest) String() string { func (*CreateVmRequest) ProtoMessage() {} func (x *CreateVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[11] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1064,7 +1064,7 @@ func (x *CreateVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateVmRequest.ProtoReflect.Descriptor instead. func (*CreateVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{11} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{11} } func (x *CreateVmRequest) GetVmId() string { @@ -1100,7 +1100,7 @@ type CreateVmResponse struct { func (x *CreateVmResponse) Reset() { *x = CreateVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[12] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1112,7 +1112,7 @@ func (x *CreateVmResponse) String() string { func (*CreateVmResponse) ProtoMessage() {} func (x *CreateVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[12] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1125,7 +1125,7 @@ func (x *CreateVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateVmResponse.ProtoReflect.Descriptor instead. func (*CreateVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{12} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{12} } func (x *CreateVmResponse) GetVmId() string { @@ -1153,7 +1153,7 @@ type DeleteVmRequest struct { func (x *DeleteVmRequest) Reset() { *x = DeleteVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[13] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1165,7 +1165,7 @@ func (x *DeleteVmRequest) String() string { func (*DeleteVmRequest) ProtoMessage() {} func (x *DeleteVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[13] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1178,7 +1178,7 @@ func (x *DeleteVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteVmRequest.ProtoReflect.Descriptor instead. func (*DeleteVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{13} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{13} } func (x *DeleteVmRequest) GetVmId() string { @@ -1204,7 +1204,7 @@ type DeleteVmResponse struct { func (x *DeleteVmResponse) Reset() { *x = DeleteVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[14] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1216,7 +1216,7 @@ func (x *DeleteVmResponse) String() string { func (*DeleteVmResponse) ProtoMessage() {} func (x *DeleteVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[14] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1229,7 +1229,7 @@ func (x *DeleteVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteVmResponse.ProtoReflect.Descriptor instead. func (*DeleteVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{14} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{14} } func (x *DeleteVmResponse) GetSuccess() bool { @@ -1248,7 +1248,7 @@ type BootVmRequest struct { func (x *BootVmRequest) Reset() { *x = BootVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[15] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1260,7 +1260,7 @@ func (x *BootVmRequest) String() string { func (*BootVmRequest) ProtoMessage() {} func (x *BootVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[15] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1273,7 +1273,7 @@ func (x *BootVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BootVmRequest.ProtoReflect.Descriptor instead. func (*BootVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{15} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{15} } func (x *BootVmRequest) GetVmId() string { @@ -1293,7 +1293,7 @@ type BootVmResponse struct { func (x *BootVmResponse) Reset() { *x = BootVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[16] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1305,7 +1305,7 @@ func (x *BootVmResponse) String() string { func (*BootVmResponse) ProtoMessage() {} func (x *BootVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[16] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1318,7 +1318,7 @@ func (x *BootVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BootVmResponse.ProtoReflect.Descriptor instead. func (*BootVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{16} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{16} } func (x *BootVmResponse) GetSuccess() bool { @@ -1348,7 +1348,7 @@ type ShutdownVmRequest struct { func (x *ShutdownVmRequest) Reset() { *x = ShutdownVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[17] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1360,7 +1360,7 @@ func (x *ShutdownVmRequest) String() string { func (*ShutdownVmRequest) ProtoMessage() {} func (x *ShutdownVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[17] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1373,7 +1373,7 @@ func (x *ShutdownVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ShutdownVmRequest.ProtoReflect.Descriptor instead. func (*ShutdownVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{17} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{17} } func (x *ShutdownVmRequest) GetVmId() string { @@ -1407,7 +1407,7 @@ type ShutdownVmResponse struct { func (x *ShutdownVmResponse) Reset() { *x = ShutdownVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[18] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1419,7 +1419,7 @@ func (x *ShutdownVmResponse) String() string { func (*ShutdownVmResponse) ProtoMessage() {} func (x *ShutdownVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[18] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1432,7 +1432,7 @@ func (x *ShutdownVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ShutdownVmResponse.ProtoReflect.Descriptor instead. func (*ShutdownVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{18} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{18} } func (x *ShutdownVmResponse) GetSuccess() bool { @@ -1458,7 +1458,7 @@ type PauseVmRequest struct { func (x *PauseVmRequest) Reset() { *x = PauseVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[19] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1470,7 +1470,7 @@ func (x *PauseVmRequest) String() string { func (*PauseVmRequest) ProtoMessage() {} func (x *PauseVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[19] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1483,7 +1483,7 @@ func (x *PauseVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PauseVmRequest.ProtoReflect.Descriptor instead. func (*PauseVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{19} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{19} } func (x *PauseVmRequest) GetVmId() string { @@ -1503,7 +1503,7 @@ type PauseVmResponse struct { func (x *PauseVmResponse) Reset() { *x = PauseVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[20] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1515,7 +1515,7 @@ func (x *PauseVmResponse) String() string { func (*PauseVmResponse) ProtoMessage() {} func (x *PauseVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[20] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1528,7 +1528,7 @@ func (x *PauseVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PauseVmResponse.ProtoReflect.Descriptor instead. func (*PauseVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{20} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{20} } func (x *PauseVmResponse) GetSuccess() bool { @@ -1554,7 +1554,7 @@ type ResumeVmRequest struct { func (x *ResumeVmRequest) Reset() { *x = ResumeVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[21] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1566,7 +1566,7 @@ func (x *ResumeVmRequest) String() string { func (*ResumeVmRequest) ProtoMessage() {} func (x *ResumeVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[21] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1579,7 +1579,7 @@ func (x *ResumeVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResumeVmRequest.ProtoReflect.Descriptor instead. func (*ResumeVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{21} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{21} } func (x *ResumeVmRequest) GetVmId() string { @@ -1599,7 +1599,7 @@ type ResumeVmResponse struct { func (x *ResumeVmResponse) Reset() { *x = ResumeVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[22] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1611,7 +1611,7 @@ func (x *ResumeVmResponse) String() string { func (*ResumeVmResponse) ProtoMessage() {} func (x *ResumeVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[22] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1624,7 +1624,7 @@ func (x *ResumeVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResumeVmResponse.ProtoReflect.Descriptor instead. func (*ResumeVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{22} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{22} } func (x *ResumeVmResponse) GetSuccess() bool { @@ -1652,7 +1652,7 @@ type RebootVmRequest struct { func (x *RebootVmRequest) Reset() { *x = RebootVmRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[23] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1664,7 +1664,7 @@ func (x *RebootVmRequest) String() string { func (*RebootVmRequest) ProtoMessage() {} func (x *RebootVmRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[23] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1677,7 +1677,7 @@ func (x *RebootVmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RebootVmRequest.ProtoReflect.Descriptor instead. func (*RebootVmRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{23} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{23} } func (x *RebootVmRequest) GetVmId() string { @@ -1704,7 +1704,7 @@ type RebootVmResponse struct { func (x *RebootVmResponse) Reset() { *x = RebootVmResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[24] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1716,7 +1716,7 @@ func (x *RebootVmResponse) String() string { func (*RebootVmResponse) ProtoMessage() {} func (x *RebootVmResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[24] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1729,7 +1729,7 @@ func (x *RebootVmResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RebootVmResponse.ProtoReflect.Descriptor instead. func (*RebootVmResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{24} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{24} } func (x *RebootVmResponse) GetSuccess() bool { @@ -1755,7 +1755,7 @@ type GetVmInfoRequest struct { func (x *GetVmInfoRequest) Reset() { *x = GetVmInfoRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[25] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1767,7 +1767,7 @@ func (x *GetVmInfoRequest) String() string { func (*GetVmInfoRequest) ProtoMessage() {} func (x *GetVmInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[25] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1780,7 +1780,7 @@ func (x *GetVmInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVmInfoRequest.ProtoReflect.Descriptor instead. func (*GetVmInfoRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{25} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{25} } func (x *GetVmInfoRequest) GetVmId() string { @@ -1806,7 +1806,7 @@ type GetVmInfoResponse struct { func (x *GetVmInfoResponse) Reset() { *x = GetVmInfoResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[26] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1818,7 +1818,7 @@ func (x *GetVmInfoResponse) String() string { func (*GetVmInfoResponse) ProtoMessage() {} func (x *GetVmInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[26] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1831,7 +1831,7 @@ func (x *GetVmInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVmInfoResponse.ProtoReflect.Descriptor instead. func (*GetVmInfoResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{26} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{26} } func (x *GetVmInfoResponse) GetVmId() string { @@ -1888,7 +1888,7 @@ type PortMapping struct { func (x *PortMapping) Reset() { *x = PortMapping{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[27] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1900,7 +1900,7 @@ func (x *PortMapping) String() string { func (*PortMapping) ProtoMessage() {} func (x *PortMapping) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[27] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1913,7 +1913,7 @@ func (x *PortMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use PortMapping.ProtoReflect.Descriptor instead. func (*PortMapping) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{27} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{27} } func (x *PortMapping) GetContainerPort() int32 { @@ -1953,7 +1953,7 @@ type VmNetworkInfo struct { func (x *VmNetworkInfo) Reset() { *x = VmNetworkInfo{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[28] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1965,7 +1965,7 @@ func (x *VmNetworkInfo) String() string { func (*VmNetworkInfo) ProtoMessage() {} func (x *VmNetworkInfo) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[28] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1978,7 +1978,7 @@ func (x *VmNetworkInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use VmNetworkInfo.ProtoReflect.Descriptor instead. func (*VmNetworkInfo) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{28} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{28} } func (x *VmNetworkInfo) GetIpAddress() string { @@ -2048,7 +2048,7 @@ type VmMetrics struct { func (x *VmMetrics) Reset() { *x = VmMetrics{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[29] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2060,7 +2060,7 @@ func (x *VmMetrics) String() string { func (*VmMetrics) ProtoMessage() {} func (x *VmMetrics) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[29] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2073,7 +2073,7 @@ func (x *VmMetrics) ProtoReflect() protoreflect.Message { // Deprecated: Use VmMetrics.ProtoReflect.Descriptor instead. func (*VmMetrics) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{29} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{29} } func (x *VmMetrics) GetCpuUsagePercent() float64 { @@ -2123,7 +2123,7 @@ type NetworkStats struct { func (x *NetworkStats) Reset() { *x = NetworkStats{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[30] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2135,7 +2135,7 @@ func (x *NetworkStats) String() string { func (*NetworkStats) ProtoMessage() {} func (x *NetworkStats) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[30] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2148,7 +2148,7 @@ func (x *NetworkStats) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkStats.ProtoReflect.Descriptor instead. func (*NetworkStats) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{30} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{30} } func (x *NetworkStats) GetBytesReceived() int64 { @@ -2191,7 +2191,7 @@ type StorageStats struct { func (x *StorageStats) Reset() { *x = StorageStats{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[31] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2203,7 +2203,7 @@ func (x *StorageStats) String() string { func (*StorageStats) ProtoMessage() {} func (x *StorageStats) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[31] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2216,7 +2216,7 @@ func (x *StorageStats) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageStats.ProtoReflect.Descriptor instead. func (*StorageStats) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{31} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{31} } func (x *StorageStats) GetBytesRead() int64 { @@ -2260,7 +2260,7 @@ type ListVmsRequest struct { func (x *ListVmsRequest) Reset() { *x = ListVmsRequest{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[32] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2272,7 +2272,7 @@ func (x *ListVmsRequest) String() string { func (*ListVmsRequest) ProtoMessage() {} func (x *ListVmsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[32] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2285,7 +2285,7 @@ func (x *ListVmsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListVmsRequest.ProtoReflect.Descriptor instead. func (*ListVmsRequest) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{32} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{32} } func (x *ListVmsRequest) GetStateFilter() []VmState { @@ -2320,7 +2320,7 @@ type ListVmsResponse struct { func (x *ListVmsResponse) Reset() { *x = ListVmsResponse{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[33] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2332,7 +2332,7 @@ func (x *ListVmsResponse) String() string { func (*ListVmsResponse) ProtoMessage() {} func (x *ListVmsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[33] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2345,7 +2345,7 @@ func (x *ListVmsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListVmsResponse.ProtoReflect.Descriptor instead. func (*ListVmsResponse) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{33} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{33} } func (x *ListVmsResponse) GetVms() []*VmInfo { @@ -2389,7 +2389,7 @@ type VmInfo struct { func (x *VmInfo) Reset() { *x = VmInfo{} - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[34] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2401,7 +2401,7 @@ func (x *VmInfo) String() string { func (*VmInfo) ProtoMessage() {} func (x *VmInfo) ProtoReflect() protoreflect.Message { - mi := &file_vmprovisioner_v1_vm_proto_msgTypes[34] + mi := &file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2414,7 +2414,7 @@ func (x *VmInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use VmInfo.ProtoReflect.Descriptor instead. func (*VmInfo) Descriptor() ([]byte, []int) { - return file_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{34} + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP(), []int{34} } func (x *VmInfo) GetVmId() string { @@ -2473,11 +2473,11 @@ func (x *VmInfo) GetCustomerId() string { return "" } -var File_vmprovisioner_v1_vm_proto protoreflect.FileDescriptor +var File_deploy_metald_proto_vmprovisioner_v1_vm_proto protoreflect.FileDescriptor -const file_vmprovisioner_v1_vm_proto_rawDesc = "" + +const file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDesc = "" + "\n" + - "\x19vmprovisioner/v1/vm.proto\x12\x10vmprovisioner.v1\"\xda\x03\n" + + "-deploy/metald/proto/vmprovisioner/v1/vm.proto\x12\x10vmprovisioner.v1\"\xda\x03\n" + "\bVmConfig\x12-\n" + "\x03cpu\x18\x01 \x01(\v2\x1b.vmprovisioner.v1.CpuConfigR\x03cpu\x126\n" + "\x06memory\x18\x02 \x01(\v2\x1e.vmprovisioner.v1.MemoryConfigR\x06memory\x120\n" + @@ -2712,24 +2712,23 @@ const file_vmprovisioner_v1_vm_proto_rawDesc = "" + "\bResumeVm\x12!.vmprovisioner.v1.ResumeVmRequest\x1a\".vmprovisioner.v1.ResumeVmResponse\x12Q\n" + "\bRebootVm\x12!.vmprovisioner.v1.RebootVmRequest\x1a\".vmprovisioner.v1.RebootVmResponse\x12T\n" + "\tGetVmInfo\x12\".vmprovisioner.v1.GetVmInfoRequest\x1a#.vmprovisioner.v1.GetVmInfoResponse\x12N\n" + - "\aListVms\x12 .vmprovisioner.v1.ListVmsRequest\x1a!.vmprovisioner.v1.ListVmsResponseB\xd0\x01\n" + - "\x14com.vmprovisioner.v1B\aVmProtoP\x01ZNgithub.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1;vmprovisionerv1\xa2\x02\x03VXX\xaa\x02\x10Vmprovisioner.V1\xca\x02\x10Vmprovisioner\\V1\xe2\x02\x1cVmprovisioner\\V1\\GPBMetadata\xea\x02\x11Vmprovisioner::V1b\x06proto3" + "\aListVms\x12 .vmprovisioner.v1.ListVmsRequest\x1a!.vmprovisioner.v1.ListVmsResponseB-Z+metald/gen/vmprovisioner/v1;vmprovisionerv1b\x06proto3" var ( - file_vmprovisioner_v1_vm_proto_rawDescOnce sync.Once - file_vmprovisioner_v1_vm_proto_rawDescData []byte + file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescOnce sync.Once + file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescData []byte ) -func file_vmprovisioner_v1_vm_proto_rawDescGZIP() []byte { - file_vmprovisioner_v1_vm_proto_rawDescOnce.Do(func() { - file_vmprovisioner_v1_vm_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_vmprovisioner_v1_vm_proto_rawDesc), len(file_vmprovisioner_v1_vm_proto_rawDesc))) +func file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescGZIP() []byte { + file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescOnce.Do(func() { + file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDesc), len(file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDesc))) }) - return file_vmprovisioner_v1_vm_proto_rawDescData + return file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDescData } -var file_vmprovisioner_v1_vm_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_vmprovisioner_v1_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 43) -var file_vmprovisioner_v1_vm_proto_goTypes = []any{ +var file_deploy_metald_proto_vmprovisioner_v1_vm_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_deploy_metald_proto_vmprovisioner_v1_vm_proto_goTypes = []any{ (VmState)(0), // 0: vmprovisioner.v1.VmState (NetworkMode)(0), // 1: vmprovisioner.v1.NetworkMode (*VmConfig)(nil), // 2: vmprovisioner.v1.VmConfig @@ -2776,7 +2775,7 @@ var file_vmprovisioner_v1_vm_proto_goTypes = []any{ nil, // 43: vmprovisioner.v1.GetVmInfoResponse.BackendInfoEntry nil, // 44: vmprovisioner.v1.VmInfo.MetadataEntry } -var file_vmprovisioner_v1_vm_proto_depIdxs = []int32{ +var file_deploy_metald_proto_vmprovisioner_v1_vm_proto_depIdxs = []int32{ 3, // 0: vmprovisioner.v1.VmConfig.cpu:type_name -> vmprovisioner.v1.CpuConfig 5, // 1: vmprovisioner.v1.VmConfig.memory:type_name -> vmprovisioner.v1.MemoryConfig 6, // 2: vmprovisioner.v1.VmConfig.boot:type_name -> vmprovisioner.v1.BootConfig @@ -2839,27 +2838,27 @@ var file_vmprovisioner_v1_vm_proto_depIdxs = []int32{ 0, // [0:37] is the sub-list for field type_name } -func init() { file_vmprovisioner_v1_vm_proto_init() } -func file_vmprovisioner_v1_vm_proto_init() { - if File_vmprovisioner_v1_vm_proto != nil { +func init() { file_deploy_metald_proto_vmprovisioner_v1_vm_proto_init() } +func file_deploy_metald_proto_vmprovisioner_v1_vm_proto_init() { + if File_deploy_metald_proto_vmprovisioner_v1_vm_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_vmprovisioner_v1_vm_proto_rawDesc), len(file_vmprovisioner_v1_vm_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDesc), len(file_deploy_metald_proto_vmprovisioner_v1_vm_proto_rawDesc)), NumEnums: 2, NumMessages: 43, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_vmprovisioner_v1_vm_proto_goTypes, - DependencyIndexes: file_vmprovisioner_v1_vm_proto_depIdxs, - EnumInfos: file_vmprovisioner_v1_vm_proto_enumTypes, - MessageInfos: file_vmprovisioner_v1_vm_proto_msgTypes, + GoTypes: file_deploy_metald_proto_vmprovisioner_v1_vm_proto_goTypes, + DependencyIndexes: file_deploy_metald_proto_vmprovisioner_v1_vm_proto_depIdxs, + EnumInfos: file_deploy_metald_proto_vmprovisioner_v1_vm_proto_enumTypes, + MessageInfos: file_deploy_metald_proto_vmprovisioner_v1_vm_proto_msgTypes, }.Build() - File_vmprovisioner_v1_vm_proto = out.File - file_vmprovisioner_v1_vm_proto_goTypes = nil - file_vmprovisioner_v1_vm_proto_depIdxs = nil + File_deploy_metald_proto_vmprovisioner_v1_vm_proto = out.File + file_deploy_metald_proto_vmprovisioner_v1_vm_proto_goTypes = nil + file_deploy_metald_proto_vmprovisioner_v1_vm_proto_depIdxs = nil } diff --git a/go/deploy/metald/gen/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go b/go/gen/deploy/metald/proto/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go similarity index 88% rename from go/deploy/metald/gen/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go rename to go/gen/deploy/metald/proto/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go index ab68a2039d..1340426a05 100644 --- a/go/deploy/metald/gen/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go +++ b/go/gen/deploy/metald/proto/vmprovisioner/v1/vmprovisionerv1connect/vm.connect.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-connect-go. DO NOT EDIT. // -// Source: vmprovisioner/v1/vm.proto +// Source: deploy/metald/proto/vmprovisioner/v1/vm.proto package vmprovisionerv1connect @@ -8,7 +8,7 @@ import ( connect "connectrpc.com/connect" context "context" errors "errors" - v1 "github.com/unkeyed/unkey/go/deploy/metald/gen/vmprovisioner/v1" + v1 "metald/gen/vmprovisioner/v1" http "net/http" strings "strings" ) @@ -53,6 +53,20 @@ const ( VmServiceListVmsProcedure = "/vmprovisioner.v1.VmService/ListVms" ) +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + vmServiceServiceDescriptor = v1.File_deploy_metald_proto_vmprovisioner_v1_vm_proto.Services().ByName("VmService") + vmServiceCreateVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("CreateVm") + vmServiceDeleteVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("DeleteVm") + vmServiceBootVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("BootVm") + vmServiceShutdownVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("ShutdownVm") + vmServicePauseVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("PauseVm") + vmServiceResumeVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("ResumeVm") + vmServiceRebootVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("RebootVm") + vmServiceGetVmInfoMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("GetVmInfo") + vmServiceListVmsMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("ListVms") +) + // VmServiceClient is a client for the vmprovisioner.v1.VmService service. type VmServiceClient interface { // CreateVm creates a new virtual machine instance @@ -84,60 +98,59 @@ type VmServiceClient interface { // http://api.acme.com or https://acme.com/grpc). func NewVmServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VmServiceClient { baseURL = strings.TrimRight(baseURL, "/") - vmServiceMethods := v1.File_vmprovisioner_v1_vm_proto.Services().ByName("VmService").Methods() return &vmServiceClient{ createVm: connect.NewClient[v1.CreateVmRequest, v1.CreateVmResponse]( httpClient, baseURL+VmServiceCreateVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("CreateVm")), + connect.WithSchema(vmServiceCreateVmMethodDescriptor), connect.WithClientOptions(opts...), ), deleteVm: connect.NewClient[v1.DeleteVmRequest, v1.DeleteVmResponse]( httpClient, baseURL+VmServiceDeleteVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("DeleteVm")), + connect.WithSchema(vmServiceDeleteVmMethodDescriptor), connect.WithClientOptions(opts...), ), bootVm: connect.NewClient[v1.BootVmRequest, v1.BootVmResponse]( httpClient, baseURL+VmServiceBootVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("BootVm")), + connect.WithSchema(vmServiceBootVmMethodDescriptor), connect.WithClientOptions(opts...), ), shutdownVm: connect.NewClient[v1.ShutdownVmRequest, v1.ShutdownVmResponse]( httpClient, baseURL+VmServiceShutdownVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("ShutdownVm")), + connect.WithSchema(vmServiceShutdownVmMethodDescriptor), connect.WithClientOptions(opts...), ), pauseVm: connect.NewClient[v1.PauseVmRequest, v1.PauseVmResponse]( httpClient, baseURL+VmServicePauseVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("PauseVm")), + connect.WithSchema(vmServicePauseVmMethodDescriptor), connect.WithClientOptions(opts...), ), resumeVm: connect.NewClient[v1.ResumeVmRequest, v1.ResumeVmResponse]( httpClient, baseURL+VmServiceResumeVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("ResumeVm")), + connect.WithSchema(vmServiceResumeVmMethodDescriptor), connect.WithClientOptions(opts...), ), rebootVm: connect.NewClient[v1.RebootVmRequest, v1.RebootVmResponse]( httpClient, baseURL+VmServiceRebootVmProcedure, - connect.WithSchema(vmServiceMethods.ByName("RebootVm")), + connect.WithSchema(vmServiceRebootVmMethodDescriptor), connect.WithClientOptions(opts...), ), getVmInfo: connect.NewClient[v1.GetVmInfoRequest, v1.GetVmInfoResponse]( httpClient, baseURL+VmServiceGetVmInfoProcedure, - connect.WithSchema(vmServiceMethods.ByName("GetVmInfo")), + connect.WithSchema(vmServiceGetVmInfoMethodDescriptor), connect.WithClientOptions(opts...), ), listVms: connect.NewClient[v1.ListVmsRequest, v1.ListVmsResponse]( httpClient, baseURL+VmServiceListVmsProcedure, - connect.WithSchema(vmServiceMethods.ByName("ListVms")), + connect.WithSchema(vmServiceListVmsMethodDescriptor), connect.WithClientOptions(opts...), ), } @@ -229,59 +242,58 @@ type VmServiceHandler interface { // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. func NewVmServiceHandler(svc VmServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { - vmServiceMethods := v1.File_vmprovisioner_v1_vm_proto.Services().ByName("VmService").Methods() vmServiceCreateVmHandler := connect.NewUnaryHandler( VmServiceCreateVmProcedure, svc.CreateVm, - connect.WithSchema(vmServiceMethods.ByName("CreateVm")), + connect.WithSchema(vmServiceCreateVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceDeleteVmHandler := connect.NewUnaryHandler( VmServiceDeleteVmProcedure, svc.DeleteVm, - connect.WithSchema(vmServiceMethods.ByName("DeleteVm")), + connect.WithSchema(vmServiceDeleteVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceBootVmHandler := connect.NewUnaryHandler( VmServiceBootVmProcedure, svc.BootVm, - connect.WithSchema(vmServiceMethods.ByName("BootVm")), + connect.WithSchema(vmServiceBootVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceShutdownVmHandler := connect.NewUnaryHandler( VmServiceShutdownVmProcedure, svc.ShutdownVm, - connect.WithSchema(vmServiceMethods.ByName("ShutdownVm")), + connect.WithSchema(vmServiceShutdownVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServicePauseVmHandler := connect.NewUnaryHandler( VmServicePauseVmProcedure, svc.PauseVm, - connect.WithSchema(vmServiceMethods.ByName("PauseVm")), + connect.WithSchema(vmServicePauseVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceResumeVmHandler := connect.NewUnaryHandler( VmServiceResumeVmProcedure, svc.ResumeVm, - connect.WithSchema(vmServiceMethods.ByName("ResumeVm")), + connect.WithSchema(vmServiceResumeVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceRebootVmHandler := connect.NewUnaryHandler( VmServiceRebootVmProcedure, svc.RebootVm, - connect.WithSchema(vmServiceMethods.ByName("RebootVm")), + connect.WithSchema(vmServiceRebootVmMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceGetVmInfoHandler := connect.NewUnaryHandler( VmServiceGetVmInfoProcedure, svc.GetVmInfo, - connect.WithSchema(vmServiceMethods.ByName("GetVmInfo")), + connect.WithSchema(vmServiceGetVmInfoMethodDescriptor), connect.WithHandlerOptions(opts...), ) vmServiceListVmsHandler := connect.NewUnaryHandler( VmServiceListVmsProcedure, svc.ListVms, - connect.WithSchema(vmServiceMethods.ByName("ListVms")), + connect.WithSchema(vmServiceListVmsMethodDescriptor), connect.WithHandlerOptions(opts...), ) return "/vmprovisioner.v1.VmService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/go/gen/proto/metal/vmprovisioner/v1/vmprovisioner.pb.go b/go/gen/proto/metal/vmprovisioner/v1/vmprovisioner.pb.go new file mode 100644 index 0000000000..e8555fec2b --- /dev/null +++ b/go/gen/proto/metal/vmprovisioner/v1/vmprovisioner.pb.go @@ -0,0 +1,2864 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc (unknown) +// source: proto/metal/vmprovisioner/v1/vmprovisioner.proto + +package vmprovisionerv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// VM lifecycle states +type VmState int32 + +const ( + VmState_VM_STATE_UNSPECIFIED VmState = 0 + VmState_VM_STATE_CREATED VmState = 1 + VmState_VM_STATE_RUNNING VmState = 2 + VmState_VM_STATE_PAUSED VmState = 3 + VmState_VM_STATE_SHUTDOWN VmState = 4 +) + +// Enum value maps for VmState. +var ( + VmState_name = map[int32]string{ + 0: "VM_STATE_UNSPECIFIED", + 1: "VM_STATE_CREATED", + 2: "VM_STATE_RUNNING", + 3: "VM_STATE_PAUSED", + 4: "VM_STATE_SHUTDOWN", + } + VmState_value = map[string]int32{ + "VM_STATE_UNSPECIFIED": 0, + "VM_STATE_CREATED": 1, + "VM_STATE_RUNNING": 2, + "VM_STATE_PAUSED": 3, + "VM_STATE_SHUTDOWN": 4, + } +) + +func (x VmState) Enum() *VmState { + p := new(VmState) + *p = x + return p +} + +func (x VmState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VmState) Descriptor() protoreflect.EnumDescriptor { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_enumTypes[0].Descriptor() +} + +func (VmState) Type() protoreflect.EnumType { + return &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_enumTypes[0] +} + +func (x VmState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VmState.Descriptor instead. +func (VmState) EnumDescriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{0} +} + +// Network mode for the interface +type NetworkMode int32 + +const ( + NetworkMode_NETWORK_MODE_UNSPECIFIED NetworkMode = 0 + NetworkMode_NETWORK_MODE_DUAL_STACK NetworkMode = 1 // Both IPv4 and IPv6 + NetworkMode_NETWORK_MODE_IPV4_ONLY NetworkMode = 2 // IPv4 only + NetworkMode_NETWORK_MODE_IPV6_ONLY NetworkMode = 3 // IPv6 only +) + +// Enum value maps for NetworkMode. +var ( + NetworkMode_name = map[int32]string{ + 0: "NETWORK_MODE_UNSPECIFIED", + 1: "NETWORK_MODE_DUAL_STACK", + 2: "NETWORK_MODE_IPV4_ONLY", + 3: "NETWORK_MODE_IPV6_ONLY", + } + NetworkMode_value = map[string]int32{ + "NETWORK_MODE_UNSPECIFIED": 0, + "NETWORK_MODE_DUAL_STACK": 1, + "NETWORK_MODE_IPV4_ONLY": 2, + "NETWORK_MODE_IPV6_ONLY": 3, + } +) + +func (x NetworkMode) Enum() *NetworkMode { + p := new(NetworkMode) + *p = x + return p +} + +func (x NetworkMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NetworkMode) Descriptor() protoreflect.EnumDescriptor { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_enumTypes[1].Descriptor() +} + +func (NetworkMode) Type() protoreflect.EnumType { + return &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_enumTypes[1] +} + +func (x NetworkMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NetworkMode.Descriptor instead. +func (NetworkMode) EnumDescriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{1} +} + +// Unified VM configuration that works across different hypervisors +type VmConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // CPU configuration + Cpu *CpuConfig `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"` + // Memory configuration + Memory *MemoryConfig `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` + // Boot configuration + Boot *BootConfig `protobuf:"bytes,3,opt,name=boot,proto3" json:"boot,omitempty"` + // Storage devices + Storage []*StorageDevice `protobuf:"bytes,4,rep,name=storage,proto3" json:"storage,omitempty"` + // Network interfaces + Network []*NetworkInterface `protobuf:"bytes,5,rep,name=network,proto3" json:"network,omitempty"` + // Console configuration + Console *ConsoleConfig `protobuf:"bytes,6,opt,name=console,proto3" json:"console,omitempty"` + // Metadata and labels + Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VmConfig) Reset() { + *x = VmConfig{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VmConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VmConfig) ProtoMessage() {} + +func (x *VmConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VmConfig.ProtoReflect.Descriptor instead. +func (*VmConfig) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{0} +} + +func (x *VmConfig) GetCpu() *CpuConfig { + if x != nil { + return x.Cpu + } + return nil +} + +func (x *VmConfig) GetMemory() *MemoryConfig { + if x != nil { + return x.Memory + } + return nil +} + +func (x *VmConfig) GetBoot() *BootConfig { + if x != nil { + return x.Boot + } + return nil +} + +func (x *VmConfig) GetStorage() []*StorageDevice { + if x != nil { + return x.Storage + } + return nil +} + +func (x *VmConfig) GetNetwork() []*NetworkInterface { + if x != nil { + return x.Network + } + return nil +} + +func (x *VmConfig) GetConsole() *ConsoleConfig { + if x != nil { + return x.Console + } + return nil +} + +func (x *VmConfig) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +type CpuConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Number of virtual CPUs to allocate at boot + VcpuCount int32 `protobuf:"varint,1,opt,name=vcpu_count,json=vcpuCount,proto3" json:"vcpu_count,omitempty"` + // Maximum number of virtual CPUs (for hotplug) + MaxVcpuCount int32 `protobuf:"varint,2,opt,name=max_vcpu_count,json=maxVcpuCount,proto3" json:"max_vcpu_count,omitempty"` + // CPU topology (optional) + Topology *CpuTopology `protobuf:"bytes,3,opt,name=topology,proto3" json:"topology,omitempty"` + // CPU features and model (backend-specific) + Features map[string]string `protobuf:"bytes,4,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CpuConfig) Reset() { + *x = CpuConfig{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CpuConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CpuConfig) ProtoMessage() {} + +func (x *CpuConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CpuConfig.ProtoReflect.Descriptor instead. +func (*CpuConfig) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{1} +} + +func (x *CpuConfig) GetVcpuCount() int32 { + if x != nil { + return x.VcpuCount + } + return 0 +} + +func (x *CpuConfig) GetMaxVcpuCount() int32 { + if x != nil { + return x.MaxVcpuCount + } + return 0 +} + +func (x *CpuConfig) GetTopology() *CpuTopology { + if x != nil { + return x.Topology + } + return nil +} + +func (x *CpuConfig) GetFeatures() map[string]string { + if x != nil { + return x.Features + } + return nil +} + +type CpuTopology struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sockets int32 `protobuf:"varint,1,opt,name=sockets,proto3" json:"sockets,omitempty"` + CoresPerSocket int32 `protobuf:"varint,2,opt,name=cores_per_socket,json=coresPerSocket,proto3" json:"cores_per_socket,omitempty"` + ThreadsPerCore int32 `protobuf:"varint,3,opt,name=threads_per_core,json=threadsPerCore,proto3" json:"threads_per_core,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CpuTopology) Reset() { + *x = CpuTopology{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CpuTopology) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CpuTopology) ProtoMessage() {} + +func (x *CpuTopology) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CpuTopology.ProtoReflect.Descriptor instead. +func (*CpuTopology) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{2} +} + +func (x *CpuTopology) GetSockets() int32 { + if x != nil { + return x.Sockets + } + return 0 +} + +func (x *CpuTopology) GetCoresPerSocket() int32 { + if x != nil { + return x.CoresPerSocket + } + return 0 +} + +func (x *CpuTopology) GetThreadsPerCore() int32 { + if x != nil { + return x.ThreadsPerCore + } + return 0 +} + +type MemoryConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Memory size in bytes + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Whether memory hotplug is enabled + HotplugEnabled bool `protobuf:"varint,2,opt,name=hotplug_enabled,json=hotplugEnabled,proto3" json:"hotplug_enabled,omitempty"` + // Maximum memory size for hotplug (bytes) + MaxSizeBytes int64 `protobuf:"varint,3,opt,name=max_size_bytes,json=maxSizeBytes,proto3" json:"max_size_bytes,omitempty"` + // Memory backing options (hugepages, etc.) + Backing map[string]string `protobuf:"bytes,4,rep,name=backing,proto3" json:"backing,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoryConfig) Reset() { + *x = MemoryConfig{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryConfig) ProtoMessage() {} + +func (x *MemoryConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoryConfig.ProtoReflect.Descriptor instead. +func (*MemoryConfig) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{3} +} + +func (x *MemoryConfig) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *MemoryConfig) GetHotplugEnabled() bool { + if x != nil { + return x.HotplugEnabled + } + return false +} + +func (x *MemoryConfig) GetMaxSizeBytes() int64 { + if x != nil { + return x.MaxSizeBytes + } + return 0 +} + +func (x *MemoryConfig) GetBacking() map[string]string { + if x != nil { + return x.Backing + } + return nil +} + +type BootConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Path to kernel image + KernelPath string `protobuf:"bytes,1,opt,name=kernel_path,json=kernelPath,proto3" json:"kernel_path,omitempty"` + // Path to initial ramdisk (optional) + InitrdPath string `protobuf:"bytes,2,opt,name=initrd_path,json=initrdPath,proto3" json:"initrd_path,omitempty"` + // Kernel command line arguments + KernelArgs string `protobuf:"bytes,3,opt,name=kernel_args,json=kernelArgs,proto3" json:"kernel_args,omitempty"` + // Boot order and options + BootOptions map[string]string `protobuf:"bytes,4,rep,name=boot_options,json=bootOptions,proto3" json:"boot_options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BootConfig) Reset() { + *x = BootConfig{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BootConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootConfig) ProtoMessage() {} + +func (x *BootConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootConfig.ProtoReflect.Descriptor instead. +func (*BootConfig) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{4} +} + +func (x *BootConfig) GetKernelPath() string { + if x != nil { + return x.KernelPath + } + return "" +} + +func (x *BootConfig) GetInitrdPath() string { + if x != nil { + return x.InitrdPath + } + return "" +} + +func (x *BootConfig) GetKernelArgs() string { + if x != nil { + return x.KernelArgs + } + return "" +} + +func (x *BootConfig) GetBootOptions() map[string]string { + if x != nil { + return x.BootOptions + } + return nil +} + +type StorageDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique identifier for this storage device + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Path to the backing file or block device + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Whether this device is read-only + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Whether this is the root/boot device + IsRootDevice bool `protobuf:"varint,4,opt,name=is_root_device,json=isRootDevice,proto3" json:"is_root_device,omitempty"` + // Storage interface type (virtio-blk, nvme, etc.) + InterfaceType string `protobuf:"bytes,5,opt,name=interface_type,json=interfaceType,proto3" json:"interface_type,omitempty"` + // Additional storage options + Options map[string]string `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StorageDevice) Reset() { + *x = StorageDevice{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StorageDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageDevice) ProtoMessage() {} + +func (x *StorageDevice) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageDevice.ProtoReflect.Descriptor instead. +func (*StorageDevice) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{5} +} + +func (x *StorageDevice) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *StorageDevice) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *StorageDevice) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *StorageDevice) GetIsRootDevice() bool { + if x != nil { + return x.IsRootDevice + } + return false +} + +func (x *StorageDevice) GetInterfaceType() string { + if x != nil { + return x.InterfaceType + } + return "" +} + +func (x *StorageDevice) GetOptions() map[string]string { + if x != nil { + return x.Options + } + return nil +} + +type NetworkInterface struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique identifier for this network interface + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // MAC address (optional, will be generated if not provided) + MacAddress string `protobuf:"bytes,2,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` + // Host-side TAP device name + TapDevice string `protobuf:"bytes,3,opt,name=tap_device,json=tapDevice,proto3" json:"tap_device,omitempty"` + // Network interface type (virtio-net, e1000, etc.) + InterfaceType string `protobuf:"bytes,4,opt,name=interface_type,json=interfaceType,proto3" json:"interface_type,omitempty"` + // Additional network options + Options map[string]string `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // IPv4 configuration (optional) + Ipv4Config *IPv4Config `protobuf:"bytes,6,opt,name=ipv4_config,json=ipv4Config,proto3" json:"ipv4_config,omitempty"` + // IPv6 configuration (optional) + Ipv6Config *IPv6Config `protobuf:"bytes,7,opt,name=ipv6_config,json=ipv6Config,proto3" json:"ipv6_config,omitempty"` + // Network mode + Mode NetworkMode `protobuf:"varint,8,opt,name=mode,proto3,enum=metal.vmprovisioner.v1.NetworkMode" json:"mode,omitempty"` + // Rate limiting + RxRateLimit *RateLimit `protobuf:"bytes,10,opt,name=rx_rate_limit,json=rxRateLimit,proto3" json:"rx_rate_limit,omitempty"` // Receive rate limit + TxRateLimit *RateLimit `protobuf:"bytes,11,opt,name=tx_rate_limit,json=txRateLimit,proto3" json:"tx_rate_limit,omitempty"` // Transmit rate limit + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NetworkInterface) Reset() { + *x = NetworkInterface{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NetworkInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterface) ProtoMessage() {} + +func (x *NetworkInterface) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead. +func (*NetworkInterface) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{6} +} + +func (x *NetworkInterface) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *NetworkInterface) GetMacAddress() string { + if x != nil { + return x.MacAddress + } + return "" +} + +func (x *NetworkInterface) GetTapDevice() string { + if x != nil { + return x.TapDevice + } + return "" +} + +func (x *NetworkInterface) GetInterfaceType() string { + if x != nil { + return x.InterfaceType + } + return "" +} + +func (x *NetworkInterface) GetOptions() map[string]string { + if x != nil { + return x.Options + } + return nil +} + +func (x *NetworkInterface) GetIpv4Config() *IPv4Config { + if x != nil { + return x.Ipv4Config + } + return nil +} + +func (x *NetworkInterface) GetIpv6Config() *IPv6Config { + if x != nil { + return x.Ipv6Config + } + return nil +} + +func (x *NetworkInterface) GetMode() NetworkMode { + if x != nil { + return x.Mode + } + return NetworkMode_NETWORK_MODE_UNSPECIFIED +} + +func (x *NetworkInterface) GetRxRateLimit() *RateLimit { + if x != nil { + return x.RxRateLimit + } + return nil +} + +func (x *NetworkInterface) GetTxRateLimit() *RateLimit { + if x != nil { + return x.TxRateLimit + } + return nil +} + +// IPv4 network configuration +type IPv4Config struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // IPv4 address (e.g., "10.100.1.2") + Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask,omitempty"` // Network mask (e.g., "255.255.255.0") + Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` // Default gateway + DnsServers []string `protobuf:"bytes,4,rep,name=dns_servers,json=dnsServers,proto3" json:"dns_servers,omitempty"` // DNS servers + Dhcp bool `protobuf:"varint,5,opt,name=dhcp,proto3" json:"dhcp,omitempty"` // Use DHCP instead of static config + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IPv4Config) Reset() { + *x = IPv4Config{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IPv4Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4Config) ProtoMessage() {} + +func (x *IPv4Config) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4Config.ProtoReflect.Descriptor instead. +func (*IPv4Config) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{7} +} + +func (x *IPv4Config) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *IPv4Config) GetNetmask() string { + if x != nil { + return x.Netmask + } + return "" +} + +func (x *IPv4Config) GetGateway() string { + if x != nil { + return x.Gateway + } + return "" +} + +func (x *IPv4Config) GetDnsServers() []string { + if x != nil { + return x.DnsServers + } + return nil +} + +func (x *IPv4Config) GetDhcp() bool { + if x != nil { + return x.Dhcp + } + return false +} + +// IPv6 network configuration +type IPv6Config struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // IPv6 address (e.g., "fd00::1:2") + PrefixLength int32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"` // Prefix length (e.g., 64) + Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` // Default gateway + DnsServers []string `protobuf:"bytes,4,rep,name=dns_servers,json=dnsServers,proto3" json:"dns_servers,omitempty"` // DNS servers (IPv6 addresses) + Slaac bool `protobuf:"varint,5,opt,name=slaac,proto3" json:"slaac,omitempty"` // Use SLAAC (Stateless Address Autoconfiguration) + PrivacyExtensions bool `protobuf:"varint,6,opt,name=privacy_extensions,json=privacyExtensions,proto3" json:"privacy_extensions,omitempty"` // Enable privacy extensions + LinkLocal string `protobuf:"bytes,7,opt,name=link_local,json=linkLocal,proto3" json:"link_local,omitempty"` // Link-local address (auto-generated if empty) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IPv6Config) Reset() { + *x = IPv6Config{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IPv6Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv6Config) ProtoMessage() {} + +func (x *IPv6Config) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv6Config.ProtoReflect.Descriptor instead. +func (*IPv6Config) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{8} +} + +func (x *IPv6Config) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *IPv6Config) GetPrefixLength() int32 { + if x != nil { + return x.PrefixLength + } + return 0 +} + +func (x *IPv6Config) GetGateway() string { + if x != nil { + return x.Gateway + } + return "" +} + +func (x *IPv6Config) GetDnsServers() []string { + if x != nil { + return x.DnsServers + } + return nil +} + +func (x *IPv6Config) GetSlaac() bool { + if x != nil { + return x.Slaac + } + return false +} + +func (x *IPv6Config) GetPrivacyExtensions() bool { + if x != nil { + return x.PrivacyExtensions + } + return false +} + +func (x *IPv6Config) GetLinkLocal() string { + if x != nil { + return x.LinkLocal + } + return "" +} + +// Rate limiting configuration +type RateLimit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bandwidth int64 `protobuf:"varint,1,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` // Bandwidth in bytes/second + RefillTime int64 `protobuf:"varint,2,opt,name=refill_time,json=refillTime,proto3" json:"refill_time,omitempty"` // Token bucket refill time in milliseconds + Burst int64 `protobuf:"varint,3,opt,name=burst,proto3" json:"burst,omitempty"` // Burst size in bytes + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RateLimit) Reset() { + *x = RateLimit{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimit) ProtoMessage() {} + +func (x *RateLimit) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. +func (*RateLimit) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{9} +} + +func (x *RateLimit) GetBandwidth() int64 { + if x != nil { + return x.Bandwidth + } + return 0 +} + +func (x *RateLimit) GetRefillTime() int64 { + if x != nil { + return x.RefillTime + } + return 0 +} + +func (x *RateLimit) GetBurst() int64 { + if x != nil { + return x.Burst + } + return 0 +} + +type ConsoleConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether console is enabled + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Console output destination (file path, pty, etc.) + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + // Console input source (optional) + Input string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + // Console type (serial, virtio-console, etc.) + ConsoleType string `protobuf:"bytes,4,opt,name=console_type,json=consoleType,proto3" json:"console_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConsoleConfig) Reset() { + *x = ConsoleConfig{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConsoleConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsoleConfig) ProtoMessage() {} + +func (x *ConsoleConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConsoleConfig.ProtoReflect.Descriptor instead. +func (*ConsoleConfig) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{10} +} + +func (x *ConsoleConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ConsoleConfig) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + +func (x *ConsoleConfig) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *ConsoleConfig) GetConsoleType() string { + if x != nil { + return x.ConsoleType + } + return "" +} + +// Request/Response messages +type CreateVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique identifier for the VM (optional, will be generated if not provided) + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // VM configuration + Config *VmConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + // Customer identifier for billing and isolation + CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateVmRequest) Reset() { + *x = CreateVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateVmRequest) ProtoMessage() {} + +func (x *CreateVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateVmRequest.ProtoReflect.Descriptor instead. +func (*CreateVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *CreateVmRequest) GetConfig() *VmConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *CreateVmRequest) GetCustomerId() string { + if x != nil { + return x.CustomerId + } + return "" +} + +type CreateVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Assigned VM identifier + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // Current VM state after creation + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateVmResponse) Reset() { + *x = CreateVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateVmResponse) ProtoMessage() {} + +func (x *CreateVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateVmResponse.ProtoReflect.Descriptor instead. +func (*CreateVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateVmResponse) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *CreateVmResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +type DeleteVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // Whether to force deletion even if VM is running + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteVmRequest) Reset() { + *x = DeleteVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVmRequest) ProtoMessage() {} + +func (x *DeleteVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVmRequest.ProtoReflect.Descriptor instead. +func (*DeleteVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *DeleteVmRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type DeleteVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteVmResponse) Reset() { + *x = DeleteVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVmResponse) ProtoMessage() {} + +func (x *DeleteVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVmResponse.ProtoReflect.Descriptor instead. +func (*DeleteVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteVmResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type BootVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BootVmRequest) Reset() { + *x = BootVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BootVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootVmRequest) ProtoMessage() {} + +func (x *BootVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootVmRequest.ProtoReflect.Descriptor instead. +func (*BootVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{15} +} + +func (x *BootVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +type BootVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BootVmResponse) Reset() { + *x = BootVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BootVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootVmResponse) ProtoMessage() {} + +func (x *BootVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootVmResponse.ProtoReflect.Descriptor instead. +func (*BootVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{16} +} + +func (x *BootVmResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *BootVmResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +type ShutdownVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // Whether to force shutdown (vs graceful) + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + // Timeout for graceful shutdown (seconds) + TimeoutSeconds int32 `protobuf:"varint,3,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ShutdownVmRequest) Reset() { + *x = ShutdownVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ShutdownVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShutdownVmRequest) ProtoMessage() {} + +func (x *ShutdownVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShutdownVmRequest.ProtoReflect.Descriptor instead. +func (*ShutdownVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{17} +} + +func (x *ShutdownVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *ShutdownVmRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *ShutdownVmRequest) GetTimeoutSeconds() int32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +type ShutdownVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ShutdownVmResponse) Reset() { + *x = ShutdownVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ShutdownVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShutdownVmResponse) ProtoMessage() {} + +func (x *ShutdownVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShutdownVmResponse.ProtoReflect.Descriptor instead. +func (*ShutdownVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{18} +} + +func (x *ShutdownVmResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *ShutdownVmResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +type PauseVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PauseVmRequest) Reset() { + *x = PauseVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PauseVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseVmRequest) ProtoMessage() {} + +func (x *PauseVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseVmRequest.ProtoReflect.Descriptor instead. +func (*PauseVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{19} +} + +func (x *PauseVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +type PauseVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PauseVmResponse) Reset() { + *x = PauseVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PauseVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseVmResponse) ProtoMessage() {} + +func (x *PauseVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseVmResponse.ProtoReflect.Descriptor instead. +func (*PauseVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{20} +} + +func (x *PauseVmResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *PauseVmResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +type ResumeVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResumeVmRequest) Reset() { + *x = ResumeVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResumeVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeVmRequest) ProtoMessage() {} + +func (x *ResumeVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeVmRequest.ProtoReflect.Descriptor instead. +func (*ResumeVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{21} +} + +func (x *ResumeVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +type ResumeVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResumeVmResponse) Reset() { + *x = ResumeVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResumeVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeVmResponse) ProtoMessage() {} + +func (x *ResumeVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeVmResponse.ProtoReflect.Descriptor instead. +func (*ResumeVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{22} +} + +func (x *ResumeVmResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *ResumeVmResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +type RebootVmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // Whether to force reboot (vs graceful) + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RebootVmRequest) Reset() { + *x = RebootVmRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RebootVmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RebootVmRequest) ProtoMessage() {} + +func (x *RebootVmRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RebootVmRequest.ProtoReflect.Descriptor instead. +func (*RebootVmRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{23} +} + +func (x *RebootVmRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *RebootVmRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type RebootVmResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RebootVmResponse) Reset() { + *x = RebootVmResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RebootVmResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RebootVmResponse) ProtoMessage() {} + +func (x *RebootVmResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RebootVmResponse.ProtoReflect.Descriptor instead. +func (*RebootVmResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{24} +} + +func (x *RebootVmResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *RebootVmResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +type GetVmInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetVmInfoRequest) Reset() { + *x = GetVmInfoRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVmInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVmInfoRequest) ProtoMessage() {} + +func (x *GetVmInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVmInfoRequest.ProtoReflect.Descriptor instead. +func (*GetVmInfoRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{25} +} + +func (x *GetVmInfoRequest) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +type GetVmInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + Config *VmConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + State VmState `protobuf:"varint,3,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + Metrics *VmMetrics `protobuf:"bytes,4,opt,name=metrics,proto3" json:"metrics,omitempty"` + // Backend-specific information + BackendInfo map[string]string `protobuf:"bytes,5,rep,name=backend_info,json=backendInfo,proto3" json:"backend_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Network information if available + NetworkInfo *VmNetworkInfo `protobuf:"bytes,6,opt,name=network_info,json=networkInfo,proto3" json:"network_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetVmInfoResponse) Reset() { + *x = GetVmInfoResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVmInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVmInfoResponse) ProtoMessage() {} + +func (x *GetVmInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVmInfoResponse.ProtoReflect.Descriptor instead. +func (*GetVmInfoResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{26} +} + +func (x *GetVmInfoResponse) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *GetVmInfoResponse) GetConfig() *VmConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *GetVmInfoResponse) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +func (x *GetVmInfoResponse) GetMetrics() *VmMetrics { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *GetVmInfoResponse) GetBackendInfo() map[string]string { + if x != nil { + return x.BackendInfo + } + return nil +} + +func (x *GetVmInfoResponse) GetNetworkInfo() *VmNetworkInfo { + if x != nil { + return x.NetworkInfo + } + return nil +} + +// Port mapping for VM network forwarding +type PortMapping struct { + state protoimpl.MessageState `protogen:"open.v1"` + ContainerPort int32 `protobuf:"varint,1,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` // Port inside the VM + HostPort int32 `protobuf:"varint,2,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"` // Port on the host system + Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` // Protocol (tcp, udp) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PortMapping) Reset() { + *x = PortMapping{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PortMapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PortMapping) ProtoMessage() {} + +func (x *PortMapping) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PortMapping.ProtoReflect.Descriptor instead. +func (*PortMapping) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{27} +} + +func (x *PortMapping) GetContainerPort() int32 { + if x != nil { + return x.ContainerPort + } + return 0 +} + +func (x *PortMapping) GetHostPort() int32 { + if x != nil { + return x.HostPort + } + return 0 +} + +func (x *PortMapping) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +// Network information for a VM +type VmNetworkInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + IpAddress string `protobuf:"bytes,1,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + MacAddress string `protobuf:"bytes,2,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` + TapDevice string `protobuf:"bytes,3,opt,name=tap_device,json=tapDevice,proto3" json:"tap_device,omitempty"` + NetworkNamespace string `protobuf:"bytes,4,opt,name=network_namespace,json=networkNamespace,proto3" json:"network_namespace,omitempty"` + Gateway string `protobuf:"bytes,5,opt,name=gateway,proto3" json:"gateway,omitempty"` + DnsServers []string `protobuf:"bytes,6,rep,name=dns_servers,json=dnsServers,proto3" json:"dns_servers,omitempty"` + PortMappings []*PortMapping `protobuf:"bytes,7,rep,name=port_mappings,json=portMappings,proto3" json:"port_mappings,omitempty"` // Port forwards from host to VM + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VmNetworkInfo) Reset() { + *x = VmNetworkInfo{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VmNetworkInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VmNetworkInfo) ProtoMessage() {} + +func (x *VmNetworkInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VmNetworkInfo.ProtoReflect.Descriptor instead. +func (*VmNetworkInfo) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{28} +} + +func (x *VmNetworkInfo) GetIpAddress() string { + if x != nil { + return x.IpAddress + } + return "" +} + +func (x *VmNetworkInfo) GetMacAddress() string { + if x != nil { + return x.MacAddress + } + return "" +} + +func (x *VmNetworkInfo) GetTapDevice() string { + if x != nil { + return x.TapDevice + } + return "" +} + +func (x *VmNetworkInfo) GetNetworkNamespace() string { + if x != nil { + return x.NetworkNamespace + } + return "" +} + +func (x *VmNetworkInfo) GetGateway() string { + if x != nil { + return x.Gateway + } + return "" +} + +func (x *VmNetworkInfo) GetDnsServers() []string { + if x != nil { + return x.DnsServers + } + return nil +} + +func (x *VmNetworkInfo) GetPortMappings() []*PortMapping { + if x != nil { + return x.PortMappings + } + return nil +} + +type VmMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + // CPU usage percentage (0-100) + CpuUsagePercent float64 `protobuf:"fixed64,1,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"` + // Memory usage in bytes + MemoryUsageBytes int64 `protobuf:"varint,2,opt,name=memory_usage_bytes,json=memoryUsageBytes,proto3" json:"memory_usage_bytes,omitempty"` + // Network I/O statistics + NetworkStats *NetworkStats `protobuf:"bytes,3,opt,name=network_stats,json=networkStats,proto3" json:"network_stats,omitempty"` + // Storage I/O statistics + StorageStats *StorageStats `protobuf:"bytes,4,opt,name=storage_stats,json=storageStats,proto3" json:"storage_stats,omitempty"` + // VM uptime in seconds + UptimeSeconds int64 `protobuf:"varint,5,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VmMetrics) Reset() { + *x = VmMetrics{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VmMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VmMetrics) ProtoMessage() {} + +func (x *VmMetrics) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VmMetrics.ProtoReflect.Descriptor instead. +func (*VmMetrics) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{29} +} + +func (x *VmMetrics) GetCpuUsagePercent() float64 { + if x != nil { + return x.CpuUsagePercent + } + return 0 +} + +func (x *VmMetrics) GetMemoryUsageBytes() int64 { + if x != nil { + return x.MemoryUsageBytes + } + return 0 +} + +func (x *VmMetrics) GetNetworkStats() *NetworkStats { + if x != nil { + return x.NetworkStats + } + return nil +} + +func (x *VmMetrics) GetStorageStats() *StorageStats { + if x != nil { + return x.StorageStats + } + return nil +} + +func (x *VmMetrics) GetUptimeSeconds() int64 { + if x != nil { + return x.UptimeSeconds + } + return 0 +} + +type NetworkStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + BytesReceived int64 `protobuf:"varint,1,opt,name=bytes_received,json=bytesReceived,proto3" json:"bytes_received,omitempty"` + BytesTransmitted int64 `protobuf:"varint,2,opt,name=bytes_transmitted,json=bytesTransmitted,proto3" json:"bytes_transmitted,omitempty"` + PacketsReceived int64 `protobuf:"varint,3,opt,name=packets_received,json=packetsReceived,proto3" json:"packets_received,omitempty"` + PacketsTransmitted int64 `protobuf:"varint,4,opt,name=packets_transmitted,json=packetsTransmitted,proto3" json:"packets_transmitted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NetworkStats) Reset() { + *x = NetworkStats{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NetworkStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkStats) ProtoMessage() {} + +func (x *NetworkStats) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkStats.ProtoReflect.Descriptor instead. +func (*NetworkStats) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{30} +} + +func (x *NetworkStats) GetBytesReceived() int64 { + if x != nil { + return x.BytesReceived + } + return 0 +} + +func (x *NetworkStats) GetBytesTransmitted() int64 { + if x != nil { + return x.BytesTransmitted + } + return 0 +} + +func (x *NetworkStats) GetPacketsReceived() int64 { + if x != nil { + return x.PacketsReceived + } + return 0 +} + +func (x *NetworkStats) GetPacketsTransmitted() int64 { + if x != nil { + return x.PacketsTransmitted + } + return 0 +} + +type StorageStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + BytesRead int64 `protobuf:"varint,1,opt,name=bytes_read,json=bytesRead,proto3" json:"bytes_read,omitempty"` + BytesWritten int64 `protobuf:"varint,2,opt,name=bytes_written,json=bytesWritten,proto3" json:"bytes_written,omitempty"` + ReadOperations int64 `protobuf:"varint,3,opt,name=read_operations,json=readOperations,proto3" json:"read_operations,omitempty"` + WriteOperations int64 `protobuf:"varint,4,opt,name=write_operations,json=writeOperations,proto3" json:"write_operations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StorageStats) Reset() { + *x = StorageStats{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StorageStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageStats) ProtoMessage() {} + +func (x *StorageStats) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageStats.ProtoReflect.Descriptor instead. +func (*StorageStats) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{31} +} + +func (x *StorageStats) GetBytesRead() int64 { + if x != nil { + return x.BytesRead + } + return 0 +} + +func (x *StorageStats) GetBytesWritten() int64 { + if x != nil { + return x.BytesWritten + } + return 0 +} + +func (x *StorageStats) GetReadOperations() int64 { + if x != nil { + return x.ReadOperations + } + return 0 +} + +func (x *StorageStats) GetWriteOperations() int64 { + if x != nil { + return x.WriteOperations + } + return 0 +} + +type ListVmsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Optional filter by state + StateFilter []VmState `protobuf:"varint,1,rep,packed,name=state_filter,json=stateFilter,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state_filter,omitempty"` + // Pagination + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListVmsRequest) Reset() { + *x = ListVmsRequest{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListVmsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVmsRequest) ProtoMessage() {} + +func (x *ListVmsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVmsRequest.ProtoReflect.Descriptor instead. +func (*ListVmsRequest) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{32} +} + +func (x *ListVmsRequest) GetStateFilter() []VmState { + if x != nil { + return x.StateFilter + } + return nil +} + +func (x *ListVmsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListVmsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListVmsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vms []*VmInfo `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListVmsResponse) Reset() { + *x = ListVmsResponse{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListVmsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVmsResponse) ProtoMessage() {} + +func (x *ListVmsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVmsResponse.ProtoReflect.Descriptor instead. +func (*ListVmsResponse) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{33} +} + +func (x *ListVmsResponse) GetVms() []*VmInfo { + if x != nil { + return x.Vms + } + return nil +} + +func (x *ListVmsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListVmsResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type VmInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + State VmState `protobuf:"varint,2,opt,name=state,proto3,enum=metal.vmprovisioner.v1.VmState" json:"state,omitempty"` + // Basic config info (subset of full config) + VcpuCount int32 `protobuf:"varint,3,opt,name=vcpu_count,json=vcpuCount,proto3" json:"vcpu_count,omitempty"` + MemorySizeBytes int64 `protobuf:"varint,4,opt,name=memory_size_bytes,json=memorySizeBytes,proto3" json:"memory_size_bytes,omitempty"` + // Creation and modification timestamps + CreatedTimestamp int64 `protobuf:"varint,5,opt,name=created_timestamp,json=createdTimestamp,proto3" json:"created_timestamp,omitempty"` + ModifiedTimestamp int64 `protobuf:"varint,6,opt,name=modified_timestamp,json=modifiedTimestamp,proto3" json:"modified_timestamp,omitempty"` + // Metadata + Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Customer identifier + CustomerId string `protobuf:"bytes,8,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VmInfo) Reset() { + *x = VmInfo{} + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VmInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VmInfo) ProtoMessage() {} + +func (x *VmInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VmInfo.ProtoReflect.Descriptor instead. +func (*VmInfo) Descriptor() ([]byte, []int) { + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP(), []int{34} +} + +func (x *VmInfo) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *VmInfo) GetState() VmState { + if x != nil { + return x.State + } + return VmState_VM_STATE_UNSPECIFIED +} + +func (x *VmInfo) GetVcpuCount() int32 { + if x != nil { + return x.VcpuCount + } + return 0 +} + +func (x *VmInfo) GetMemorySizeBytes() int64 { + if x != nil { + return x.MemorySizeBytes + } + return 0 +} + +func (x *VmInfo) GetCreatedTimestamp() int64 { + if x != nil { + return x.CreatedTimestamp + } + return 0 +} + +func (x *VmInfo) GetModifiedTimestamp() int64 { + if x != nil { + return x.ModifiedTimestamp + } + return 0 +} + +func (x *VmInfo) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *VmInfo) GetCustomerId() string { + if x != nil { + return x.CustomerId + } + return "" +} + +var File_proto_metal_vmprovisioner_v1_vmprovisioner_proto protoreflect.FileDescriptor + +const file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDesc = "" + + "\n" + + "0proto/metal/vmprovisioner/v1/vmprovisioner.proto\x12\x16metal.vmprovisioner.v1\"\x84\x04\n" + + "\bVmConfig\x123\n" + + "\x03cpu\x18\x01 \x01(\v2!.metal.vmprovisioner.v1.CpuConfigR\x03cpu\x12<\n" + + "\x06memory\x18\x02 \x01(\v2$.metal.vmprovisioner.v1.MemoryConfigR\x06memory\x126\n" + + "\x04boot\x18\x03 \x01(\v2\".metal.vmprovisioner.v1.BootConfigR\x04boot\x12?\n" + + "\astorage\x18\x04 \x03(\v2%.metal.vmprovisioner.v1.StorageDeviceR\astorage\x12B\n" + + "\anetwork\x18\x05 \x03(\v2(.metal.vmprovisioner.v1.NetworkInterfaceR\anetwork\x12?\n" + + "\aconsole\x18\x06 \x01(\v2%.metal.vmprovisioner.v1.ConsoleConfigR\aconsole\x12J\n" + + "\bmetadata\x18\a \x03(\v2..metal.vmprovisioner.v1.VmConfig.MetadataEntryR\bmetadata\x1a;\n" + + "\rMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x9b\x02\n" + + "\tCpuConfig\x12\x1d\n" + + "\n" + + "vcpu_count\x18\x01 \x01(\x05R\tvcpuCount\x12$\n" + + "\x0emax_vcpu_count\x18\x02 \x01(\x05R\fmaxVcpuCount\x12?\n" + + "\btopology\x18\x03 \x01(\v2#.metal.vmprovisioner.v1.CpuTopologyR\btopology\x12K\n" + + "\bfeatures\x18\x04 \x03(\v2/.metal.vmprovisioner.v1.CpuConfig.FeaturesEntryR\bfeatures\x1a;\n" + + "\rFeaturesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"{\n" + + "\vCpuTopology\x12\x18\n" + + "\asockets\x18\x01 \x01(\x05R\asockets\x12(\n" + + "\x10cores_per_socket\x18\x02 \x01(\x05R\x0ecoresPerSocket\x12(\n" + + "\x10threads_per_core\x18\x03 \x01(\x05R\x0ethreadsPerCore\"\x85\x02\n" + + "\fMemoryConfig\x12\x1d\n" + + "\n" + + "size_bytes\x18\x01 \x01(\x03R\tsizeBytes\x12'\n" + + "\x0fhotplug_enabled\x18\x02 \x01(\bR\x0ehotplugEnabled\x12$\n" + + "\x0emax_size_bytes\x18\x03 \x01(\x03R\fmaxSizeBytes\x12K\n" + + "\abacking\x18\x04 \x03(\v21.metal.vmprovisioner.v1.MemoryConfig.BackingEntryR\abacking\x1a:\n" + + "\fBackingEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x87\x02\n" + + "\n" + + "BootConfig\x12\x1f\n" + + "\vkernel_path\x18\x01 \x01(\tR\n" + + "kernelPath\x12\x1f\n" + + "\vinitrd_path\x18\x02 \x01(\tR\n" + + "initrdPath\x12\x1f\n" + + "\vkernel_args\x18\x03 \x01(\tR\n" + + "kernelArgs\x12V\n" + + "\fboot_options\x18\x04 \x03(\v23.metal.vmprovisioner.v1.BootConfig.BootOptionsEntryR\vbootOptions\x1a>\n" + + "\x10BootOptionsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa7\x02\n" + + "\rStorageDevice\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04path\x18\x02 \x01(\tR\x04path\x12\x1b\n" + + "\tread_only\x18\x03 \x01(\bR\breadOnly\x12$\n" + + "\x0eis_root_device\x18\x04 \x01(\bR\fisRootDevice\x12%\n" + + "\x0einterface_type\x18\x05 \x01(\tR\rinterfaceType\x12L\n" + + "\aoptions\x18\x06 \x03(\v22.metal.vmprovisioner.v1.StorageDevice.OptionsEntryR\aoptions\x1a:\n" + + "\fOptionsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xe7\x04\n" + + "\x10NetworkInterface\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + + "\vmac_address\x18\x02 \x01(\tR\n" + + "macAddress\x12\x1d\n" + + "\n" + + "tap_device\x18\x03 \x01(\tR\ttapDevice\x12%\n" + + "\x0einterface_type\x18\x04 \x01(\tR\rinterfaceType\x12O\n" + + "\aoptions\x18\x05 \x03(\v25.metal.vmprovisioner.v1.NetworkInterface.OptionsEntryR\aoptions\x12C\n" + + "\vipv4_config\x18\x06 \x01(\v2\".metal.vmprovisioner.v1.IPv4ConfigR\n" + + "ipv4Config\x12C\n" + + "\vipv6_config\x18\a \x01(\v2\".metal.vmprovisioner.v1.IPv6ConfigR\n" + + "ipv6Config\x127\n" + + "\x04mode\x18\b \x01(\x0e2#.metal.vmprovisioner.v1.NetworkModeR\x04mode\x12E\n" + + "\rrx_rate_limit\x18\n" + + " \x01(\v2!.metal.vmprovisioner.v1.RateLimitR\vrxRateLimit\x12E\n" + + "\rtx_rate_limit\x18\v \x01(\v2!.metal.vmprovisioner.v1.RateLimitR\vtxRateLimit\x1a:\n" + + "\fOptionsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x8f\x01\n" + + "\n" + + "IPv4Config\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12\x18\n" + + "\anetmask\x18\x02 \x01(\tR\anetmask\x12\x18\n" + + "\agateway\x18\x03 \x01(\tR\agateway\x12\x1f\n" + + "\vdns_servers\x18\x04 \x03(\tR\n" + + "dnsServers\x12\x12\n" + + "\x04dhcp\x18\x05 \x01(\bR\x04dhcp\"\xea\x01\n" + + "\n" + + "IPv6Config\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12#\n" + + "\rprefix_length\x18\x02 \x01(\x05R\fprefixLength\x12\x18\n" + + "\agateway\x18\x03 \x01(\tR\agateway\x12\x1f\n" + + "\vdns_servers\x18\x04 \x03(\tR\n" + + "dnsServers\x12\x14\n" + + "\x05slaac\x18\x05 \x01(\bR\x05slaac\x12-\n" + + "\x12privacy_extensions\x18\x06 \x01(\bR\x11privacyExtensions\x12\x1d\n" + + "\n" + + "link_local\x18\a \x01(\tR\tlinkLocal\"`\n" + + "\tRateLimit\x12\x1c\n" + + "\tbandwidth\x18\x01 \x01(\x03R\tbandwidth\x12\x1f\n" + + "\vrefill_time\x18\x02 \x01(\x03R\n" + + "refillTime\x12\x14\n" + + "\x05burst\x18\x03 \x01(\x03R\x05burst\"z\n" + + "\rConsoleConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x16\n" + + "\x06output\x18\x02 \x01(\tR\x06output\x12\x14\n" + + "\x05input\x18\x03 \x01(\tR\x05input\x12!\n" + + "\fconsole_type\x18\x04 \x01(\tR\vconsoleType\"\x81\x01\n" + + "\x0fCreateVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x128\n" + + "\x06config\x18\x02 \x01(\v2 .metal.vmprovisioner.v1.VmConfigR\x06config\x12\x1f\n" + + "\vcustomer_id\x18\x03 \x01(\tR\n" + + "customerId\"^\n" + + "\x10CreateVmResponse\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\"<\n" + + "\x0fDeleteVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\",\n" + + "\x10DeleteVmResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"$\n" + + "\rBootVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\"a\n" + + "\x0eBootVmResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\"g\n" + + "\x11ShutdownVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\x12'\n" + + "\x0ftimeout_seconds\x18\x03 \x01(\x05R\x0etimeoutSeconds\"e\n" + + "\x12ShutdownVmResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\"%\n" + + "\x0ePauseVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\"b\n" + + "\x0fPauseVmResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\"&\n" + + "\x0fResumeVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\"c\n" + + "\x10ResumeVmResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\"<\n" + + "\x0fRebootVmRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\"c\n" + + "\x10RebootVmResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\"'\n" + + "\x10GetVmInfoRequest\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\"\xbf\x03\n" + + "\x11GetVmInfoResponse\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x128\n" + + "\x06config\x18\x02 \x01(\v2 .metal.vmprovisioner.v1.VmConfigR\x06config\x125\n" + + "\x05state\x18\x03 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\x12;\n" + + "\ametrics\x18\x04 \x01(\v2!.metal.vmprovisioner.v1.VmMetricsR\ametrics\x12]\n" + + "\fbackend_info\x18\x05 \x03(\v2:.metal.vmprovisioner.v1.GetVmInfoResponse.BackendInfoEntryR\vbackendInfo\x12H\n" + + "\fnetwork_info\x18\x06 \x01(\v2%.metal.vmprovisioner.v1.VmNetworkInfoR\vnetworkInfo\x1a>\n" + + "\x10BackendInfoEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"m\n" + + "\vPortMapping\x12%\n" + + "\x0econtainer_port\x18\x01 \x01(\x05R\rcontainerPort\x12\x1b\n" + + "\thost_port\x18\x02 \x01(\x05R\bhostPort\x12\x1a\n" + + "\bprotocol\x18\x03 \x01(\tR\bprotocol\"\xa0\x02\n" + + "\rVmNetworkInfo\x12\x1d\n" + + "\n" + + "ip_address\x18\x01 \x01(\tR\tipAddress\x12\x1f\n" + + "\vmac_address\x18\x02 \x01(\tR\n" + + "macAddress\x12\x1d\n" + + "\n" + + "tap_device\x18\x03 \x01(\tR\ttapDevice\x12+\n" + + "\x11network_namespace\x18\x04 \x01(\tR\x10networkNamespace\x12\x18\n" + + "\agateway\x18\x05 \x01(\tR\agateway\x12\x1f\n" + + "\vdns_servers\x18\x06 \x03(\tR\n" + + "dnsServers\x12H\n" + + "\rport_mappings\x18\a \x03(\v2#.metal.vmprovisioner.v1.PortMappingR\fportMappings\"\xa2\x02\n" + + "\tVmMetrics\x12*\n" + + "\x11cpu_usage_percent\x18\x01 \x01(\x01R\x0fcpuUsagePercent\x12,\n" + + "\x12memory_usage_bytes\x18\x02 \x01(\x03R\x10memoryUsageBytes\x12I\n" + + "\rnetwork_stats\x18\x03 \x01(\v2$.metal.vmprovisioner.v1.NetworkStatsR\fnetworkStats\x12I\n" + + "\rstorage_stats\x18\x04 \x01(\v2$.metal.vmprovisioner.v1.StorageStatsR\fstorageStats\x12%\n" + + "\x0euptime_seconds\x18\x05 \x01(\x03R\ruptimeSeconds\"\xbe\x01\n" + + "\fNetworkStats\x12%\n" + + "\x0ebytes_received\x18\x01 \x01(\x03R\rbytesReceived\x12+\n" + + "\x11bytes_transmitted\x18\x02 \x01(\x03R\x10bytesTransmitted\x12)\n" + + "\x10packets_received\x18\x03 \x01(\x03R\x0fpacketsReceived\x12/\n" + + "\x13packets_transmitted\x18\x04 \x01(\x03R\x12packetsTransmitted\"\xa6\x01\n" + + "\fStorageStats\x12\x1d\n" + + "\n" + + "bytes_read\x18\x01 \x01(\x03R\tbytesRead\x12#\n" + + "\rbytes_written\x18\x02 \x01(\x03R\fbytesWritten\x12'\n" + + "\x0fread_operations\x18\x03 \x01(\x03R\x0ereadOperations\x12)\n" + + "\x10write_operations\x18\x04 \x01(\x03R\x0fwriteOperations\"\x90\x01\n" + + "\x0eListVmsRequest\x12B\n" + + "\fstate_filter\x18\x01 \x03(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\vstateFilter\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x03 \x01(\tR\tpageToken\"\x8c\x01\n" + + "\x0fListVmsResponse\x120\n" + + "\x03vms\x18\x01 \x03(\v2\x1e.metal.vmprovisioner.v1.VmInfoR\x03vms\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1f\n" + + "\vtotal_count\x18\x03 \x01(\x05R\n" + + "totalCount\"\xa3\x03\n" + + "\x06VmInfo\x12\x13\n" + + "\x05vm_id\x18\x01 \x01(\tR\x04vmId\x125\n" + + "\x05state\x18\x02 \x01(\x0e2\x1f.metal.vmprovisioner.v1.VmStateR\x05state\x12\x1d\n" + + "\n" + + "vcpu_count\x18\x03 \x01(\x05R\tvcpuCount\x12*\n" + + "\x11memory_size_bytes\x18\x04 \x01(\x03R\x0fmemorySizeBytes\x12+\n" + + "\x11created_timestamp\x18\x05 \x01(\x03R\x10createdTimestamp\x12-\n" + + "\x12modified_timestamp\x18\x06 \x01(\x03R\x11modifiedTimestamp\x12H\n" + + "\bmetadata\x18\a \x03(\v2,.metal.vmprovisioner.v1.VmInfo.MetadataEntryR\bmetadata\x12\x1f\n" + + "\vcustomer_id\x18\b \x01(\tR\n" + + "customerId\x1a;\n" + + "\rMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*{\n" + + "\aVmState\x12\x18\n" + + "\x14VM_STATE_UNSPECIFIED\x10\x00\x12\x14\n" + + "\x10VM_STATE_CREATED\x10\x01\x12\x14\n" + + "\x10VM_STATE_RUNNING\x10\x02\x12\x13\n" + + "\x0fVM_STATE_PAUSED\x10\x03\x12\x15\n" + + "\x11VM_STATE_SHUTDOWN\x10\x04*\x80\x01\n" + + "\vNetworkMode\x12\x1c\n" + + "\x18NETWORK_MODE_UNSPECIFIED\x10\x00\x12\x1b\n" + + "\x17NETWORK_MODE_DUAL_STACK\x10\x01\x12\x1a\n" + + "\x16NETWORK_MODE_IPV4_ONLY\x10\x02\x12\x1a\n" + + "\x16NETWORK_MODE_IPV6_ONLY\x10\x032\xdf\x06\n" + + "\tVmService\x12]\n" + + "\bCreateVm\x12'.metal.vmprovisioner.v1.CreateVmRequest\x1a(.metal.vmprovisioner.v1.CreateVmResponse\x12]\n" + + "\bDeleteVm\x12'.metal.vmprovisioner.v1.DeleteVmRequest\x1a(.metal.vmprovisioner.v1.DeleteVmResponse\x12W\n" + + "\x06BootVm\x12%.metal.vmprovisioner.v1.BootVmRequest\x1a&.metal.vmprovisioner.v1.BootVmResponse\x12c\n" + + "\n" + + "ShutdownVm\x12).metal.vmprovisioner.v1.ShutdownVmRequest\x1a*.metal.vmprovisioner.v1.ShutdownVmResponse\x12Z\n" + + "\aPauseVm\x12&.metal.vmprovisioner.v1.PauseVmRequest\x1a'.metal.vmprovisioner.v1.PauseVmResponse\x12]\n" + + "\bResumeVm\x12'.metal.vmprovisioner.v1.ResumeVmRequest\x1a(.metal.vmprovisioner.v1.ResumeVmResponse\x12]\n" + + "\bRebootVm\x12'.metal.vmprovisioner.v1.RebootVmRequest\x1a(.metal.vmprovisioner.v1.RebootVmResponse\x12`\n" + + "\tGetVmInfo\x12(.metal.vmprovisioner.v1.GetVmInfoRequest\x1a).metal.vmprovisioner.v1.GetVmInfoResponse\x12Z\n" + + "\aListVms\x12&.metal.vmprovisioner.v1.ListVmsRequest\x1a'.metal.vmprovisioner.v1.ListVmsResponseBNZLgithub.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1;vmprovisionerv1b\x06proto3" + +var ( + file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescOnce sync.Once + file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescData []byte +) + +func file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescGZIP() []byte { + file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescOnce.Do(func() { + file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDesc), len(file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDesc))) + }) + return file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDescData +} + +var file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_goTypes = []any{ + (VmState)(0), // 0: metal.vmprovisioner.v1.VmState + (NetworkMode)(0), // 1: metal.vmprovisioner.v1.NetworkMode + (*VmConfig)(nil), // 2: metal.vmprovisioner.v1.VmConfig + (*CpuConfig)(nil), // 3: metal.vmprovisioner.v1.CpuConfig + (*CpuTopology)(nil), // 4: metal.vmprovisioner.v1.CpuTopology + (*MemoryConfig)(nil), // 5: metal.vmprovisioner.v1.MemoryConfig + (*BootConfig)(nil), // 6: metal.vmprovisioner.v1.BootConfig + (*StorageDevice)(nil), // 7: metal.vmprovisioner.v1.StorageDevice + (*NetworkInterface)(nil), // 8: metal.vmprovisioner.v1.NetworkInterface + (*IPv4Config)(nil), // 9: metal.vmprovisioner.v1.IPv4Config + (*IPv6Config)(nil), // 10: metal.vmprovisioner.v1.IPv6Config + (*RateLimit)(nil), // 11: metal.vmprovisioner.v1.RateLimit + (*ConsoleConfig)(nil), // 12: metal.vmprovisioner.v1.ConsoleConfig + (*CreateVmRequest)(nil), // 13: metal.vmprovisioner.v1.CreateVmRequest + (*CreateVmResponse)(nil), // 14: metal.vmprovisioner.v1.CreateVmResponse + (*DeleteVmRequest)(nil), // 15: metal.vmprovisioner.v1.DeleteVmRequest + (*DeleteVmResponse)(nil), // 16: metal.vmprovisioner.v1.DeleteVmResponse + (*BootVmRequest)(nil), // 17: metal.vmprovisioner.v1.BootVmRequest + (*BootVmResponse)(nil), // 18: metal.vmprovisioner.v1.BootVmResponse + (*ShutdownVmRequest)(nil), // 19: metal.vmprovisioner.v1.ShutdownVmRequest + (*ShutdownVmResponse)(nil), // 20: metal.vmprovisioner.v1.ShutdownVmResponse + (*PauseVmRequest)(nil), // 21: metal.vmprovisioner.v1.PauseVmRequest + (*PauseVmResponse)(nil), // 22: metal.vmprovisioner.v1.PauseVmResponse + (*ResumeVmRequest)(nil), // 23: metal.vmprovisioner.v1.ResumeVmRequest + (*ResumeVmResponse)(nil), // 24: metal.vmprovisioner.v1.ResumeVmResponse + (*RebootVmRequest)(nil), // 25: metal.vmprovisioner.v1.RebootVmRequest + (*RebootVmResponse)(nil), // 26: metal.vmprovisioner.v1.RebootVmResponse + (*GetVmInfoRequest)(nil), // 27: metal.vmprovisioner.v1.GetVmInfoRequest + (*GetVmInfoResponse)(nil), // 28: metal.vmprovisioner.v1.GetVmInfoResponse + (*PortMapping)(nil), // 29: metal.vmprovisioner.v1.PortMapping + (*VmNetworkInfo)(nil), // 30: metal.vmprovisioner.v1.VmNetworkInfo + (*VmMetrics)(nil), // 31: metal.vmprovisioner.v1.VmMetrics + (*NetworkStats)(nil), // 32: metal.vmprovisioner.v1.NetworkStats + (*StorageStats)(nil), // 33: metal.vmprovisioner.v1.StorageStats + (*ListVmsRequest)(nil), // 34: metal.vmprovisioner.v1.ListVmsRequest + (*ListVmsResponse)(nil), // 35: metal.vmprovisioner.v1.ListVmsResponse + (*VmInfo)(nil), // 36: metal.vmprovisioner.v1.VmInfo + nil, // 37: metal.vmprovisioner.v1.VmConfig.MetadataEntry + nil, // 38: metal.vmprovisioner.v1.CpuConfig.FeaturesEntry + nil, // 39: metal.vmprovisioner.v1.MemoryConfig.BackingEntry + nil, // 40: metal.vmprovisioner.v1.BootConfig.BootOptionsEntry + nil, // 41: metal.vmprovisioner.v1.StorageDevice.OptionsEntry + nil, // 42: metal.vmprovisioner.v1.NetworkInterface.OptionsEntry + nil, // 43: metal.vmprovisioner.v1.GetVmInfoResponse.BackendInfoEntry + nil, // 44: metal.vmprovisioner.v1.VmInfo.MetadataEntry +} +var file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_depIdxs = []int32{ + 3, // 0: metal.vmprovisioner.v1.VmConfig.cpu:type_name -> metal.vmprovisioner.v1.CpuConfig + 5, // 1: metal.vmprovisioner.v1.VmConfig.memory:type_name -> metal.vmprovisioner.v1.MemoryConfig + 6, // 2: metal.vmprovisioner.v1.VmConfig.boot:type_name -> metal.vmprovisioner.v1.BootConfig + 7, // 3: metal.vmprovisioner.v1.VmConfig.storage:type_name -> metal.vmprovisioner.v1.StorageDevice + 8, // 4: metal.vmprovisioner.v1.VmConfig.network:type_name -> metal.vmprovisioner.v1.NetworkInterface + 12, // 5: metal.vmprovisioner.v1.VmConfig.console:type_name -> metal.vmprovisioner.v1.ConsoleConfig + 37, // 6: metal.vmprovisioner.v1.VmConfig.metadata:type_name -> metal.vmprovisioner.v1.VmConfig.MetadataEntry + 4, // 7: metal.vmprovisioner.v1.CpuConfig.topology:type_name -> metal.vmprovisioner.v1.CpuTopology + 38, // 8: metal.vmprovisioner.v1.CpuConfig.features:type_name -> metal.vmprovisioner.v1.CpuConfig.FeaturesEntry + 39, // 9: metal.vmprovisioner.v1.MemoryConfig.backing:type_name -> metal.vmprovisioner.v1.MemoryConfig.BackingEntry + 40, // 10: metal.vmprovisioner.v1.BootConfig.boot_options:type_name -> metal.vmprovisioner.v1.BootConfig.BootOptionsEntry + 41, // 11: metal.vmprovisioner.v1.StorageDevice.options:type_name -> metal.vmprovisioner.v1.StorageDevice.OptionsEntry + 42, // 12: metal.vmprovisioner.v1.NetworkInterface.options:type_name -> metal.vmprovisioner.v1.NetworkInterface.OptionsEntry + 9, // 13: metal.vmprovisioner.v1.NetworkInterface.ipv4_config:type_name -> metal.vmprovisioner.v1.IPv4Config + 10, // 14: metal.vmprovisioner.v1.NetworkInterface.ipv6_config:type_name -> metal.vmprovisioner.v1.IPv6Config + 1, // 15: metal.vmprovisioner.v1.NetworkInterface.mode:type_name -> metal.vmprovisioner.v1.NetworkMode + 11, // 16: metal.vmprovisioner.v1.NetworkInterface.rx_rate_limit:type_name -> metal.vmprovisioner.v1.RateLimit + 11, // 17: metal.vmprovisioner.v1.NetworkInterface.tx_rate_limit:type_name -> metal.vmprovisioner.v1.RateLimit + 2, // 18: metal.vmprovisioner.v1.CreateVmRequest.config:type_name -> metal.vmprovisioner.v1.VmConfig + 0, // 19: metal.vmprovisioner.v1.CreateVmResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 0, // 20: metal.vmprovisioner.v1.BootVmResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 0, // 21: metal.vmprovisioner.v1.ShutdownVmResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 0, // 22: metal.vmprovisioner.v1.PauseVmResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 0, // 23: metal.vmprovisioner.v1.ResumeVmResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 0, // 24: metal.vmprovisioner.v1.RebootVmResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 2, // 25: metal.vmprovisioner.v1.GetVmInfoResponse.config:type_name -> metal.vmprovisioner.v1.VmConfig + 0, // 26: metal.vmprovisioner.v1.GetVmInfoResponse.state:type_name -> metal.vmprovisioner.v1.VmState + 31, // 27: metal.vmprovisioner.v1.GetVmInfoResponse.metrics:type_name -> metal.vmprovisioner.v1.VmMetrics + 43, // 28: metal.vmprovisioner.v1.GetVmInfoResponse.backend_info:type_name -> metal.vmprovisioner.v1.GetVmInfoResponse.BackendInfoEntry + 30, // 29: metal.vmprovisioner.v1.GetVmInfoResponse.network_info:type_name -> metal.vmprovisioner.v1.VmNetworkInfo + 29, // 30: metal.vmprovisioner.v1.VmNetworkInfo.port_mappings:type_name -> metal.vmprovisioner.v1.PortMapping + 32, // 31: metal.vmprovisioner.v1.VmMetrics.network_stats:type_name -> metal.vmprovisioner.v1.NetworkStats + 33, // 32: metal.vmprovisioner.v1.VmMetrics.storage_stats:type_name -> metal.vmprovisioner.v1.StorageStats + 0, // 33: metal.vmprovisioner.v1.ListVmsRequest.state_filter:type_name -> metal.vmprovisioner.v1.VmState + 36, // 34: metal.vmprovisioner.v1.ListVmsResponse.vms:type_name -> metal.vmprovisioner.v1.VmInfo + 0, // 35: metal.vmprovisioner.v1.VmInfo.state:type_name -> metal.vmprovisioner.v1.VmState + 44, // 36: metal.vmprovisioner.v1.VmInfo.metadata:type_name -> metal.vmprovisioner.v1.VmInfo.MetadataEntry + 13, // 37: metal.vmprovisioner.v1.VmService.CreateVm:input_type -> metal.vmprovisioner.v1.CreateVmRequest + 15, // 38: metal.vmprovisioner.v1.VmService.DeleteVm:input_type -> metal.vmprovisioner.v1.DeleteVmRequest + 17, // 39: metal.vmprovisioner.v1.VmService.BootVm:input_type -> metal.vmprovisioner.v1.BootVmRequest + 19, // 40: metal.vmprovisioner.v1.VmService.ShutdownVm:input_type -> metal.vmprovisioner.v1.ShutdownVmRequest + 21, // 41: metal.vmprovisioner.v1.VmService.PauseVm:input_type -> metal.vmprovisioner.v1.PauseVmRequest + 23, // 42: metal.vmprovisioner.v1.VmService.ResumeVm:input_type -> metal.vmprovisioner.v1.ResumeVmRequest + 25, // 43: metal.vmprovisioner.v1.VmService.RebootVm:input_type -> metal.vmprovisioner.v1.RebootVmRequest + 27, // 44: metal.vmprovisioner.v1.VmService.GetVmInfo:input_type -> metal.vmprovisioner.v1.GetVmInfoRequest + 34, // 45: metal.vmprovisioner.v1.VmService.ListVms:input_type -> metal.vmprovisioner.v1.ListVmsRequest + 14, // 46: metal.vmprovisioner.v1.VmService.CreateVm:output_type -> metal.vmprovisioner.v1.CreateVmResponse + 16, // 47: metal.vmprovisioner.v1.VmService.DeleteVm:output_type -> metal.vmprovisioner.v1.DeleteVmResponse + 18, // 48: metal.vmprovisioner.v1.VmService.BootVm:output_type -> metal.vmprovisioner.v1.BootVmResponse + 20, // 49: metal.vmprovisioner.v1.VmService.ShutdownVm:output_type -> metal.vmprovisioner.v1.ShutdownVmResponse + 22, // 50: metal.vmprovisioner.v1.VmService.PauseVm:output_type -> metal.vmprovisioner.v1.PauseVmResponse + 24, // 51: metal.vmprovisioner.v1.VmService.ResumeVm:output_type -> metal.vmprovisioner.v1.ResumeVmResponse + 26, // 52: metal.vmprovisioner.v1.VmService.RebootVm:output_type -> metal.vmprovisioner.v1.RebootVmResponse + 28, // 53: metal.vmprovisioner.v1.VmService.GetVmInfo:output_type -> metal.vmprovisioner.v1.GetVmInfoResponse + 35, // 54: metal.vmprovisioner.v1.VmService.ListVms:output_type -> metal.vmprovisioner.v1.ListVmsResponse + 46, // [46:55] is the sub-list for method output_type + 37, // [37:46] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name +} + +func init() { file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_init() } +func file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_init() { + if File_proto_metal_vmprovisioner_v1_vmprovisioner_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDesc), len(file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_rawDesc)), + NumEnums: 2, + NumMessages: 43, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_goTypes, + DependencyIndexes: file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_depIdxs, + EnumInfos: file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_enumTypes, + MessageInfos: file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_msgTypes, + }.Build() + File_proto_metal_vmprovisioner_v1_vmprovisioner_proto = out.File + file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_goTypes = nil + file_proto_metal_vmprovisioner_v1_vmprovisioner_proto_depIdxs = nil +} diff --git a/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect/vmprovisioner.connect.go b/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect/vmprovisioner.connect.go new file mode 100644 index 0000000000..a77657ec28 --- /dev/null +++ b/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect/vmprovisioner.connect.go @@ -0,0 +1,362 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: proto/metal/vmprovisioner/v1/vmprovisioner.proto + +package vmprovisionerv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // VmServiceName is the fully-qualified name of the VmService service. + VmServiceName = "metal.vmprovisioner.v1.VmService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // VmServiceCreateVmProcedure is the fully-qualified name of the VmService's CreateVm RPC. + VmServiceCreateVmProcedure = "/metal.vmprovisioner.v1.VmService/CreateVm" + // VmServiceDeleteVmProcedure is the fully-qualified name of the VmService's DeleteVm RPC. + VmServiceDeleteVmProcedure = "/metal.vmprovisioner.v1.VmService/DeleteVm" + // VmServiceBootVmProcedure is the fully-qualified name of the VmService's BootVm RPC. + VmServiceBootVmProcedure = "/metal.vmprovisioner.v1.VmService/BootVm" + // VmServiceShutdownVmProcedure is the fully-qualified name of the VmService's ShutdownVm RPC. + VmServiceShutdownVmProcedure = "/metal.vmprovisioner.v1.VmService/ShutdownVm" + // VmServicePauseVmProcedure is the fully-qualified name of the VmService's PauseVm RPC. + VmServicePauseVmProcedure = "/metal.vmprovisioner.v1.VmService/PauseVm" + // VmServiceResumeVmProcedure is the fully-qualified name of the VmService's ResumeVm RPC. + VmServiceResumeVmProcedure = "/metal.vmprovisioner.v1.VmService/ResumeVm" + // VmServiceRebootVmProcedure is the fully-qualified name of the VmService's RebootVm RPC. + VmServiceRebootVmProcedure = "/metal.vmprovisioner.v1.VmService/RebootVm" + // VmServiceGetVmInfoProcedure is the fully-qualified name of the VmService's GetVmInfo RPC. + VmServiceGetVmInfoProcedure = "/metal.vmprovisioner.v1.VmService/GetVmInfo" + // VmServiceListVmsProcedure is the fully-qualified name of the VmService's ListVms RPC. + VmServiceListVmsProcedure = "/metal.vmprovisioner.v1.VmService/ListVms" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + vmServiceServiceDescriptor = v1.File_proto_metal_vmprovisioner_v1_vmprovisioner_proto.Services().ByName("VmService") + vmServiceCreateVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("CreateVm") + vmServiceDeleteVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("DeleteVm") + vmServiceBootVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("BootVm") + vmServiceShutdownVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("ShutdownVm") + vmServicePauseVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("PauseVm") + vmServiceResumeVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("ResumeVm") + vmServiceRebootVmMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("RebootVm") + vmServiceGetVmInfoMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("GetVmInfo") + vmServiceListVmsMethodDescriptor = vmServiceServiceDescriptor.Methods().ByName("ListVms") +) + +// VmServiceClient is a client for the metal.vmprovisioner.v1.VmService service. +type VmServiceClient interface { + // CreateVm creates a new virtual machine instance + CreateVm(context.Context, *connect.Request[v1.CreateVmRequest]) (*connect.Response[v1.CreateVmResponse], error) + // DeleteVm removes a virtual machine instance + DeleteVm(context.Context, *connect.Request[v1.DeleteVmRequest]) (*connect.Response[v1.DeleteVmResponse], error) + // BootVm starts a created virtual machine + BootVm(context.Context, *connect.Request[v1.BootVmRequest]) (*connect.Response[v1.BootVmResponse], error) + // ShutdownVm gracefully stops a running virtual machine + ShutdownVm(context.Context, *connect.Request[v1.ShutdownVmRequest]) (*connect.Response[v1.ShutdownVmResponse], error) + // PauseVm pauses a running virtual machine + PauseVm(context.Context, *connect.Request[v1.PauseVmRequest]) (*connect.Response[v1.PauseVmResponse], error) + // ResumeVm resumes a paused virtual machine + ResumeVm(context.Context, *connect.Request[v1.ResumeVmRequest]) (*connect.Response[v1.ResumeVmResponse], error) + // RebootVm restarts a running virtual machine + RebootVm(context.Context, *connect.Request[v1.RebootVmRequest]) (*connect.Response[v1.RebootVmResponse], error) + // GetVmInfo retrieves virtual machine status and configuration + GetVmInfo(context.Context, *connect.Request[v1.GetVmInfoRequest]) (*connect.Response[v1.GetVmInfoResponse], error) + // ListVms lists all virtual machines managed by this service + ListVms(context.Context, *connect.Request[v1.ListVmsRequest]) (*connect.Response[v1.ListVmsResponse], error) +} + +// NewVmServiceClient constructs a client for the metal.vmprovisioner.v1.VmService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewVmServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VmServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &vmServiceClient{ + createVm: connect.NewClient[v1.CreateVmRequest, v1.CreateVmResponse]( + httpClient, + baseURL+VmServiceCreateVmProcedure, + connect.WithSchema(vmServiceCreateVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + deleteVm: connect.NewClient[v1.DeleteVmRequest, v1.DeleteVmResponse]( + httpClient, + baseURL+VmServiceDeleteVmProcedure, + connect.WithSchema(vmServiceDeleteVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + bootVm: connect.NewClient[v1.BootVmRequest, v1.BootVmResponse]( + httpClient, + baseURL+VmServiceBootVmProcedure, + connect.WithSchema(vmServiceBootVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + shutdownVm: connect.NewClient[v1.ShutdownVmRequest, v1.ShutdownVmResponse]( + httpClient, + baseURL+VmServiceShutdownVmProcedure, + connect.WithSchema(vmServiceShutdownVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + pauseVm: connect.NewClient[v1.PauseVmRequest, v1.PauseVmResponse]( + httpClient, + baseURL+VmServicePauseVmProcedure, + connect.WithSchema(vmServicePauseVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + resumeVm: connect.NewClient[v1.ResumeVmRequest, v1.ResumeVmResponse]( + httpClient, + baseURL+VmServiceResumeVmProcedure, + connect.WithSchema(vmServiceResumeVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + rebootVm: connect.NewClient[v1.RebootVmRequest, v1.RebootVmResponse]( + httpClient, + baseURL+VmServiceRebootVmProcedure, + connect.WithSchema(vmServiceRebootVmMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getVmInfo: connect.NewClient[v1.GetVmInfoRequest, v1.GetVmInfoResponse]( + httpClient, + baseURL+VmServiceGetVmInfoProcedure, + connect.WithSchema(vmServiceGetVmInfoMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listVms: connect.NewClient[v1.ListVmsRequest, v1.ListVmsResponse]( + httpClient, + baseURL+VmServiceListVmsProcedure, + connect.WithSchema(vmServiceListVmsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// vmServiceClient implements VmServiceClient. +type vmServiceClient struct { + createVm *connect.Client[v1.CreateVmRequest, v1.CreateVmResponse] + deleteVm *connect.Client[v1.DeleteVmRequest, v1.DeleteVmResponse] + bootVm *connect.Client[v1.BootVmRequest, v1.BootVmResponse] + shutdownVm *connect.Client[v1.ShutdownVmRequest, v1.ShutdownVmResponse] + pauseVm *connect.Client[v1.PauseVmRequest, v1.PauseVmResponse] + resumeVm *connect.Client[v1.ResumeVmRequest, v1.ResumeVmResponse] + rebootVm *connect.Client[v1.RebootVmRequest, v1.RebootVmResponse] + getVmInfo *connect.Client[v1.GetVmInfoRequest, v1.GetVmInfoResponse] + listVms *connect.Client[v1.ListVmsRequest, v1.ListVmsResponse] +} + +// CreateVm calls metal.vmprovisioner.v1.VmService.CreateVm. +func (c *vmServiceClient) CreateVm(ctx context.Context, req *connect.Request[v1.CreateVmRequest]) (*connect.Response[v1.CreateVmResponse], error) { + return c.createVm.CallUnary(ctx, req) +} + +// DeleteVm calls metal.vmprovisioner.v1.VmService.DeleteVm. +func (c *vmServiceClient) DeleteVm(ctx context.Context, req *connect.Request[v1.DeleteVmRequest]) (*connect.Response[v1.DeleteVmResponse], error) { + return c.deleteVm.CallUnary(ctx, req) +} + +// BootVm calls metal.vmprovisioner.v1.VmService.BootVm. +func (c *vmServiceClient) BootVm(ctx context.Context, req *connect.Request[v1.BootVmRequest]) (*connect.Response[v1.BootVmResponse], error) { + return c.bootVm.CallUnary(ctx, req) +} + +// ShutdownVm calls metal.vmprovisioner.v1.VmService.ShutdownVm. +func (c *vmServiceClient) ShutdownVm(ctx context.Context, req *connect.Request[v1.ShutdownVmRequest]) (*connect.Response[v1.ShutdownVmResponse], error) { + return c.shutdownVm.CallUnary(ctx, req) +} + +// PauseVm calls metal.vmprovisioner.v1.VmService.PauseVm. +func (c *vmServiceClient) PauseVm(ctx context.Context, req *connect.Request[v1.PauseVmRequest]) (*connect.Response[v1.PauseVmResponse], error) { + return c.pauseVm.CallUnary(ctx, req) +} + +// ResumeVm calls metal.vmprovisioner.v1.VmService.ResumeVm. +func (c *vmServiceClient) ResumeVm(ctx context.Context, req *connect.Request[v1.ResumeVmRequest]) (*connect.Response[v1.ResumeVmResponse], error) { + return c.resumeVm.CallUnary(ctx, req) +} + +// RebootVm calls metal.vmprovisioner.v1.VmService.RebootVm. +func (c *vmServiceClient) RebootVm(ctx context.Context, req *connect.Request[v1.RebootVmRequest]) (*connect.Response[v1.RebootVmResponse], error) { + return c.rebootVm.CallUnary(ctx, req) +} + +// GetVmInfo calls metal.vmprovisioner.v1.VmService.GetVmInfo. +func (c *vmServiceClient) GetVmInfo(ctx context.Context, req *connect.Request[v1.GetVmInfoRequest]) (*connect.Response[v1.GetVmInfoResponse], error) { + return c.getVmInfo.CallUnary(ctx, req) +} + +// ListVms calls metal.vmprovisioner.v1.VmService.ListVms. +func (c *vmServiceClient) ListVms(ctx context.Context, req *connect.Request[v1.ListVmsRequest]) (*connect.Response[v1.ListVmsResponse], error) { + return c.listVms.CallUnary(ctx, req) +} + +// VmServiceHandler is an implementation of the metal.vmprovisioner.v1.VmService service. +type VmServiceHandler interface { + // CreateVm creates a new virtual machine instance + CreateVm(context.Context, *connect.Request[v1.CreateVmRequest]) (*connect.Response[v1.CreateVmResponse], error) + // DeleteVm removes a virtual machine instance + DeleteVm(context.Context, *connect.Request[v1.DeleteVmRequest]) (*connect.Response[v1.DeleteVmResponse], error) + // BootVm starts a created virtual machine + BootVm(context.Context, *connect.Request[v1.BootVmRequest]) (*connect.Response[v1.BootVmResponse], error) + // ShutdownVm gracefully stops a running virtual machine + ShutdownVm(context.Context, *connect.Request[v1.ShutdownVmRequest]) (*connect.Response[v1.ShutdownVmResponse], error) + // PauseVm pauses a running virtual machine + PauseVm(context.Context, *connect.Request[v1.PauseVmRequest]) (*connect.Response[v1.PauseVmResponse], error) + // ResumeVm resumes a paused virtual machine + ResumeVm(context.Context, *connect.Request[v1.ResumeVmRequest]) (*connect.Response[v1.ResumeVmResponse], error) + // RebootVm restarts a running virtual machine + RebootVm(context.Context, *connect.Request[v1.RebootVmRequest]) (*connect.Response[v1.RebootVmResponse], error) + // GetVmInfo retrieves virtual machine status and configuration + GetVmInfo(context.Context, *connect.Request[v1.GetVmInfoRequest]) (*connect.Response[v1.GetVmInfoResponse], error) + // ListVms lists all virtual machines managed by this service + ListVms(context.Context, *connect.Request[v1.ListVmsRequest]) (*connect.Response[v1.ListVmsResponse], error) +} + +// NewVmServiceHandler builds an HTTP handler from the service implementation. It returns the path +// on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewVmServiceHandler(svc VmServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + vmServiceCreateVmHandler := connect.NewUnaryHandler( + VmServiceCreateVmProcedure, + svc.CreateVm, + connect.WithSchema(vmServiceCreateVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceDeleteVmHandler := connect.NewUnaryHandler( + VmServiceDeleteVmProcedure, + svc.DeleteVm, + connect.WithSchema(vmServiceDeleteVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceBootVmHandler := connect.NewUnaryHandler( + VmServiceBootVmProcedure, + svc.BootVm, + connect.WithSchema(vmServiceBootVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceShutdownVmHandler := connect.NewUnaryHandler( + VmServiceShutdownVmProcedure, + svc.ShutdownVm, + connect.WithSchema(vmServiceShutdownVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServicePauseVmHandler := connect.NewUnaryHandler( + VmServicePauseVmProcedure, + svc.PauseVm, + connect.WithSchema(vmServicePauseVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceResumeVmHandler := connect.NewUnaryHandler( + VmServiceResumeVmProcedure, + svc.ResumeVm, + connect.WithSchema(vmServiceResumeVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceRebootVmHandler := connect.NewUnaryHandler( + VmServiceRebootVmProcedure, + svc.RebootVm, + connect.WithSchema(vmServiceRebootVmMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceGetVmInfoHandler := connect.NewUnaryHandler( + VmServiceGetVmInfoProcedure, + svc.GetVmInfo, + connect.WithSchema(vmServiceGetVmInfoMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + vmServiceListVmsHandler := connect.NewUnaryHandler( + VmServiceListVmsProcedure, + svc.ListVms, + connect.WithSchema(vmServiceListVmsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/metal.vmprovisioner.v1.VmService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case VmServiceCreateVmProcedure: + vmServiceCreateVmHandler.ServeHTTP(w, r) + case VmServiceDeleteVmProcedure: + vmServiceDeleteVmHandler.ServeHTTP(w, r) + case VmServiceBootVmProcedure: + vmServiceBootVmHandler.ServeHTTP(w, r) + case VmServiceShutdownVmProcedure: + vmServiceShutdownVmHandler.ServeHTTP(w, r) + case VmServicePauseVmProcedure: + vmServicePauseVmHandler.ServeHTTP(w, r) + case VmServiceResumeVmProcedure: + vmServiceResumeVmHandler.ServeHTTP(w, r) + case VmServiceRebootVmProcedure: + vmServiceRebootVmHandler.ServeHTTP(w, r) + case VmServiceGetVmInfoProcedure: + vmServiceGetVmInfoHandler.ServeHTTP(w, r) + case VmServiceListVmsProcedure: + vmServiceListVmsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedVmServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedVmServiceHandler struct{} + +func (UnimplementedVmServiceHandler) CreateVm(context.Context, *connect.Request[v1.CreateVmRequest]) (*connect.Response[v1.CreateVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.CreateVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) DeleteVm(context.Context, *connect.Request[v1.DeleteVmRequest]) (*connect.Response[v1.DeleteVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.DeleteVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) BootVm(context.Context, *connect.Request[v1.BootVmRequest]) (*connect.Response[v1.BootVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.BootVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) ShutdownVm(context.Context, *connect.Request[v1.ShutdownVmRequest]) (*connect.Response[v1.ShutdownVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.ShutdownVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) PauseVm(context.Context, *connect.Request[v1.PauseVmRequest]) (*connect.Response[v1.PauseVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.PauseVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) ResumeVm(context.Context, *connect.Request[v1.ResumeVmRequest]) (*connect.Response[v1.ResumeVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.ResumeVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) RebootVm(context.Context, *connect.Request[v1.RebootVmRequest]) (*connect.Response[v1.RebootVmResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.RebootVm is not implemented")) +} + +func (UnimplementedVmServiceHandler) GetVmInfo(context.Context, *connect.Request[v1.GetVmInfoRequest]) (*connect.Response[v1.GetVmInfoResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.GetVmInfo is not implemented")) +} + +func (UnimplementedVmServiceHandler) ListVms(context.Context, *connect.Request[v1.ListVmsRequest]) (*connect.Response[v1.ListVmsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metal.vmprovisioner.v1.VmService.ListVms is not implemented")) +} diff --git a/go/go.mod b/go/go.mod index 466db389bf..35fab039bf 100644 --- a/go/go.mod +++ b/go/go.mod @@ -1,6 +1,6 @@ module github.com/unkeyed/unkey/go -go 1.24.0 +go 1.24.4 require ( connectrpc.com/connect v1.18.1 @@ -28,26 +28,29 @@ require ( github.com/shirou/gopsutil/v4 v4.25.5 github.com/sqlc-dev/sqlc v1.28.0 github.com/stretchr/testify v1.10.0 + github.com/unkeyed/unkey/go/deploy/assetmanagerd v0.0.0-20250709084132-0dd195e4c51b + github.com/unkeyed/unkey/go/deploy/billaged v0.0.0-20250709084132-0dd195e4c51b + github.com/unkeyed/unkey/go/deploy/builderd v0.0.0-20250709084132-0dd195e4c51b github.com/urfave/cli/v3 v3.3.3 go.opentelemetry.io/contrib/bridges/otelslog v0.11.0 go.opentelemetry.io/contrib/bridges/prometheus v0.61.0 go.opentelemetry.io/contrib/processors/minsev v0.9.0 - go.opentelemetry.io/otel v1.36.0 + go.opentelemetry.io/otel v1.37.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.12.2 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.36.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 - go.opentelemetry.io/otel/metric v1.36.0 - go.opentelemetry.io/otel/sdk v1.36.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0 + go.opentelemetry.io/otel/metric v1.37.0 + go.opentelemetry.io/otel/sdk v1.37.0 go.opentelemetry.io/otel/sdk/log v0.12.2 - go.opentelemetry.io/otel/sdk/metric v1.36.0 - go.opentelemetry.io/otel/trace v1.36.0 - golang.org/x/net v0.40.0 - golang.org/x/text v0.25.0 + go.opentelemetry.io/otel/sdk/metric v1.37.0 + go.opentelemetry.io/otel/trace v1.37.0 + golang.org/x/net v0.41.0 + golang.org/x/text v0.26.0 google.golang.org/protobuf v1.36.6 ) require ( - cel.dev/expr v0.20.0 // indirect + cel.dev/expr v0.23.0 // indirect dario.cat/mergo v1.0.2 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect @@ -110,7 +113,7 @@ require ( github.com/google/cel-go v0.22.1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect @@ -151,7 +154,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.64.0 // indirect + github.com/prometheus/common v0.65.0 // indirect github.com/prometheus/procfs v0.16.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect @@ -178,21 +181,21 @@ require ( github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect go.opentelemetry.io/otel/log v0.12.2 // indirect go.opentelemetry.io/proto/otlp v1.7.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.38.0 // indirect + golang.org/x/crypto v0.39.0 // indirect golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/sync v0.14.0 // indirect + golang.org/x/mod v0.25.0 // indirect + golang.org/x/sync v0.15.0 // indirect golang.org/x/sys v0.33.0 // indirect - golang.org/x/tools v0.31.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect - google.golang.org/grpc v1.72.2 // indirect + golang.org/x/tools v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/grpc v1.73.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go/go.sum b/go/go.sum index 818d615f88..beb54a8d1c 100644 --- a/go/go.sum +++ b/go/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.20.0 h1:OunBvVCfvpWlt4dN7zg3FM6TDkzOePe1+foGJ9AXeeI= -cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.23.0 h1:wUb94w6OYQS4uXraxo9U+wUAs9jT47Xvl4iPgAwM2ss= +cel.dev/expr v0.23.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= @@ -192,8 +192,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -327,8 +327,8 @@ github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/ github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4= -github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= +github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/redis/go-redis/v9 v9.9.0 h1:URbPQ4xVQSQhZ27WMQVmZSo3uT3pL+4IdHVcYq2nVfM= @@ -386,6 +386,12 @@ github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfj github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/unkeyed/unkey/go/deploy/assetmanagerd v0.0.0-20250709084132-0dd195e4c51b h1:102XGZQrY3viWW78AQ/piW0rwSPSMljGmz6QgiNLYrw= +github.com/unkeyed/unkey/go/deploy/assetmanagerd v0.0.0-20250709084132-0dd195e4c51b/go.mod h1:0FGpQCOhGyvLQyCawTdYnLOY/1/mtPSSWndCwgaMnkc= +github.com/unkeyed/unkey/go/deploy/billaged v0.0.0-20250709084132-0dd195e4c51b h1:xrwqIkZSBoeHEG633k9gFneN3WcZbOTVSaxs+TgknLk= +github.com/unkeyed/unkey/go/deploy/billaged v0.0.0-20250709084132-0dd195e4c51b/go.mod h1:E88GqmQBLAmuRWX8bRG7Pf56Cfmut6YQApUpFVe7PuQ= +github.com/unkeyed/unkey/go/deploy/builderd v0.0.0-20250709084132-0dd195e4c51b h1:nyFQrGeZyvt5Nbcz5n9YDzUC4S2gezRoIWWKrwdLCik= +github.com/unkeyed/unkey/go/deploy/builderd v0.0.0-20250709084132-0dd195e4c51b/go.mod h1:yEwRt1cVfgrHF09ZynWIWV2MSj0tIGysTuLGBJR5TTM= github.com/urfave/cli/v3 v3.3.3 h1:byCBaVdIXuLPIDm5CYZRVG6NvT7tv1ECqdU4YzlEa3I= github.com/urfave/cli/v3 v3.3.3/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo= github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= @@ -424,30 +430,30 @@ go.opentelemetry.io/contrib/bridges/prometheus v0.61.0 h1:RyrtJzu5MAmIcbRrwg75b+ go.opentelemetry.io/contrib/bridges/prometheus v0.61.0/go.mod h1:tirr4p9NXbzjlbruiRGp53IzlYrDk5CO2fdHj0sSSaY= go.opentelemetry.io/contrib/processors/minsev v0.9.0 h1:eKlDcNp+GSygGk6PMJJyEdej+E1HteUy+KsY2YzaLbM= go.opentelemetry.io/contrib/processors/minsev v0.9.0/go.mod h1:p8UCIy0r8hjrVD1Hb/4IUDSIpiZmlJl5DhCZOYgMWc4= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.12.2 h1:tPLwQlXbJ8NSOfZc4OkgU5h2A38M4c9kfHSVc4PFQGs= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.12.2/go.mod h1:QTnxBwT/1rBIgAG1goq6xMydfYOBKU6KTiYF4fp5zL8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.36.0 h1:gAU726w9J8fwr4qRDqu1GYMNNs4gXrU+Pv20/N1UpB4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.36.0/go.mod h1:RboSDkp7N292rgu+T0MgVt2qgFGu6qa1RpZDOtpL76w= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 h1:dNzwXjZKpMpE2JhmO+9HsPl42NIXFIFSUSSs0fiqra0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0/go.mod h1:90PoxvaEB5n6AOdZvi+yWJQoE95U8Dhhw2bSyRqnTD0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 h1:nRVXXvf78e00EwY6Wp0YII8ww2JVWshZ20HfTlE11AM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0/go.mod h1:r49hO7CgrxY9Voaj3Xe8pANWtr0Oq916d0XAmOoCZAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0 h1:9PgnL3QNlj10uGxExowIDIZu66aVBwWhXmbOp1pa6RA= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0/go.mod h1:0ineDcLELf6JmKfuo0wvvhAVMuxWFYvkTin2iV4ydPQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0 h1:bDMKF3RUSxshZ5OjOTi8rsHGaPKsAt76FaqgvIUySLc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0/go.mod h1:dDT67G/IkA46Mr2l9Uj7HsQVwsjASyV9SjGofsiUZDA= go.opentelemetry.io/otel/log v0.12.2 h1:yob9JVHn2ZY24byZeaXpTVoPS6l+UrrxmxmPKohXTwc= go.opentelemetry.io/otel/log v0.12.2/go.mod h1:ShIItIxSYxufUMt+1H5a2wbckGli3/iCfuEbVZi/98E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= go.opentelemetry.io/otel/sdk/log v0.12.2 h1:yNoETvTByVKi7wHvYS6HMcZrN5hFLD7I++1xIZ/k6W0= go.opentelemetry.io/otel/sdk/log v0.12.2/go.mod h1:DcpdmUXHJgSqN/dh+XMWa7Vf89u9ap0/AAk/XGLnEzY= go.opentelemetry.io/otel/sdk/log/logtest v0.0.0-20250521073539-a85ae98dcedc h1:uqxdywfHqqCl6LmZzI3pUnXT1RGFYyUgxj0AkWPFxi0= go.opentelemetry.io/otel/sdk/log/logtest v0.0.0-20250521073539-a85ae98dcedc/go.mod h1:TY/N/FT7dmFrP/r5ym3g0yysP1DefqGpAZr4f82P0dE= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -471,15 +477,15 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -487,15 +493,15 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -517,8 +523,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -526,18 +532,18 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= -google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY= +google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= +google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/go/deploy/metald/proto/vmprovisioner/v1/vm.proto b/go/proto/metal/vmprovisioner/v1/vmprovisioner.proto similarity index 98% rename from go/deploy/metald/proto/vmprovisioner/v1/vm.proto rename to go/proto/metal/vmprovisioner/v1/vmprovisioner.proto index 27983ed2c0..b39908adba 100644 --- a/go/deploy/metald/proto/vmprovisioner/v1/vm.proto +++ b/go/proto/metal/vmprovisioner/v1/vmprovisioner.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package vmprovisioner.v1; +package metal.vmprovisioner.v1; -option go_package = "metald/gen/vmprovisioner/v1;vmprovisionerv1"; +option go_package = "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1;vmprovisionerv1"; // VmService provides unified VM management across different hypervisor backends service VmService { @@ -387,4 +387,4 @@ message VmInfo { // Customer identifier string customer_id = 8; -} +} \ No newline at end of file From 0de77f5a26e4a594623fdbcdfc575049e2e5573d Mon Sep 17 00:00:00 2001 From: chronark Date: Wed, 9 Jul 2025 12:10:02 +0200 Subject: [PATCH 2/3] feat: workflow calls metald to create and boot a vm --- go/apps/ctrl/run.go | 3 +- .../ctrl/services/version/deploy_workflow.go | 358 ++++++++++++------ 2 files changed, 247 insertions(+), 114 deletions(-) diff --git a/go/apps/ctrl/run.go b/go/apps/ctrl/run.go index 8ea9b829c9..2f23aef4b8 100644 --- a/go/apps/ctrl/run.go +++ b/go/apps/ctrl/run.go @@ -103,7 +103,8 @@ func Run(ctx context.Context, cfg Config) error { builderService := builder.NewMockService() // Register deployment workflow with Hydra worker - deployWorkflow := version.NewDeployWorkflow(database, logger, builderService) + // TODO: Replace nil with actual metald client when available + deployWorkflow := version.NewDeployWorkflow(database, logger, builderService, nil) err = hydra.RegisterWorkflow(hydraWorker, deployWorkflow) if err != nil { return fmt.Errorf("unable to register deployment workflow: %w", err) diff --git a/go/apps/ctrl/services/version/deploy_workflow.go b/go/apps/ctrl/services/version/deploy_workflow.go index 29c50374d0..d5408d21f8 100644 --- a/go/apps/ctrl/services/version/deploy_workflow.go +++ b/go/apps/ctrl/services/version/deploy_workflow.go @@ -6,6 +6,9 @@ import ( "fmt" "time" + "connectrpc.com/connect" + vmprovisionerv1 "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1" + "github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect" "github.com/unkeyed/unkey/go/pkg/builder" "github.com/unkeyed/unkey/go/pkg/db" "github.com/unkeyed/unkey/go/pkg/hydra" @@ -18,14 +21,16 @@ type DeployWorkflow struct { db db.Database logger logging.Logger builderService builder.Service + metaldClient vmprovisionerv1connect.VmServiceClient } // NewDeployWorkflow creates a new deploy workflow instance -func NewDeployWorkflow(database db.Database, logger logging.Logger, builderService builder.Service) *DeployWorkflow { +func NewDeployWorkflow(database db.Database, logger logging.Logger, builderService builder.Service, metaldClient vmprovisionerv1connect.VmServiceClient) *DeployWorkflow { return &DeployWorkflow{ db: database, logger: logger, builderService: builderService, + metaldClient: metaldClient, } } @@ -140,129 +145,204 @@ func (w *DeployWorkflow) Run(ctx hydra.WorkflowContext, req *DeployRequest) erro return err } - // Step 7: Wait for build completion with polling - buildResult, err := hydra.Step(ctx, "wait-for-completion", func(stepCtx context.Context) (*BuildResult, error) { - w.logger.Info("waiting for build completion", "build_id", buildID) + // Wait for build completion with polling (max 150 attempts = 5 minutes) + var buildResult *BuildResult + lastStatus := "" - ticker := time.NewTicker(2 * time.Second) - defer ticker.Stop() - - lastStatus := "" - - for { - select { - case <-stepCtx.Done(): - return nil, stepCtx.Err() - case <-ticker.C: - buildStatus, statusErr := w.builderService.GetBuildStatus(stepCtx, buildID) - if statusErr != nil { - w.logger.Error("failed to get build status", "build_id", buildID, "error", statusErr) - continue - } - - currentStatus := string(buildStatus.Status) + for attempt := 1; attempt <= 150; attempt++ { + currentBuildStatus, err := hydra.Step(ctx, fmt.Sprintf("check-build-status-%d", attempt), func(stepCtx context.Context) (*builder.BuildInfo, error) { + buildStatus, statusErr := w.builderService.GetBuildStatus(stepCtx, buildID) + if statusErr != nil { + return nil, fmt.Errorf("failed to get build status: %w", statusErr) + } - // Only update if status changed - if currentStatus == lastStatus { - continue - } + w.logger.Info("build status check", "build_id", buildID, "status", string(buildStatus.Status), "attempt", attempt) + return buildStatus, nil + }) + if err != nil { + w.logger.Error("failed to check build status", "error", err, "build_id", buildID, "attempt", attempt) + return err + } - w.logger.Info("build status update", "build_id", buildID, "status", currentStatus) - lastStatus = currentStatus - - _, err = hydra.Step(ctx, "update-build-status", func(updateCtx context.Context) (*struct{}, error) { - now := time.Now().UnixMilli() - - switch buildStatus.Status { - case builder.BuildStatusQueued: - // Build is queued, no update needed yet - // Continue polling without database update - - case builder.BuildStatusRunning: - runningErr := db.Query.UpdateBuildStatus(updateCtx, w.db.RW(), db.UpdateBuildStatusParams{ - ID: buildID, - Status: db.BuildsStatusRunning, - Now: sql.NullInt64{Valid: true, Int64: now}, - }) - if runningErr != nil { - return nil, fmt.Errorf("failed to update build status to running: %w", runningErr) - } - - case builder.BuildStatusSuccess: - successErr := db.Query.UpdateBuildSucceeded(updateCtx, w.db.RW(), db.UpdateBuildSucceededParams{ - ID: buildID, - Now: sql.NullInt64{Valid: true, Int64: now}, - }) - if successErr != nil { - return nil, fmt.Errorf("failed to update build status to succeeded: %w", successErr) - } - - case builder.BuildStatusFailed: - failedErr := db.Query.UpdateBuildFailed(updateCtx, w.db.RW(), db.UpdateBuildFailedParams{ - ID: buildID, - ErrorMessage: sql.NullString{String: buildStatus.ErrorMsg, Valid: buildStatus.ErrorMsg != ""}, - Now: sql.NullInt64{Valid: true, Int64: now}, - }) - if failedErr != nil { - return nil, fmt.Errorf("failed to update build status to failed: %w", failedErr) - } - - // Also update version status to failed - versionErr := db.Query.UpdateVersionStatus(updateCtx, w.db.RW(), db.UpdateVersionStatusParams{ - ID: req.VersionID, - Status: db.VersionsStatusFailed, - Now: sql.NullInt64{Valid: true, Int64: now}, - }) - if versionErr != nil { - return nil, fmt.Errorf("failed to update version status to failed: %w", versionErr) - } - } + currentStatus := string(currentBuildStatus.Status) - return &struct{}{}, nil - }) - if err != nil { - w.logger.Error("failed to update build status", "error", err, "status", currentStatus) - if buildStatus.Status != builder.BuildStatusFailed { - continue // For non-failed states, continue polling - } - } + // Skip database update if status hasn't changed + if currentStatus == lastStatus { + // Status unchanged, continue to build completion check + } else { + _, err = hydra.Step(ctx, fmt.Sprintf("update-build-status-%d", attempt), func(updateCtx context.Context) (*struct{}, error) { + now := time.Now().UnixMilli() - // Return appropriate result based on final status - switch buildStatus.Status { + switch currentBuildStatus.Status { case builder.BuildStatusQueued: - // Continue polling, build is still queued - continue + // Build is queued, no update needed yet case builder.BuildStatusRunning: - // Continue polling, build is still running - continue + runningErr := db.Query.UpdateBuildStatus(updateCtx, w.db.RW(), db.UpdateBuildStatusParams{ + ID: buildID, + Status: db.BuildsStatusRunning, + Now: sql.NullInt64{Valid: true, Int64: now}, + }) + if runningErr != nil { + return nil, fmt.Errorf("failed to update build status to running: %w", runningErr) + } case builder.BuildStatusSuccess: - return &BuildResult{ - BuildID: buildID, - Status: "succeeded", - ErrorMsg: "", - }, nil + successErr := db.Query.UpdateBuildSucceeded(updateCtx, w.db.RW(), db.UpdateBuildSucceededParams{ + ID: buildID, + Now: sql.NullInt64{Valid: true, Int64: now}, + }) + if successErr != nil { + return nil, fmt.Errorf("failed to update build status to succeeded: %w", successErr) + } case builder.BuildStatusFailed: - return &BuildResult{ - BuildID: buildID, - Status: "failed", - ErrorMsg: buildStatus.ErrorMsg, - }, fmt.Errorf("build failed: %s", buildStatus.ErrorMsg) + failedErr := db.Query.UpdateBuildFailed(updateCtx, w.db.RW(), db.UpdateBuildFailedParams{ + ID: buildID, + ErrorMessage: sql.NullString{String: currentBuildStatus.ErrorMsg, Valid: currentBuildStatus.ErrorMsg != ""}, + Now: sql.NullInt64{Valid: true, Int64: now}, + }) + if failedErr != nil { + return nil, fmt.Errorf("failed to update build status to failed: %w", failedErr) + } + + // Also update version status to failed + versionErr := db.Query.UpdateVersionStatus(updateCtx, w.db.RW(), db.UpdateVersionStatusParams{ + ID: req.VersionID, + Status: db.VersionsStatusFailed, + Now: sql.NullInt64{Valid: true, Int64: now}, + }) + if versionErr != nil { + return nil, fmt.Errorf("failed to update version status to failed: %w", versionErr) + } } + + return &struct{}{}, nil + }) + if err != nil { + w.logger.Error("failed to update build status", "error", err, "status", currentStatus, "attempt", attempt) + return err + } + lastStatus = currentStatus + } + + // Check if build is complete + switch currentBuildStatus.Status { + case builder.BuildStatusSuccess: + buildResult = &BuildResult{ + BuildID: buildID, + Status: "succeeded", + ErrorMsg: "", + } + goto buildComplete + + case builder.BuildStatusFailed: + buildResult = &BuildResult{ + BuildID: buildID, + Status: "failed", + ErrorMsg: currentBuildStatus.ErrorMsg, + } + goto buildComplete + + default: + // Still building, sleep before next attempt + err = hydra.Sleep(ctx, 2*time.Second) + if err != nil { + w.logger.Error("failed to sleep between build checks", "error", err, "attempt", attempt) + return err } } - }) - if err != nil { - w.logger.Error("build failed", "error", err, "build_id", buildID) - return err } - // Step 8: Deploy if build succeeded + // If we reach here, we exceeded max attempts + return fmt.Errorf("build polling timed out after 150 attempts (5 minutes)") + +buildComplete: + + // Handle build failure + if buildResult.Status == "failed" { + w.logger.Error("build failed", "build_id", buildID, "error", buildResult.ErrorMsg) + return fmt.Errorf("build failed: %s", buildResult.ErrorMsg) + } + + // Deploy if build succeeded if buildResult.Status == "succeeded" { - // Step 8b: Update version status to deploying + // Create VM first + createResult, err := hydra.Step(ctx, "create-vm", func(stepCtx context.Context) (*vmprovisionerv1.CreateVmResponse, error) { + w.logger.Info("creating VM for deployment", "version_id", req.VersionID, "docker_image", req.DockerImage) + + // Hardcoded VM configuration (TemplateStandard + ForDockerImage): + vmConfig := &vmprovisionerv1.VmConfig{ + Cpu: &vmprovisionerv1.CpuConfig{ + VcpuCount: 2, + MaxVcpuCount: 4, + }, + Memory: &vmprovisionerv1.MemoryConfig{ + SizeBytes: 2 * 1024 * 1024 * 1024, // 2GB + MaxSizeBytes: 8 * 1024 * 1024 * 1024, // 8GB + HotplugEnabled: true, + }, + Boot: &vmprovisionerv1.BootConfig{ + KernelPath: "/opt/vm-assets/vmlinux", + KernelArgs: "console=ttyS0 reboot=k panic=1 pci=off", + }, + Storage: []*vmprovisionerv1.StorageDevice{{ + Id: "rootfs", + Path: "/opt/vm-assets/rootfs.ext4", + ReadOnly: false, + IsRootDevice: true, + InterfaceType: "virtio-blk", + Options: map[string]string{ + "docker_image": req.DockerImage, + "auto_build": "true", + }, + }}, + Network: []*vmprovisionerv1.NetworkInterface{{ + Id: "eth0", + InterfaceType: "virtio-net", + Mode: vmprovisionerv1.NetworkMode_NETWORK_MODE_DUAL_STACK, + Ipv4Config: &vmprovisionerv1.IPv4Config{ + Dhcp: true, + }, + Ipv6Config: &vmprovisionerv1.IPv6Config{ + Slaac: true, + PrivacyExtensions: true, + }, + }}, + Console: &vmprovisionerv1.ConsoleConfig{ + Enabled: true, + Output: "/tmp/standard-vm-console.log", + ConsoleType: "serial", + }, + Metadata: map[string]string{ + "template": "standard", + "purpose": "general", + "docker_image": req.DockerImage, + "runtime": "docker", + "version_id": req.VersionID, + "workspace_id": req.WorkspaceID, + "project_id": req.ProjectID, + "created_by": "deploy-workflow", + }, + } + + resp, createErr := w.metaldClient.CreateVm(stepCtx, connect.NewRequest(&vmprovisionerv1.CreateVmRequest{ + Config: vmConfig, + })) + if createErr != nil { + return nil, fmt.Errorf("failed to create VM: %w", createErr) + } + + w.logger.Info("VM created successfully", "vm_id", resp.Msg.VmId, "state", resp.Msg.State.String()) + return resp.Msg, nil + }) + if err != nil { + w.logger.Error("VM creation failed", "error", err, "version_id", req.VersionID) + return err + } + + // Update version status to deploying (after successful VM creation) _, err = hydra.Step(ctx, "update-version-deploying", func(stepCtx context.Context) (*struct{}, error) { w.logger.Info("starting deployment", "version_id", req.VersionID) @@ -281,18 +361,70 @@ func (w *DeployWorkflow) Run(ctx hydra.WorkflowContext, req *DeployRequest) erro return err } - // Step 8c: Simulate deployment process - _, err = hydra.Step(ctx, "simulate-deployment", func(stepCtx context.Context) (*struct{}, error) { - // Simulate deployment process (in real implementation, this would orchestrate actual deployment) - time.Sleep(3 * time.Second) - return &struct{}{}, nil + // Check VM readiness (max 30 attempts = 30 seconds) + for attempt := 1; attempt <= 30; attempt++ { + vmInfo, err := hydra.Step(ctx, fmt.Sprintf("check-vm-status-%d", attempt), func(stepCtx context.Context) (*vmprovisionerv1.GetVmInfoResponse, error) { + resp, getErr := w.metaldClient.GetVmInfo(stepCtx, connect.NewRequest(&vmprovisionerv1.GetVmInfoRequest{ + VmId: createResult.VmId, + })) + if getErr != nil { + return nil, fmt.Errorf("failed to get VM info: %w", getErr) + } + + w.logger.Info("VM status check", "vm_id", createResult.VmId, "state", resp.Msg.State.String(), "attempt", attempt) + return resp.Msg, nil + }) + if err != nil { + w.logger.Error("failed to check VM status", "error", err, "vm_id", createResult.VmId, "attempt", attempt) + return err + } + + // Check if VM is ready for boot + if vmInfo.State == vmprovisionerv1.VmState_VM_STATE_CREATED || + vmInfo.State == vmprovisionerv1.VmState_VM_STATE_RUNNING { + w.logger.Info("VM is ready", "vm_id", createResult.VmId, "state", vmInfo.State.String()) + goto vmReady + } + + // Sleep before next attempt (except on last attempt) + if attempt < 30 { + err = hydra.Sleep(ctx, 1*time.Second) + if err != nil { + w.logger.Error("failed to sleep between VM checks", "error", err, "attempt", attempt) + return err + } + } + } + + // If we reach here, VM never became ready + return fmt.Errorf("VM polling timed out after 30 attempts (30 seconds)") + +vmReady: + + // Boot VM + _, err = hydra.Step(ctx, "boot-vm", func(stepCtx context.Context) (*vmprovisionerv1.BootVmResponse, error) { + w.logger.Info("booting VM", "vm_id", createResult.VmId) + + resp, bootErr := w.metaldClient.BootVm(stepCtx, connect.NewRequest(&vmprovisionerv1.BootVmRequest{ + VmId: createResult.VmId, + })) + if bootErr != nil { + return nil, fmt.Errorf("failed to boot VM: %w", bootErr) + } + + if !resp.Msg.Success { + return nil, fmt.Errorf("VM boot was not successful, state: %s", resp.Msg.State.String()) + } + + w.logger.Info("VM booted successfully", "vm_id", createResult.VmId, "state", resp.Msg.State.String()) + return resp.Msg, nil }) if err != nil { - w.logger.Error("deployment simulation failed", "error", err, "version_id", req.VersionID) + w.logger.Error("VM boot failed", "error", err, "vm_id", createResult.VmId) return err } - // Step 8d: Generate completion timestamp + // Generate completion timestamp completionTime, err := hydra.Step(ctx, "generate-completion-timestamp", func(stepCtx context.Context) (int64, error) { return time.Now().UnixMilli(), nil }) @@ -301,7 +433,7 @@ func (w *DeployWorkflow) Run(ctx hydra.WorkflowContext, req *DeployRequest) erro return err } - // Step 8e: Update version status to active + // Update version status to active _, err = hydra.Step(ctx, "update-version-active", func(stepCtx context.Context) (*DeploymentResult, error) { activeErr := db.Query.UpdateVersionStatus(stepCtx, w.db.RW(), db.UpdateVersionStatusParams{ ID: req.VersionID, From 60747e72c8d3751147f0a565e447c6334cfd995d Mon Sep 17 00:00:00 2001 From: chronark Date: Wed, 9 Jul 2025 13:54:10 +0200 Subject: [PATCH 3/3] feat: use spire for tls --- go/apps/ctrl/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go/apps/ctrl/config.go b/go/apps/ctrl/config.go index 0483abad82..253cb668b9 100644 --- a/go/apps/ctrl/config.go +++ b/go/apps/ctrl/config.go @@ -39,6 +39,12 @@ type Config struct { // AuthToken is the authentication token for control plane API access AuthToken string + // MetaldAddress is the full URL of the metald service for VM operations (e.g., "https://metald.example.com:8080") + MetaldAddress string + + // SPIFFESocketPath is the path to the SPIFFE agent socket for mTLS authentication + SPIFFESocketPath string + Clock clock.Clock }