formation

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package formation handle the defenitions of the serverless environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfProcessor added in v0.0.7

func SetConfProcessor(f func(fn *Function) error)

SetConfProcessor set soemthing that can farther process function configuration

Types

type Function

type Function struct {
	cloudformation.AWSServerlessFunction
	Mless    Mless
	Warnings []string `json:",omitempty"`
	// contains filtered or unexported fields
}

Function represent a lambda function defenition. It is mostly cloudformation.AWSServerlessFunction defenition But also mless specific paramters, relation to the containing template and cached variables

func (*Function) Code

func (f *Function) Code() string

Code is the directory where the code reside

func (*Function) Desktop

func (f *Function) Desktop() string

Desktop return the directory in the desktop where we have the sourcecode

type Functions

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

Functions represent a SAM template file It contain the functions and has the ability to reload itself when needed.

func New

func New(fname, desktop string, refresh time.Duration) (*Functions, error)

New Initialize a new template and read the initial content

func (*Functions) Close

func (t *Functions) Close() error

Close cleanup up after the tempalte (stop automatic refresh)

func (*Functions) Get

func (t *Functions) Get(name string) *Function

Get a function defentition by name (or nil if the function does not exit)

func (*Functions) Refresh

func (t *Functions) Refresh() error

Refresh attempt to re-read the templates

type Mless

type Mless struct {
	Debugger interface{} `json:",omitempty"` // details of debugger to invoke (nil means no debugger)
}

Mless contain mless specific paratmers for a function

Jump to

Keyboard shortcuts

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