If this is your first time with golang, please follow the instructions to install (requires golang 1.8 or above).
After installing golang:
# Install taos
go get github.com/kmacoskey/taos
Copy the example configuration file:
cp config.example.yml config.yml
Next, create a PostgreSQL database (not covered here) and set connection information in the configuration file config.yaml
:
conn_str: "postgres://<role>:<password>@<host>:<port>/<database>?sslmode=disable"
Refer to the pq package GoDoc for supported connection paramaters.
Ensure successfull installation by running the tests:
make test
make
make run
The application starts an HTTP server at the default port of 8080.
app
: Various components around server functionality, such as configuration and database connectionsmiddlerware
: Contains routing middleware between client request on handler interactionhandlers
: The HTTP response layer for communication with clientsservices
: Server logic for servicing requests and interactions amongst other layersterraform
: Shells out to perform Terraform CLI actionsdaos
: The DAO (Data Access Object) layer that interacts with persistent storagemodels
: Data structures used through the different layersreaper
: Background functionality for reaping expired clusters
Flow of a request through the application layers:
app <-> middleware <-> handlers <-> services <-> daos
<-> terraform <-> daos
The main entry of the application is in the taos.go
file. It does the following work:
- load configuration
- start logging
- establish database connection
- start looking for expired clusters to reap
- instantiate restful components
- start the HTTP server
We accept contributions via Github Pull requests only.
Follow the steps below to contribute:
- Clone the project’s repository.
- Create your own feature branch (e.g.
git checkout -b awesome-feature
) and make changes on this branch.- Follow the previous sections on this page to setup, make your change, and verify the change works
- Push your local branch to the repo and submit a pull request.
Your contribution will be analyzed for product fit and engineering quality prior to merging. Note: All contributions must be sent using GitHub Pull Requests.
Your pull request is much more likely to be accepted if it is small and focused with a clear message that conveys the intent of your change.
Overall we follow GPDB's comprehensive contribution policy. Please refer to it here for details.