search for: newconnect

Displaying 12 results from an estimated 12 matches for "newconnect".

Did you mean: netconnect
2017 May 17
2
Re: Callback re-registration after libvirtd restart
..., I tried that but it doesn't work: func libvirt_close_callback(conn *libvirt.Connect, reason libvirt.ConnectCloseReason){ log.Printf("close callback: %+v", reason) } func event_listen() { log.Printf("event_listen %s", conf.Libvirt.LocalUrl) hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) err = hv.RegisterCloseCallback(libvirt_close_callback) if err != nil { log.Printf("unable to register close callback") return } ... The callback fires only when I kill my app, ^CGot signal:%!(EXTRA syscall.Signal=interrupt) close callb...
2017 May 17
2
Callback re-registration after libvirtd restart
Hi all, I'm using libvirt-go and I following code to listen for lifecycle events: func event_listen() { log.Printf("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.P...
2019 Feb 15
2
HELP!
...g domains: when running this program :- (below) package main import ( "fmt" libvirt "github.com/libvirt/libvirt-go" ) type DomService struct { Conn *libvirt.Connect } func (d *DomService) Connect() error { var err error d.Conn, err = libvirt.NewConnect("qemu:///system") if err != nil { fmt.Println(err) } defer d.Conn.Close() return nil } func (d *DomService) ListDoms() error { doms, err := d.Conn.ListAllDomains(libvirt.CONNECT_LIST_DOMAINS_ACTIVE) if err != nil { f...
2017 May 17
2
Re: Callback re-registration after libvirtd restart
...(conn *libvirt.Connect, reason > > libvirt.ConnectCloseReason){ > > log.Printf("close callback: %+v", reason) > > } > > > > func event_listen() { > > log.Printf("event_listen %s", conf.Libvirt.LocalUrl) > > hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) > > > > err = hv.RegisterCloseCallback(libvirt_close_callback) > > if err != nil { > > log.Printf("unable to register close callback") > > return > > } > > ... > > > > The callback fir...
2019 Jan 03
1
Golang libvirt bindings problem
...a Happy New year! I have a problem with a small app that I wrote in Go and which uses libvirt go bindings. Actually, the problem exists only when I want to compile the code statically. Basically, when CGO_ENABLED=0 is exported, go (running go test, go run, go build) complains: undefined: libvirt.NewConnect When I try to compile the source dynamically (running the same go <command> commands) the app works/checks out as expected and works without any problem. I tried this on: - CentOS 7.6 (go version 1.11.2) - Ubuntu 18.04 LTS (go version 1.10.4) Both systems - as advised on project's git...
2017 May 17
0
Re: Callback re-registration after libvirtd restart
On Wed, May 17, 2017 at 03:08:23PM +0200, Daniel Kučera wrote: > Hi all, > > I'm using libvirt-go and I following code to listen for lifecycle events: > > func event_listen() { > log.Printf("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...
2017 May 17
0
Re: Callback re-registration after libvirtd restart
...s expected for me package main import ( "github.com/libvirt/libvirt-go" "log" ) func libvirt_close_callback(conn *libvirt.Connect, reason libvirt.ConnectCloseReason) { log.Printf("In here") } func main() { libvirt.EventRegisterDefaultImpl() hv, err := libvirt.NewConnect("qemu:///session") err = hv.RegisterCloseCallback(libvirt_close_callback) if err != nil { log.Printf("unable to register close callback") return } for { libvirt.EventRunDefaultImpl() } } Printing out "In here" immediately when I kill libvirtd Regards,...
2017 May 17
0
Re: Callback re-registration after libvirtd restart
...> func libvirt_close_callback(conn *libvirt.Connect, reason > libvirt.ConnectCloseReason){ > log.Printf("close callback: %+v", reason) > } > > func event_listen() { > log.Printf("event_listen %s", conf.Libvirt.LocalUrl) > hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) > > err = hv.RegisterCloseCallback(libvirt_close_callback) > if err != nil { > log.Printf("unable to register close callback") > return > } > ... > > The callback fires only when I kill my app, Looks like you...
2017 May 17
1
Re: Callback re-registration after libvirtd restart
...> "log" > ) > > func libvirt_close_callback(conn *libvirt.Connect, reason > libvirt.ConnectCloseReason) { > log.Printf("In here") > } > > func main() { > libvirt.EventRegisterDefaultImpl() > > hv, err := libvirt.NewConnect("qemu:///session") > > err = hv.RegisterCloseCallback(libvirt_close_callback) > if err != nil { > log.Printf("unable to register close callback") > return > } > > for { > l...
2019 Feb 15
0
Re: HELP!
Please consider writing more descriptive subjects. No need to shout, too. On Fri, Feb 15, 2019 at 08:43:36PM +0530, Shashwat shagun wrote: [...] >func (d *DomService) Connect() error { > var err error > d.Conn, err = libvirt.NewConnect("qemu:///system") > if err != nil { > fmt.Println(err) > } >defer d.Conn.Close() I have no idea how the golang bindings are structured, but I'm quite sure you don't want to close the connection right after this function ends...
2000 Jul 10
0
RMySQL
Hi! I'm trying to test the RMySQL package (in Devel). The following error occured while trying to connet to our MySQL database: > m <- MySQL() > getDatabases(m) Error in newConnection.MySQLManager(dbMgr, ...) : MySQL driver: (could not open MySQL) > Does anybody know what the problem is? How to proceed? Thanks, Axel Vischer -- -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/200...
2010 Jul 31
1
How to connect R with SAP
Hello, Anyone knows if there is a way to connect R with the ERP SAP? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-to-connect-R-with-SAP-tp2309018p2309018.html Sent from the R help mailing list archive at Nabble.com.