github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/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 }