Documentation
¶
Index ¶
- func Deploy(ctx context.Context, cfg *config.NextDeployConfig, ...) error
- func Rollback(ctx context.Context, cfg *config.NextDeployConfig) error
- type AWSProvider
- func (p *AWSProvider) DeployCompute(ctx context.Context, tarballPath string, appCfg *cfgTypes.NextDeployConfig, ...) error
- func (p *AWSProvider) DeployStatic(ctx context.Context, tarballPath string, appCfg *cfgTypes.NextDeployConfig, ...) error
- func (p *AWSProvider) Destroy(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
- func (p *AWSProvider) Initialize(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
- func (p *AWSProvider) InvalidateCache(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
- func (p *AWSProvider) Rollback(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
- func (p *AWSProvider) UpdateSecrets(ctx context.Context, appName string, secrets map[string]string) error
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(ctx context.Context, cfg *config.NextDeployConfig, meta *nextcore.NextCorePayload) error
Deploy orchestrates the full serverless deployment pipeline:
- Discovers the build artifact (app.tar.gz)
- Fetches local secrets via SecretManager and pushes them to the cloud secret store
- Uploads static assets to CDN/Storage
- Deploys the compute layer (Lambda, Workers, etc.)
- Invalidates the CDN cache
Types ¶
type AWSProvider ¶ added in v0.1.60
type AWSProvider struct {
// contains filtered or unexported fields
}
func NewAWSProvider ¶ added in v0.1.60
func NewAWSProvider() *AWSProvider
func (*AWSProvider) DeployCompute ¶ added in v0.1.60
func (p *AWSProvider) DeployCompute(ctx context.Context, tarballPath string, appCfg *cfgTypes.NextDeployConfig, meta *nextcore.NextCorePayload) error
func (*AWSProvider) DeployStatic ¶ added in v0.1.60
func (p *AWSProvider) DeployStatic(ctx context.Context, tarballPath string, appCfg *cfgTypes.NextDeployConfig, meta *nextcore.NextCorePayload) error
func (*AWSProvider) Destroy ¶ added in v0.1.76
func (p *AWSProvider) Destroy(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
func (*AWSProvider) Initialize ¶ added in v0.1.60
func (p *AWSProvider) Initialize(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
func (*AWSProvider) InvalidateCache ¶ added in v0.1.60
func (p *AWSProvider) InvalidateCache(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
func (*AWSProvider) Rollback ¶ added in v0.1.89
func (p *AWSProvider) Rollback(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error
Rollback reverts the Lambda function to the previous published version.
func (*AWSProvider) UpdateSecrets ¶ added in v0.1.60
type Provider ¶ added in v0.1.60
type Provider interface {
// Initialize validates credentials and prepares the environment.
Initialize(ctx context.Context, cfg *config.NextDeployConfig) error
// DeployStatic uploads static assets (public/, .next/static/) to a CDN/Storage bucket.
DeployStatic(ctx context.Context, tarballPath string, cfg *config.NextDeployConfig, meta *nextcore.NextCorePayload) error
// UpdateSecrets securely injects secrets from the SecretManager into the cloud provider's
// secret store (e.g., AWS Secrets Manager, Cloudflare Secrets).
// This ensures raw secrets are never packed into the deployment artifact.
UpdateSecrets(ctx context.Context, appName string, secrets map[string]string) error
// DeployCompute packages the standalone build and updates the compute layer
// (e.g., AWS Lambda + Web Adapter, Cloudflare Workers).
DeployCompute(ctx context.Context, tarballPath string, cfg *config.NextDeployConfig, meta *nextcore.NextCorePayload) error
// InvalidateCache clears the CDN cache to ensure fresh assets are served.
InvalidateCache(ctx context.Context, cfg *config.NextDeployConfig) error
// Rollback reverts the compute layer to the previous version and
// invalidates the CDN cache so the old version is served immediately.
Rollback(ctx context.Context, cfg *config.NextDeployConfig) error
// Destroy removes all application resources from the cloud provider.
Destroy(ctx context.Context, cfg *config.NextDeployConfig) error
}
Provider defines the interface for deploying to various serverless platforms (e.g., AWS, Cloudflare, GCP, Azure).
Click to show internal directories.
Click to hide internal directories.