stack

package
v0.0.0-...-dbb4c78 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidTemplate

func IsValidTemplate(lang string) bool

Types

type BuildOption

type BuildOption struct {
	Name     string   `yaml:"name"`
	Packages []string `yaml:"packages"`
}

type EnvironmentFile

type EnvironmentFile struct {
	Environment map[string]string `yaml:"environment"`
}

EnvironmentFile represents external file for environment data

type Function

type Function struct {
	// Name of deployed function
	Name     string `yaml:"-"`
	Language string `yaml:"lang"`

	// Handler Local folder to use for function
	Handler string `yaml:"handler"`

	// Image Docker image name
	Image string `yaml:"image"`

	// Docker registry Authorization
	RegistryAuth string `yaml:"registry_auth,omitempty"`

	FProcess string `yaml:"fprocess"`

	Environment map[string]string `yaml:"environment"`

	// Secrets list of secrets to be made available to function
	Secrets []string `yaml:"secrets"`

	SkipBuild bool `yaml:"skip_build"`

	Constraints *[]string `yaml:"constraints"`

	// EnvironmentFile is a list of files to import and override environmental variables.
	// These are overriden in order.
	EnvironmentFile []string `yaml:"environment_file"`

	Labels *map[string]string `yaml:"labels"`

	// Limits for function
	Limits *FunctionResources `yaml:"limits"`

	// Requests of resources requested by function
	Requests *FunctionResources `yaml:"requests"`

	// ReadOnlyRootFilesystem is used to set the container filesystem to read-only
	ReadOnlyRootFilesystem bool `yaml:"readonly_root_filesystem"`

	// BuildOptions to determine native packages
	BuildOptions []string `yaml:"build_options"`

	// Annotations
	Annotations *map[string]string `yaml:"annotations"`
}

Function as deployed or built on FaaS

type FunctionResources

type FunctionResources struct {
	Memory string `yaml:"memory"`
	CPU    string `yaml:"cpu"`
}

FunctionResources Memory and CPU

type LanguageTemplate

type LanguageTemplate struct {
	Language     string        `yaml:"language"`
	FProcess     string        `yaml:"fprocess"`
	BuildOptions []BuildOption `yaml:"build_options"`
	// WelcomeMessage is printed to the user after generating a function
	WelcomeMessage string `yaml:"welcome_message"`
}

LanguageTemplate read from template.yml within root of a language template folder

func LoadLanguageTemplate

func LoadLanguageTemplate(lang string) (*LanguageTemplate, error)

LoadLanguageTemplate loads language template details from template.yml file.

func ParseYAMLDataForLanguageTemplate

func ParseYAMLDataForLanguageTemplate(fileData []byte) (*LanguageTemplate, error)

ParseYAMLDataForLanguageTemplate parses YAML data into language template

func ParseYAMLForLanguageTemplate

func ParseYAMLForLanguageTemplate(file string) (*LanguageTemplate, error)

type Provider

type Provider struct {
	Name       string `yaml:"name"`
	GatewayURL string `yaml:"gateway"`
	Network    string `yaml:"network"`
}

Provider for the FaaS set of functions.

type Services

type Services struct {
	Functions map[string]Function `yaml:"functions,omitempty"`
	Provider  Provider            `yaml:"provider,omitempty"`
}

Services root level YAML file to define FaaS function-set

func ParseYAMLData

func ParseYAMLData(fileData []byte, regex string, filter string) (*Services, error)

ParseYAMLData parse YAML data into a stack of "services".

func ParseYAMLFile

func ParseYAMLFile(yamlFile, regex, filter string) (*Services, error)

ParseYAMLData parse YAML file into a stack of "services".

Jump to

Keyboard shortcuts

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