Exemplo n.º 1
0
func clearPage(cli storage.BlobStorageClient, name string, startByte, endByte int64) error {

	if err := cli.PutPage(cnt, name, startByte, endByte, storage.PageWriteTypeClear, nil); err != nil {
		url := cli.GetBlobURL(cnt, name)
		fmt.Printf("Failed to clear pages of %s: %s\n", url, err.Error())
		return err
	}
	return nil
}
Exemplo n.º 2
0
func writePage(cli storage.BlobStorageClient, name string, startByte, endByte int64, chunk []byte) error {

	if err := cli.PutPage(cnt, name, startByte, endByte, storage.PageWriteTypeUpdate, chunk); err != nil {
		url := cli.GetBlobURL(cnt, name)
		fmt.Printf("Failed to write pages to %s: %s\n", url, err.Error())
		return err
	}
	return nil
}