Ctrl Plane

Go Packages

Quick reference for all Ctrl Plane Go packages and their public APIs.

This is a reference map of every package in the module, what it exports, and when you'd use it.

Root package

Import: github.com/xraph/ctrlplane

ExportTypePurpose
EntitystructBase type embedded by all domain entities
NewEntity(prefix)funcCreate an entity with a fresh TypeID and timestamps
ConfigstructGlobal configuration
ErrNotFounderrorResource does not exist
ErrAlreadyExistserrorResource already exists
ErrInvalidStateerrorInvalid state transition
ErrInvalidConfigerrorInvalid configuration
ErrProviderNotFounderrorProvider not registered
ErrUnauthorizederrorAuthentication failed
ErrForbiddenerrorAuthorization denied
ErrQuotaExceedederrorTenant quota exceeded

id

Import: github.com/xraph/ctrlplane/id

TypeID-based identifiers. See Identity.

ExportPurpose
IDThe identifier type
PrefixPrefix type for entity classification
New(prefix)Generate a new ID
Parse(s)Parse a TypeID string
ParseWithPrefix(s, prefix)Parse with prefix validation
NilZero-value ID
PrefixInstance, PrefixDeployment, ...Prefix constants for each entity type

auth

Import: github.com/xraph/ctrlplane/auth

ExportPurpose
ProviderAuthentication/authorization interface
ClaimsIdentity and tenant information
AuthzRequestAuthorization check request
WithClaims(ctx, claims)Store claims in context
ClaimsFrom(ctx)Retrieve claims from context
RequireClaims(ctx)Retrieve claims or return error
NewNoopProvider()Dev/test provider that allows everything

instance

Import: github.com/xraph/ctrlplane/instance

ExportPurpose
ServiceInstance lifecycle interface
StoreInstance persistence interface
InstanceDomain entity
CreateRequest, UpdateRequest, ScaleRequestOperation DTOs
ListOptions, ListResultPagination
ValidateTransition(from, to)State machine validation

deploy

Import: github.com/xraph/ctrlplane/deploy

ExportPurpose
ServiceDeployment orchestration interface
StoreDeployment/release persistence
StrategyDeployment strategy interface
DeploymentDeployment entity
ReleaseImmutable release snapshot
DeployRequestDeployment parameters

health

Import: github.com/xraph/ctrlplane/health

ExportPurpose
ServiceHealth check management interface
StoreHealth persistence
CheckerHealth check type interface
HealthCheckCheck configuration entity
HealthResultCheck execution result
InstanceHealthAggregate health view
StatusHealthy, StatusDegraded, StatusUnhealthy, StatusUnknownStatus constants

provider

Import: github.com/xraph/ctrlplane/provider

ExportPurpose
ProviderCloud orchestrator interface
RegistryNamed provider registry
ProviderInfoProvider metadata
CapabilityFeature flag type
ResourceSpec, ResourceUsageResource allocation types
PortSpec, VolumeSpec, EndpointInfrastructure types
ProvisionRequest, DeployRequestOperation parameters
InstanceStatus, InstanceStateState reporting

network, secrets, telemetry, admin, event, worker

Each follows the same pattern: a Service interface, a Store interface, domain entities, and request/response DTOs. See the individual subsystem documentation pages for details.

store

Import: github.com/xraph/ctrlplane/store

ExportPurpose
StoreAggregate interface composing all subsystem stores

Implementations: store/memory, store/sqlite, store/postgres.

app

Import: github.com/xraph/ctrlplane/app

ExportPurpose
CtrlPlaneRoot orchestrator struct
New(opts...)Constructor
OptionFunctional option type
WithStore, WithAuth, WithProvider, WithEventBus, WithDefaultProviderConfiguration options

api

Import: github.com/xraph/ctrlplane/api

ExportPurpose
APIHTTP handler builder
New(cp)Constructor
Handler()Returns http.Handler with all routes mounted

extension

Import: github.com/xraph/ctrlplane/extension

ExportPurpose
ExtensionForge extension adapter
New(opts...)Constructor
ExtOptionExtension option type
WithAuthProvider, WithProvider, WithBasePath, WithConfig, WithStoreExtension options

On this page