search for: domaineventlifecycleregist

Displaying 3 results from an estimated 3 matches for "domaineventlifecycleregist".

2017 May 17
2
Callback re-registration after libvirtd restart
...("event_listen %s", conf.Libvirt.LocalUrl) hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) lifecycleCallback := func(c *libvirt.Connect, d *libvirt.Domain, event *libvirt.DomainEventLifecycle) { event_message(c, d, "lifecycle", event) } _, err = hv.DomainEventLifecycleRegister(nil, lifecycleCallback) if err != nil { log.Printf("unable to register event callback") return } log.Printf("Libvirt event listener started") go func() { for err == nil { err = libvirt.EventRunDefaultImpl() log....
2017 May 17
0
Re: Callback re-registration after libvirtd restart
...rt.LocalUrl) > hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) > > lifecycleCallback := func(c *libvirt.Connect, d *libvirt.Domain, event > *libvirt.DomainEventLifecycle) { > event_message(c, d, "lifecycle", event) > } > > _, err = hv.DomainEventLifecycleRegister(nil, lifecycleCallback) > if err != nil { > log.Printf("unable to register event callback") > return > } > > log.Printf("Libvirt event listener started") > > go func() { > for err == nil { > er...
2017 May 17
2
Re: Callback re-registration after libvirtd restart
...rt.NewConnect(conf.Libvirt.LocalUrl) > > > > lifecycleCallback := func(c *libvirt.Connect, d *libvirt.Domain, > event > > *libvirt.DomainEventLifecycle) { > > event_message(c, d, "lifecycle", event) > > } > > > > _, err = hv.DomainEventLifecycleRegister(nil, lifecycleCallback) > > if err != nil { > > log.Printf("unable to register event callback") > > return > > } > > > > log.Printf("Libvirt event listener started") > > > > go func() { > >...