deployment

package
v0.0.0-...-b18ec7b Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanAWSLambda

func CleanAWSLambda(functions []*common.Function)

CleanAWSLambda cleans up the AWS Lambda deployment environment by deleting all serverless.yml files and the ECR private repository

func CleanServerless

func CleanServerless(index int) bool

CleanServerless removes the deployed service and deletes the serverless-<index>.yml file

func DeployServerless

func DeployServerless(index int) map[int]string

DeployServerless deploys the functions defined in the serverless.com file and returns a map from function name to URL

Types

type FunctionDeployer

type FunctionDeployer interface {
	Deploy(cfg *config.Configuration)
	Clean()
}

func CreateDeployer

func CreateDeployer(cfg *config.Configuration) FunctionDeployer

type Serverless

type Serverless struct {
	Service          string                  `yaml:"service"`
	FrameworkVersion string                  `yaml:"frameworkVersion"`
	Provider         slsProvider             `yaml:"provider"`
	Package          slsPackage              `yaml:"package,omitempty"`
	Functions        map[string]*slsFunction `yaml:"functions"`
}

Serverless describes the serverless.yml contents.

func (*Serverless) AddFunctionConfig

func (s *Serverless) AddFunctionConfig(function *common.Function, provider string, awsAccountId string)

AddFunctionConfig adds the function configuration for serverless.com deployment

func (*Serverless) AddPackagePattern

func (s *Serverless) AddPackagePattern(pattern string)

AddPackagePattern adds a string pattern to Package.Pattern as long as such a pattern does not already exist in Package.Pattern

func (*Serverless) CreateHeader

func (s *Serverless) CreateHeader(index int, provider string)

CreateHeader sets the fields Service, FrameworkVersion, and Provider

func (*Serverless) CreateServerlessConfigFile

func (s *Serverless) CreateServerlessConfigFile(index int)

CreateServerlessConfigFile dumps the contents of the Serverless struct into a yml file (serverless-<index>.yml)

Jump to

Keyboard shortcuts

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