github.com/Cloud-Foundations/Dominator@v0.3.4/imageunpacker/client/api.go (about)

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