blob: 959498e0f112b652aa96bbff778ab3d001e170f7 [file] [log] [blame]
package build
import ""
// buildRouter is a router to talk with the build controller
type buildRouter struct {
backend Backend
routes []router.Route
// NewRouter initializes a new build router
func NewRouter(b Backend) router.Router {
r := &buildRouter{
backend: b,
return r
// Routes returns the available routers to the build controller
func (r *buildRouter) Routes() []router.Route {
return r.routes
func (r *buildRouter) initRoutes() {
r.routes = []router.Route{
router.Cancellable(router.NewPostRoute("/build", r.postBuild)),