github.com/Cloud-Foundations/Dominator@v0.3.4/fleetmanager/rpcd/getHypervisorsInLocation.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) GetHypervisorsInLocation(conn *srpc.Conn,
    10  	request proto.GetHypervisorsInLocationRequest,
    11  	reply *proto.GetHypervisorsInLocationResponse) error {
    12  	response, err := t.hypervisorsManager.GetHypervisorsInLocation(request)
    13  	if err == nil {
    14  		*reply = response
    15  	} else {
    16  		*reply = proto.GetHypervisorsInLocationResponse{
    17  			Error: errors.ErrorToString(err),
    18  		}
    19  	}
    20  	return nil
    21  }