2017-09-07 23:56:15 +00:00
|
|
|
// +build !pro,!ent
|
|
|
|
|
|
|
|
package agent
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
import "net/http"
|
|
|
|
|
2017-09-07 23:56:15 +00:00
|
|
|
// registerEnterpriseHandlers is a no-op for the oss release
|
2017-09-19 14:47:10 +00:00
|
|
|
func (s *HTTPServer) registerEnterpriseHandlers() {
|
|
|
|
s.mux.HandleFunc("/v1/namespaces", s.wrap(s.entOnly))
|
|
|
|
s.mux.HandleFunc("/v1/namespace", s.wrap(s.entOnly))
|
|
|
|
s.mux.HandleFunc("/v1/namespace/", s.wrap(s.entOnly))
|
|
|
|
s.mux.HandleFunc("/v1/sentinel/policies", s.wrap(s.entOnly))
|
|
|
|
s.mux.HandleFunc("/v1/sentinel/policy/", s.wrap(s.entOnly))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HTTPServer) entOnly(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
|
|
|
return nil, CodedError(501, ErrEntOnly)
|
|
|
|
}
|