• Seth Hoenig's avatar
    api: enable selecting subset of services using rendezvous hashing · bdead318
    Seth Hoenig authored
    This PR adds the 'choose' query parameter to the '/v1/service/<service>' endpoint.
    
    The value of 'choose' is in the form '<number>|<key>', number is the number
    of desired services and key is a value unique but consistent to the requester
    (e.g. allocID).
    
    Folks aren't really expected to use this API directly, but rather through consul-template
    which will soon be getting a new helper function making use of this query parameter.
    
    Example,
    
    curl 'localhost:4646/v1/service/redis?choose=2|abc123'
    
    Note: consul-templte v0.29.1 includes the necessary nomadServices functionality.
    bdead318
Analyzing file…