Documentation
¶
Index ¶
- func ConnectByUri(uri LibvirtUri) (*libvirt.Libvirt, error)
- func ConnectByUriString(libvirtUri string) (*libvirt.Libvirt, error)
- func DomainStateMeansStopped(state libvirt.DomainState) (res bool)
- func NewDialerFromLibvirtUri(uri LibvirtUri) (dialer socket.Dialer, err error)
- func NewTcpDialer(uri LibvirtUri) (*dialers.Remote, error)
- func NewUnixDialer(uri LibvirtUri) *dialers.Local
- func PollDomainState(ctx context.Context, period time.Duration, driver libvirt.Libvirt, ...)
- type LibvirtUri
- type LibvirtUriExtraParam
- type SshDialer
- type TlsDialer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectByUri ¶
func ConnectByUri(uri LibvirtUri) (*libvirt.Libvirt, error)
func ConnectByUriString ¶
func DomainStateMeansStopped ¶ added in v0.2.0
func DomainStateMeansStopped(state libvirt.DomainState) (res bool)
func NewDialerFromLibvirtUri ¶
func NewDialerFromLibvirtUri(uri LibvirtUri) (dialer socket.Dialer, err error)
func NewTcpDialer ¶
func NewTcpDialer(uri LibvirtUri) (*dialers.Remote, error)
func NewUnixDialer ¶
func NewUnixDialer(uri LibvirtUri) *dialers.Local
Types ¶
type LibvirtUri ¶
type LibvirtUri struct { Driver string Transport string Username string Hostname string Port string Path string // https://libvirt.org/uri.html#Remote_URI_parameters ExtraParams map[string]string }
https://libvirt.org/uri.html driver[+transport]://[username@][hostname][:port]/path[?extraparameters]
func (*LibvirtUri) GetExtra ¶
func (uri *LibvirtUri) GetExtra(p LibvirtUriExtraParam) (string, bool)
func (*LibvirtUri) Marshal ¶
func (uri *LibvirtUri) Marshal() (result string)
func (*LibvirtUri) Name ¶
func (uri *LibvirtUri) Name() (result string)
func (*LibvirtUri) Unmarshal ¶
func (uri *LibvirtUri) Unmarshal(s string) error
type LibvirtUriExtraParam ¶
type LibvirtUriExtraParam string
const ( // (Any transport) The name passed to the remote virConnectOpen function. // The name is normally formed by removing transport, hostname, port number, username and extra parameters from the remote URI, // but in certain very complex cases it may be better to supply the name explicitly. LibvirtUriParam_Name LibvirtUriExtraParam = "name" // (TLS transport only) A valid GNUTLS priority string LibvirtUriParam_TlsPriority LibvirtUriExtraParam = "tls_priority" LibvirtUriParam_Mode LibvirtUriExtraParam = "mode" LibvirtUriParam_Socket LibvirtUriExtraParam = "socket" // (SSH transport only) The name of the private key file to use to authentication to the remote machine. LibvirtUriParam_Keyfile LibvirtUriExtraParam = "keyfile" // SSH: If set to a non-zero value, this disables client's strict host key checking making it auto-accept new host keys. Existing host keys will still be validated. // TLS: If set to a non-zero value, this disables client checks of the server's certificate. Note that to disable server checks of the client's certificate or IP address you must change the libvirtd configuration. LibvirtUriParam_NoVerify LibvirtUriExtraParam = "no_verify" // Path to the known_hosts file to verify the host key against. LibvirtUriParam_KnownHost LibvirtUriExtraParam = "known_hosts" // Specifies x509 certificates path for the client. If any of the CA certificate, client certificate, or client key is missing, the connection will fail with a fatal error. LibvirtUriParam_PkiPath LibvirtUriExtraParam = "pkipath" )
A copy of https://libvirt.org/uri.html#Remote_URI_parameters. Only a handful of these implemented yet, and not all key or option might make sense in this setup
type SshDialer ¶
type SshDialer struct {
// contains filtered or unexported fields
}
func NewSshDialer ¶
func NewSshDialer(uri LibvirtUri) (dialer *SshDialer, err error)
Click to show internal directories.
Click to hide internal directories.