Closed rwmjones closed 2 months ago
(Adding @ebblake)
This could be interesting, but it's not something that really is in the scope of this project since it's intended for the for use as a library. The internal interface asks for any net.Conn
, so this is something that could be implemented by anyone using the go-nbd
library:
func client.Connect(conn net.Conn, device *os.File, options *client.Options) error
Just want to make you aware of the NBD URI specification. It's a simple extension of the basic NBD protocol, allowing an easy and cross-client way for NBD endpoints to be specified. eg:
nbd://localhost
= NBD unencrypted over TCP to localhost:10809, default export namenbds+unix:///default?socket=/tmp/sock
= NBD encrypted over Unix domain socket/tmp/sock
, export namedefault
Some other examples below, as well as more in the specification above. https://libguestfs.org/nbd_connect_uri.3.html