Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 2.44 KB

CONTRIBUTING.md

File metadata and controls

70 lines (46 loc) · 2.44 KB

Contributing

Before contributing to Up you'll need a few things:

  • Install Golang 1.11 for that Go thing if you don't have it

The following are optional:

Setup

Grab Up:

$ go get github.com/apex/up

Change into the project:

$ cd $GOPATH/src/github.com/apex/up

Testing

$ make test

Layout

Although Up is not provided as a library it is structured as if it was, for organizational purposes. The project layout is loosely:

  • *.go – Primary API
  • reporter – Event based CLI reporting
  • platform – Platform specifics (AWS Lambda, Azure, Google, etc)
  • internal – Internal utilities and lower level tooling
  • http – HTTP middleware for up-proxy
  • handler – HTTP middleware aggregate, effectively the entire proxy
  • docs – Documentation used to generate the static site
  • config – Configuration structures and validation for up.json
  • cmd – Commands, where up is the CLI and up-proxy is serving requests in production

Note that this is just a first pass, and the code / layout will be refactored. View Godoc for more details of the internals.

Proxy

One oddity is that the up-proxy is baked into up. Yes there's a binary within the binary :) – this is so up can inject the proxy before deploying your function to Lambda.

The proxy accepts AWS Lambda events from API Gateway, translates them to HTTP, and sends a request to your application, then translates it back to an event that API Gateway understands.

Reverse proxy features such as URL rewriting, gzip compression, script injection, error pages and others are also provided in up-proxy.

Roadmap

Up uses GitHub issue tracking and milestones for its loose roadmap. I highly recommend installing Zenhub (https://www.zenhub.com/) as well, however I primarily organize by milestones and labels for now.

Releases

Notes for myself:

  • Run make clean build if necessary to re-build the proxy
  • Run git changelog
  • Run git release
  • Run make release
  • Re-build documentation
  • Notes about any backwards compat issues, migration, IAM policy changes
  • Adjust schemastore JSON schema if necessary