github.com/gophercloud/gophercloud@v1.11.0/openstack/blockstorage/extensions/volumehost/doc.go (about) 1 /* 2 Package volumehost provides the ability to extend a volume result with 3 information about the Openstack host holding the volume. Example: 4 5 type VolumeWithHost struct { 6 volumes.Volume 7 volumehost.VolumeHostExt 8 } 9 10 var allVolumes []VolumeWithHost 11 12 allPages, err := volumes.List(client, nil).AllPages() 13 if err != nil { 14 panic("Unable to retrieve volumes: %s", err) 15 } 16 17 err = volumes.ExtractVolumesInto(allPages, &allVolumes) 18 if err != nil { 19 panic("Unable to extract volumes: %s", err) 20 } 21 22 for _, volume := range allVolumes { 23 fmt.Println(volume.Host) 24 } 25 */ 26 package volumehost