github.com/cloud-foundations/dominator@v0.0.0-20221004181915-6e4fee580046/imageunpacker/client/api.go (about)

     1  package client
     2  
     3  import (
     4  	"github.com/Cloud-Foundations/Dominator/lib/srpc"
     5  	proto "github.com/Cloud-Foundations/Dominator/proto/imageunpacker"
     6  )
     7  
     8  func AddDevice(client *srpc.Client, deviceId string, adder func() error) error {
     9  	return addDevice(client, deviceId, adder)
    10  }
    11  
    12  func AssociateStreamWithDevice(srpcClient *srpc.Client, streamName string,
    13  	deviceId string) error {
    14  	return associateStreamWithDevice(srpcClient, streamName, deviceId)
    15  }
    16  
    17  func ExportImage(srpcClient *srpc.Client, streamName,
    18  	exportType, exportDestination string) error {
    19  	return exportImage(srpcClient, streamName, exportType, exportDestination)
    20  }
    21  
    22  func GetStatus(srpcClient *srpc.Client) (proto.GetStatusResponse, error) {
    23  	return getStatus(srpcClient)
    24  }
    25  
    26  func PrepareForCapture(srpcClient *srpc.Client, streamName string) error {
    27  	return prepareForCapture(srpcClient, streamName)
    28  }
    29  
    30  func PrepareForCopy(srpcClient *srpc.Client, streamName string) error {
    31  	return prepareForCopy(srpcClient, streamName)
    32  }
    33  
    34  func PrepareForUnpack(srpcClient *srpc.Client, streamName string,
    35  	skipIfPrepared bool, doNotWaitForResult bool) error {
    36  	return prepareForUnpack(srpcClient, streamName, skipIfPrepared,
    37  		doNotWaitForResult)
    38  }
    39  
    40  func RemoveDevice(client *srpc.Client, deviceId string) error {
    41  	return removeDevice(client, deviceId)
    42  }
    43  
    44  func UnpackImage(srpcClient *srpc.Client, streamName,
    45  	imageLeafName string) error {
    46  	return unpackImage(srpcClient, streamName, imageLeafName)
    47  }