uri

package
v0.0.0-...-25901d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Deals with https://libvirt.org/uri.html go-libvirt needs a working transport to talk rpc to libvirt. This module deals with setting up those transports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionURI

type ConnectionURI struct {
	*url.URL
}

func Parse

func Parse(uriStr string) (*ConnectionURI, error)

func (*ConnectionURI) DialTransport

func (u *ConnectionURI) DialTransport() (net.Conn, error)

go-libvirt needs a connection to talk RPC to libvirtd.

Returns the connection for the URI transport, and a new URI to be used in ConnectToURI (passed to libvirtd).

For example, a qemu+ssh:/// uri would return a SSH connection to localhost, and a new URI to qemu+unix:///system dials the transport for this connection URI

func (*ConnectionURI) RemoteName

func (u *ConnectionURI) RemoteName() string

According to https://libvirt.org/uri.html The name passed to the remote virConnectOpen function is formed by removing transport, hostname, port number, username and extra parameters from the remote URI unless the name option is specified.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL