Documentation
¶
Overview ¶
Package controlplane serves the public CloudRING management API and portal. Its first supported deployment is an explicitly isolated development provider.
Index ¶
Constants ¶
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.
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.
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
}
type StateStore ¶
type StateStore interface {
Ready(context.Context) error
Load(context.Context, string, string) (transactionalstate.Document, error)
Save(context.Context, string, string, int64, []byte) (transactionalstate.Document, error)
}
StateStore is implemented by transactionalstate.Store. Tests can isolate protocol failures; the serving command always opens a real PostgreSQL store.