A Go binding for Mesos hubspot/Singularity binding. Since I couldn't manage to find one, hence, write a new one. One of the intention of having this package is to allow me to easily write a Terraform provider.
Import package
go get github.com/lenfree/go-mesos-singularity
For package dependency management, we use dep:
go get -u github.com/golang/dep/cmd/dep
If new package is required, pls run below command after go get. For more information about dep, please visit this URL https://github.com/golang/dep.
dep ensure
Run test:
make test
To maintain codebase quality with static checks and analysis:
make run
Examples:
package main
import (
"fmt"
singularity "github.com/lenfree/go-singularity"
)
func main() {
c := singularity.Config{
Host: "singularity.net/singularity",
}
client := singularity.New(c)
r, _ := client.GetRequests()
for _, i := range r {
body, _ := client.GetRequestByID(i.Request.ID)
fmt.Println(body)
}
}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request