github.com/Cloud-Foundations/Dominator@v0.3.4/fleetmanager/rpcd/listHypervisorsInLocation.go (about) 1 package rpcd 2 3 import ( 4 "github.com/Cloud-Foundations/Dominator/lib/errors" 5 "github.com/Cloud-Foundations/Dominator/lib/srpc" 6 proto "github.com/Cloud-Foundations/Dominator/proto/fleetmanager" 7 ) 8 9 func (t *srpcType) ListHypervisorsInLocation(conn *srpc.Conn, 10 request proto.ListHypervisorsInLocationRequest, 11 reply *proto.ListHypervisorsInLocationResponse) error { 12 response, err := t.hypervisorsManager.ListHypervisorsInLocation(request) 13 if err == nil { 14 *reply = response 15 } else { 16 *reply = proto.ListHypervisorsInLocationResponse{ 17 Error: errors.ErrorToString(err), 18 } 19 } 20 return nil 21 }