Documentation
¶
Overview ¶
Package ctrl is the root package for the Unkey control plane service.
This package serves as an organizational namespace and does not contain executable code. The control plane implementation is split across several subpackages, each responsible for a distinct concern.
Subpackages ¶
The api subpackage provides the HTTP/2 Connect server that exposes the control plane's public API. It handles authentication, request routing, and serves as the external interface for clients interacting with the control plane.
The worker subpackage implements the Restate workflow engine integration. It hosts long-running asynchronous operations including deployment orchestration, TLS certificate lifecycle management via ACME, and container image builds. The worker registers itself with the Restate admin API for service discovery.
The services subpackage contains domain-specific service implementations that are called by both the API and worker layers. These include the deployment service for managing application deployments, the ACME service for certificate challenges, and the cluster service for node metadata.
The db subpackage provides the database access layer, including schema definitions and query functions for persistent storage operations.
The middleware subpackage contains HTTP middleware components used by the API layer, including authentication and request logging.
The pkg subpackage holds shared utilities used across the control plane, including the build backend abstraction that supports both Depot and Docker for container image building.
The workflows subpackage defines Restate workflow definitions that orchestrate multi-step operations with durable execution guarantees.
The proto subpackage contains Protocol Buffer definitions and generated code for the control plane's gRPC and Connect interfaces.
The integration subpackage provides integration test infrastructure for validating the control plane's behavior against real dependencies.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api provides the control plane HTTP/2 server for Unkey's distributed infrastructure.
|
Package api provides the control plane HTTP/2 server for Unkey's distributed infrastructure. |
|
harness
Package harness provides a unified test harness for ctrl worker integration tests.
|
Package harness provides a unified test harness for ctrl worker integration tests. |
|
internal
|
|
|
auth
Package auth provides shared bearer token authentication for ctrl ConnectRPC services.
|
Package auth provides shared bearer token authentication for ctrl ConnectRPC services. |
|
Package middleware provides authentication and authorization for control plane APIs.
|
Package middleware provides authentication and authorization for control plane APIs. |
|
Package services provides Connect service implementations for the control plane.
|
Package services provides Connect service implementations for the control plane. |
|
acme
Package acme provides ACME certificate challenge management.
|
Package acme provides ACME certificate challenge management. |
|
cluster
Package cluster implements the Connect ClusterService for synchronizing desired state between the control plane and krane agents running in regional Kubernetes clusters.
|
Package cluster implements the Connect ClusterService for synchronizing desired state between the control plane and krane agents running in regional Kubernetes clusters. |
|
ctrl
Package ctrl provides administrative and health check services.
|
Package ctrl provides administrative and health check services. |
|
openapi
Package openapi provides OpenAPI specification and schema documentation.
|
Package openapi provides OpenAPI specification and schema documentation. |
|
Package worker implements the Restate workflow worker for Unkey's control plane.
|
Package worker implements the Restate workflow worker for Unkey's control plane. |
|
certificate
Package certificate implements ACME certificate workflows for SSL/TLS provisioning.
|
Package certificate implements ACME certificate workflows for SSL/TLS provisioning. |
|
clickhouseuser
Package clickhouseuser implements ClickHouse user provisioning workflows.
|
Package clickhouseuser implements ClickHouse user provisioning workflows. |
|
customdomain
Package customdomain implements domain ownership verification workflows.
|
Package customdomain implements domain ownership verification workflows. |
|
deploy
Package deploy orchestrates the deployment lifecycle for user applications.
|
Package deploy orchestrates the deployment lifecycle for user applications. |
|
deployment
Package deployment provides a Restate virtual object that serialises all mutations targeting a single deployment.
|
Package deployment provides a Restate virtual object that serialises all mutations targeting a single deployment. |
|
github
Package github provides a GitHub App client for repository access.
|
Package github provides a GitHub App client for repository access. |
|
keyrefill
Package keyrefill implements a Restate workflow for refilling API key usage limits.
|
Package keyrefill implements a Restate workflow for refilling API key usage limits. |
|
openapi
Package openapi provides a Restate virtual object that scrapes OpenAPI specifications from running user deployments.
|
Package openapi provides a Restate virtual object that scrapes OpenAPI specifications from running user deployments. |
|
quotacheck
Package quotacheck implements a Restate workflow for monitoring workspace quota usage.
|
Package quotacheck implements a Restate workflow for monitoring workspace quota usage. |
|
routing
Package routing manages frontline route assignment for deployments.
|
Package routing manages frontline route assignment for deployments. |
|
versioning
Package versioning provides per-region version counters for state synchronization.
|
Package versioning provides per-region version counters for state synchronization. |