Comments (4)
Are you able to connect to the modular sockets with the dialers package? Something like this:
dialer := dialers.NewLocal(dialers.WithSocket("/var/run/libvirt/virtqemud"))
lv := libvirt.NewWithDialer(dialer)
err := lv.Connect()
defer lv.Disconnect()
from go-libvirt.
Sorry that I'm not familiar with Go. I modified the snippet above a little:
package main
import (
"github.com/digitalocean/go-libvirt"
"github.com/digitalocean/go-libvirt/socket/dialers"
"github.com/sirupsen/logrus"
)
func main() {
dialer := dialers.NewLocal(dialers.WithSocket("/var/run/libvirt/virtqemud-sock"))
lv := libvirt.NewWithDialer(dialer)
if err := lv.Connect(); err != nil {
logrus.Fatal(err)
}
defer lv.Disconnect()
}
Running it with go run main.go
doesn't return any errors (and it returns 0) so I guess it connects successfully.
from go-libvirt.
What I want to ask here is to support dynamic socket. So instead of relying on 1 defined socket, we can detect which modular socket we need to connect to based on the API call.
On a normal system, 1 modular daemon alone is kind of useless, but also people might not want to enable libvirtd
as they don't use all libvirt features.
from go-libvirt.
Ah, I see. That makes sense. I can't promise this will get done in the near future, but if someone else beats one of us and submits patches, I'm happy to review them.
Thanks for filing this feature request 🙂
from go-libvirt.
Related Issues (20)
- Disk usage shown by ConnectGetAllDomainStats is incorrect HOT 3
- Support for connection URIs HOT 6
- Tunnel via SSH? HOT 3
- Migrate Operations missing HOT 1
- Document minimum (or maximum) supported toolchain requirements
- Mentioned method Disconnected() does not exist HOT 1
- libvirttest.MockLibvirt does not implement net.Conn HOT 2
- Broken link to libvirt RPC knowledgebase HOT 1
- Inability to subscribe `metdata-change`, `device-added` and `device-removed` events HOT 5
- Support for QEMU Agent Command HOT 4
- CI occasionally times out HOT 1
- Can libvirt arm platform run X86 system? HOT 1
- suggested breaking change: add context.Context support to API HOT 1
- cannot use 2147483648 (untyped int constant) as * value in constant declaration (overflows) HOT 4
- Connecting to Libvirt
- Deadlock if Stream Shutdown races with Push
- Q: What is the meaning of `NeedResults`? HOT 1
- Qemu special api
- how to connect libvirtd with tcp and sasl auth?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libvirt.