github.com/Cloud-Foundations/Dominator@v0.3.4/hypervisor/rpcd/setDisabledState.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  	"github.com/Cloud-Foundations/Dominator/proto/hypervisor"
     7  )
     8  
     9  func (t *srpcType) SetDisabledState(conn *srpc.Conn,
    10  	request hypervisor.SetDisabledStateRequest,
    11  	reply *hypervisor.SetDisabledStateResponse) error {
    12  	t.logger.Printf("SetDisabledState(%v) by %s\n",
    13  		request.Disable, conn.Username())
    14  	response := hypervisor.SetDisabledStateResponse{
    15  		errors.ErrorToString(t.manager.SetDisabledState(request.Disable))}
    16  	*reply = response
    17  	return nil
    18  }