controlplane

package
v0.1.0-c02.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package controlplane serves the public CloudRING management API and portal. Its first supported deployment is an explicitly isolated development provider.

Index

Constants

View Source
const (
	APIVersion         = "cloudring.org/v1alpha1"
	DevelopmentProfile = "development"
	RuntimeKind        = "CloudRINGDevelopmentRuntime"
	MigrationKind      = "CloudRINGDevelopmentMigration"
)

Variables

This section is empty.

Functions

func ReadDatabaseConfig

func ReadDatabaseConfig(path, expectedRole string) (transactionalstate.Config, error)

ReadDatabaseConfig accepts only an explicit authenticated URL for the expected database role. There is no insecure TLS switch, passfile or environment DSN.

func ReadDevelopmentOperatorToken

func ReadDevelopmentOperatorToken(path string) (string, error)

Types

type BuildInfo

type BuildInfo struct {
	GoVersion      string `json:"goVersion"`
	SourceRevision string `json:"sourceRevision"`
	SourceModified bool   `json:"sourceModified"`
}

BuildInfo reports the executable's actual Go/VCS metadata. A development process built from a dirty source remains visibly different from a release.

type ComponentStatus

type ComponentStatus struct {
	Database string `json:"database"`
}

type Config

type Config struct {
	APIVersion                   string `json:"apiVersion"`
	Kind                         string `json:"kind"`
	Profile                      string `json:"profile"`
	InstallationID               string `json:"installationID"`
	PublicOrigin                 string `json:"publicOrigin"`
	ListenAddress                string `json:"listenAddress"`
	TLSCertificateFile           string `json:"tlsCertificateFile"`
	TLSPrivateKeyFile            string `json:"tlsPrivateKeyFile"`
	DatabaseDSNFile              string `json:"databaseDSNFile"`
	DevelopmentOperatorTokenFile string `json:"developmentOperatorTokenFile"`
	MigrationOwnerRole           string `json:"migrationOwnerRole"`
	ApplicationRole              string `json:"applicationRole"`
}

Config contains paths to projected secrets, never secret values. The serving process only receives the application DSN; migration is a separate command.

func ReadConfig

func ReadConfig(reader io.Reader) (Config, error)

func (Config) Validate

func (config Config) Validate() error

Validate does not infer production safety from a single-node development binding. A production profile and all unrecognized fields fail closed.

type MigrationConfig

type MigrationConfig struct {
	APIVersion         string `json:"apiVersion"`
	Kind               string `json:"kind"`
	Profile            string `json:"profile"`
	InstallationID     string `json:"installationID"`
	DatabaseDSNFile    string `json:"databaseDSNFile"`
	MigrationOwnerRole string `json:"migrationOwnerRole"`
	ApplicationRole    string `json:"applicationRole"`
}

func ReadMigrationConfig

func ReadMigrationConfig(reader io.Reader) (MigrationConfig, error)

func (MigrationConfig) Validate

func (config MigrationConfig) Validate() error

type Product

type Product struct {
	ID string `json:"id"`
}

Product is a registered product's public identity. The development baseline starts with an empty durable registry; it never seeds demo products.

type ProviderStatus

type ProviderStatus struct {
	APIVersion     string          `json:"apiVersion"`
	InstallationID string          `json:"installationID"`
	Profile        string          `json:"profile"`
	Status         string          `json:"status"`
	OperatorID     string          `json:"operatorID"`
	CreatedAt      time.Time       `json:"createdAt"`
	Products       []Product       `json:"products"`
	Components     ComponentStatus `json:"components"`
	Build          BuildInfo       `json:"build"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, config Config, store StateStore, operatorToken string, build BuildInfo) (*Server, error)

New initializes or verifies the durable installation binding before serving. It does not fall back to memory or manufacture readiness after a DB failure.

func (*Server) ServeHTTP

func (server *Server) ServeHTTP(response http.ResponseWriter, request *http.Request)

type StateStore

StateStore is implemented by transactionalstate.Store. Tests can isolate protocol failures; the serving command always opens a real PostgreSQL store.

Jump to

Keyboard shortcuts

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