github.com/diptanu/nomad@v0.5.7-0.20170516172507-d72e86cbe3d9/nomad/regions_endpoint.go (about) 1 package nomad 2 3 import "github.com/hashicorp/nomad/nomad/structs" 4 5 // Region is used to query and list the known regions 6 type Region struct { 7 srv *Server 8 } 9 10 // List is used to list all of the known regions. No leader forwarding is 11 // required for this endpoint because memberlist is used to populate the 12 // peers list we read from. 13 func (r *Region) List(args *structs.GenericRequest, reply *[]string) error { 14 *reply = r.srv.Regions() 15 return nil 16 }