app

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package app provides the CtrlPlane root orchestrator that wires all subsystems together. It is separated from the root ctrlplane package to avoid import cycles, since domain packages embed ctrlplane.Entity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtrlPlane

type CtrlPlane struct {

	// Services are the public subsystem interfaces.
	Instances instance.Service
	Deploys   deploy.Service
	Health    health.Service
	Telemetry telemetry.Service
	Network   network.Service
	Secrets   secrets.Service
	Admin     admin.Service
	// contains filtered or unexported fields
}

CtrlPlane is the root orchestrator that wires all subsystems together.

func New

func New(opts ...Option) (*CtrlPlane, error)

New creates a CtrlPlane with the given options.

func (*CtrlPlane) Auth

func (cp *CtrlPlane) Auth() auth.Provider

Auth returns the auth provider.

func (*CtrlPlane) Config

func (cp *CtrlPlane) Config() ctrlplane.Config

Config returns the current configuration.

func (*CtrlPlane) Events

func (cp *CtrlPlane) Events() event.Bus

Events returns the event bus.

func (*CtrlPlane) Providers

func (cp *CtrlPlane) Providers() *provider.Registry

Providers returns the provider registry.

func (*CtrlPlane) Routes

func (cp *CtrlPlane) Routes() http.Handler

Routes returns an http.Handler with all ctrlplane API routes mounted. This is a stub that will be filled in when the api/ package is implemented.

func (*CtrlPlane) Start

func (cp *CtrlPlane) Start(ctx context.Context) error

Start begins background workers (health checks, reconciliation, GC).

func (*CtrlPlane) Stop

func (cp *CtrlPlane) Stop(ctx context.Context) error

Stop gracefully shuts down workers and flushes state.

func (*CtrlPlane) Store

func (cp *CtrlPlane) Store() store.Store

Store returns the underlying store.

type Option

type Option func(*CtrlPlane) error

Option configures a CtrlPlane instance.

func WithAuth

func WithAuth(p auth.Provider) Option

WithAuth sets the authentication/authorization provider.

func WithConfig

func WithConfig(cfg ctrlplane.Config) Option

WithConfig sets the configuration.

func WithDefaultProvider

func WithDefaultProvider(name string) Option

WithDefaultProvider sets the default provider name.

func WithEventBus

func WithEventBus(b event.Bus) Option

WithEventBus replaces the default in-memory event bus.

func WithProvider

func WithProvider(name string, p provider.Provider) Option

WithProvider registers a named infrastructure provider.

func WithStore

func WithStore(s store.Store) Option

WithStore sets the persistence store.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL