mirror of https://github.com/status-im/consul.git
http: add partition query param parsing
This commit is contained in:
parent
1169df0878
commit
77a2f38677
|
@ -235,6 +235,9 @@ func (s *HTTPHandlers) CatalogNodes(resp http.ResponseWriter, req *http.Request)
|
|||
// Setup the request
|
||||
args := structs.DCSpecificRequest{}
|
||||
s.parseSource(req, &args.Source)
|
||||
if err := parseEntMetaPartition(req, &args.EnterpriseMeta); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
args.NodeMetaFilters = s.parseMetaFilter(req)
|
||||
if done := s.parse(resp, req, &args.Datacenter, &args.QueryOptions); done {
|
||||
metrics.IncrCounterWithLabels([]string{"client", "rpc", "error", "catalog_nodes"}, 1,
|
||||
|
|
|
@ -73,3 +73,8 @@ func (s *HTTPHandlers) enterpriseHandler(next http.Handler) http.Handler {
|
|||
func (s *HTTPHandlers) uiTemplateDataTransform(data map[string]interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// parseEntMetaPartition is a noop for the enterprise implementation.
|
||||
func parseEntMetaPartition(req *http.Request, meta *structs.EnterpriseMeta) error {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ type CatalogService struct {
|
|||
Checks HealthChecks
|
||||
ModifyIndex uint64
|
||||
Namespace string `json:",omitempty"`
|
||||
Partition string `json:",omitempty"`
|
||||
}
|
||||
|
||||
type CatalogNode struct {
|
||||
|
|
|
@ -44,6 +44,7 @@ type HealthCheck struct {
|
|||
ServiceTags []string
|
||||
Type string
|
||||
Namespace string `json:",omitempty"`
|
||||
Partition string `json:",omitempty"`
|
||||
|
||||
Definition HealthCheckDefinition
|
||||
|
||||
|
|
Loading…
Reference in New Issue