github.com/cloud-foundations/dominator@v0.0.0-20221004181915-6e4fee580046/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  	addresses, err := t.hypervisorsManager.ListHypervisorsInLocation(request)
    13  	*reply = proto.ListHypervisorsInLocationResponse{
    14  		HypervisorAddresses: addresses,
    15  		Error:               errors.ErrorToString(err),
    16  	}
    17  	return nil
    18  }