github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/command/agent/http_oss.go (about)

     1  // +build !pro,!ent
     2  
     3  package agent
     4  
     5  import "net/http"
     6  
     7  // registerEnterpriseHandlers is a no-op for the oss release
     8  func (s *HTTPServer) registerEnterpriseHandlers() {
     9  	s.mux.HandleFunc("/v1/namespaces", s.wrap(s.entOnly))
    10  	s.mux.HandleFunc("/v1/namespace", s.wrap(s.entOnly))
    11  	s.mux.HandleFunc("/v1/namespace/", s.wrap(s.entOnly))
    12  
    13  	s.mux.HandleFunc("/v1/sentinel/policies", s.wrap(s.entOnly))
    14  	s.mux.HandleFunc("/v1/sentinel/policy/", s.wrap(s.entOnly))
    15  
    16  	s.mux.HandleFunc("/v1/quotas", s.wrap(s.entOnly))
    17  	s.mux.HandleFunc("/v1/quota-usages", s.wrap(s.entOnly))
    18  	s.mux.HandleFunc("/v1/quota/", s.wrap(s.entOnly))
    19  	s.mux.HandleFunc("/v1/quota", s.wrap(s.entOnly))
    20  }
    21  
    22  func (s *HTTPServer) entOnly(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
    23  	return nil, CodedError(501, ErrEntOnly)
    24  }