stack

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright © 2020 Vertigo Tecnologia. All rights reserved. Licensed under the Apache License, Version 2.0. See LICENSE file in the project root for full license information.

Copyright © 2020 Vertigo Tecnologia. All rights reserved. Licensed under the Apache License, Version 2.0. See LICENSE file in the project root for full license information.

Copyright © 2020 Vertigo Tecnologia. All rights reserved. Licensed under the Apache License, Version 2.0. See LICENSE file in the project root for full license information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFunction

func AppendFunction(function Function) error

func CreateTemplate

func CreateTemplate(function Function) error

func GetAllFunctions

func GetAllFunctions() (map[string]Function, error)

func ParseYAMLForLanguageTemplate

func ParseYAMLForLanguageTemplate(fileName string) (fileData []byte, err error)

Types

type Config

type Config struct {
	BuildArgs map[string]string `yaml:"buildArgs,omitempty"`
	Scale     struct {
		Min string `yaml:"min"`
		Max string `yaml:"max"`
	} `yaml:"scale,omitempty"`
}

Config apply one or all functions in stack.yaml

type Function

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

	// Lang name
	Lang string `yaml:"lang"`

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

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

	FunctionConfig Config `yaml:"config,omitempty"`
}

Function as deployed or built on FaaS

type Provider

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

Provider for the FaaS set of functions

type Stack

type Stack struct {
	Version     string              `yaml:"version,omitempty"`
	Provider    Provider            `yaml:"provider,omitempty"`
	Hostname    string              `yaml:"hostname,omitempty"`
	Functions   map[string]Function `yaml:"functions,omitempty"`
	StackConfig Config              `yaml:"config,omitempty"`
	Custom      []string            `yaml:"custom,omitempty"`
}

Stack root level YAML file to define FaaS function-set

func LoadStackFile

func LoadStackFile() (*Stack, error)

Jump to

Keyboard shortcuts

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