app

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

Package app owns Starport production composition and lifecycle.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrConfigRequired reports an absent application configuration.
	ErrConfigRequired = errors.New("application config is required")
	// ErrStorageRequired reports a storage factory that returned no adapter.
	ErrStorageRequired = errors.New("storage factory returned no storage")
	// ErrCatalogRequired reports a catalog factory that returned no control plane.
	ErrCatalogRequired = errors.New("catalog factory returned no catalog")
	// ErrCredentialsRequired reports an absent provider-credential master key.
	ErrCredentialsRequired = errors.New("provider credential master key is required")
	// ErrIdentityRequired reports empty gateway identity storage.
	ErrIdentityRequired = errors.New("gateway identity is required; run \"starport init\"")
	// ErrProviderCatalogChanged reports a credential result that was resolved
	// from a catalog generation that is no longer current.
	ErrProviderCatalogChanged = errors.New("provider catalog changed during reconciliation")
)

Functions

This section is empty.

Types

type App

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

App owns all constructed runtime dependencies.

func New

func New(cfg *config.Config, options ...Option) (*App, error)

New creates the complete production runtime without starting background work.

func (*App) Close

func (a *App) Close(ctx context.Context) error

Close stops owned dependencies in reverse construction order.

func (*App) ProviderStates added in v1.0.3

func (a *App) ProviderStates() providerstate.Snapshot

ProviderStates returns one secret-free provider runtime projection.

func (*App) RefreshProviders added in v1.0.3

func (a *App) RefreshProviders(ctx context.Context) (providers.ReconcileReport, error)

RefreshProviders forces one shared provider credential reconciliation. The HTTP admin route added by APR5 uses this application port.

func (*App) Run

func (a *App) Run(ctx context.Context) error

Run starts explicit runtime work and closes all dependencies on exit.

type Development added in v1.0.3

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

Development owns one isolated local application and its one-time key.

func NewDevelopment added in v1.0.3

func NewDevelopment(ctx context.Context, cfg *config.Config) (*Development, error)

NewDevelopment creates an in-memory gateway bound to loopback.

func (*Development) APIKey added in v1.0.3

func (runtime *Development) APIKey() string

APIKey returns the one-time ephemeral gateway credential.

func (*Development) Close added in v1.0.3

func (runtime *Development) Close(ctx context.Context) error

Close releases a development gateway that did not start.

func (*Development) Run added in v1.0.3

func (runtime *Development) Run(ctx context.Context) error

Run starts the development gateway and closes it on exit.

func (*Development) URL added in v1.0.3

func (runtime *Development) URL() string

URL returns the loopback gateway URL.

type Option

type Option func(*buildOptions)

Option changes runtime factories for explicit test composition.

Jump to

Keyboard shortcuts

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