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