Re: [RFC][scale] new API for querying domains stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 01, 2014 at 09:35:21AM +0100, Daniel P. Berrange wrote:
> For the async API design, I could see two potential designs
> 
> 1. A custom callback to run per API
> 
>      typedef (void)(*virDomainBlockInfoCallback)(virDomainPtr dom,
>                                                  bool isError,
>                                                  virDomainBlockInfoPtr info,
>                                                  void *opaque);
> 
>     int virDomainGetBlockInfoAsync(virDomainPtr dom,
>                                    const char *disk,
>                                    virDomainBlockInfoCallback cb,
>                                    void *opaque,
>                                    unsigned int flags);
> 
> 
> 2. A standard callback and a pair of APIs
> 
>      typedef void *virDomainAsyncResult;
>      typedef (void)(*virDomainAsyncCallback)(virDomainPtr dom,
>                                              virDomainAsyncResult res);
> 
>    void virDomainGetBlockInfoAsync(virDomainPtr dom,
>                                    const char *disk,
>                                    virDomainBlockInfoCallback cb,
>                                    void *opaque,
>                                    unsigned int flags);
>    int virDomainGetBlockInfoFinish(virDomainPtr dom,
>                                   virDomainAsyncResult res,
>                                   virDomainBlockInfoPtr info);

Could we consider an API which worked across all active domains?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]