function

package
v0.0.0-...-24a16b5 Latest Latest
Warning

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

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

README

garbage-collect

This function takes a Git owner / repo and list of functions.

The function queries the functions for the owner using the list-functions function - parses the result and then reconciles the differences by deleting any functions which are not in the deployment list but that also match the repo.

Scenario 1:

Event: initial push

owner: alexellis repo: alexa-skill functions: fn1, fn2

Event: second push with fn2 removed

owner: alexellis repo: alexa-skill functions: fn1

fn2 is now orphaned so the garbage-collect will remove it.

Event: third push with fn1 renamed to fn3

owner: alexellis repo: alexa-skill functions: fn3

fn1 is now orphaned so will be deleted

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(req []byte) string

Handle a serverless request

Types

type GarbageRequest

type GarbageRequest struct {
	Functions []string `json:"functions"`
	Repo      string   `json:"repo"`
	Owner     string   `json:"owner"`
}

Jump to

Keyboard shortcuts

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