Exemple #1
0
func setup(hdlr http.Handler) {
	adapterServer = httptest.NewServer(hdlr)
	c := adapter.MakeClient(adapterServer.URL)
	dm := agent.MakeDeploymentManager(ps, c, "v1")
	router = MakeServer(dm, "user", "pass", "", "").newRouter()
	server = httptest.NewServer(router)
	baseURI = server.URL
}
func main() {
	sf := flag.Bool("secure", true, "whether or not to use SSL and BasicAuth, defaults to true")
	flag.Parse()

	p, err := repo.MakeDeploymentStore(dbLocation())
	if err != nil {
		log.Fatal(err)
	}
	c := adapter.MakeClient(adapterEndpoint())
	dm := agent.MakeDeploymentManager(p, c, version())
	s := makeServer(dm, sf)
	s.Start(serverPort())
}