go-nbd
go-nbd copied to clipboard
Support NBD URIs in the client
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 name
nbds+unix:///default?socket=/tmp/sock
= NBD encrypted over Unix domain socket /tmp/sock
, export name default
Some other examples below, as well as more in the specification above. https://libguestfs.org/nbd_connect_uri.3.html
(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