libvirt

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

README

libvirt module

This module can control "power" state of libvirt VMs via the libvirt RPC interface. Currently only local socket connections are supported.

Documentation

Index

Constants

View Source
const PlatformString string = "libvirt"

PlatformString denotes what node platform this modules supports

Variables

View Source
var (
	ErrInvalidLengthLibvirt        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLibvirt          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLibvirt = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Servers              map[string]*Server `` /* 155-byte string literal not displayed */
	PollingInterval      string             `protobuf:"bytes,2,opt,name=polling_interval,json=pollingInterval,proto3" json:"polling_interval,omitempty"`
	NameUrl              string             `protobuf:"bytes,3,opt,name=name_url,json=nameUrl,proto3" json:"name_url,omitempty"`
	ServerUrl            string             `protobuf:"bytes,4,opt,name=server_url,json=serverUrl,proto3" json:"server_url,omitempty"`
	UuidUrl              string             `protobuf:"bytes,5,opt,name=uuid_url,json=uuidUrl,proto3" json:"uuid_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetNameUrl

func (m *Config) GetNameUrl() string

func (*Config) GetPollingInterval

func (m *Config) GetPollingInterval() string

func (*Config) GetServerUrl

func (m *Config) GetServerUrl() string

func (*Config) GetServers

func (m *Config) GetServers() map[string]*Server

func (*Config) GetUuidUrl

func (m *Config) GetUuidUrl() string

func (*Config) Marshal

func (m *Config) Marshal() (dAtA []byte, err error)

func (*Config) MarshalTo

func (m *Config) MarshalTo(dAtA []byte) (int, error)

func (*Config) MarshalToSizedBuffer

func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) Size

func (m *Config) Size() (n int)

func (*Config) String

func (m *Config) String() string

func (*Config) Unmarshal

func (m *Config) Unmarshal(dAtA []byte) error

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_MessageName

func (*Config) XXX_MessageName() string

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type Server

type Server struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Ip                   string   `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	Port                 int32    `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	TlsKey               string   `protobuf:"bytes,4,opt,name=tlsKey,proto3" json:"tlsKey,omitempty"`
	TlsCert              string   `protobuf:"bytes,5,opt,name=tlsCert,proto3" json:"tlsCert,omitempty"`
	TlsCACert            string   `protobuf:"bytes,6,opt,name=tlsCACert,proto3" json:"tlsCACert,omitempty"`
	SocketPath           string   `protobuf:"bytes,7,opt,name=socketPath,proto3" json:"socketPath,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Server) Descriptor

func (*Server) Descriptor() ([]byte, []int)

func (*Server) GetIp

func (m *Server) GetIp() string

func (*Server) GetName

func (m *Server) GetName() string

func (*Server) GetPort

func (m *Server) GetPort() int32

func (*Server) GetSocketPath

func (m *Server) GetSocketPath() string

func (*Server) GetTlsCACert

func (m *Server) GetTlsCACert() string

func (*Server) GetTlsCert

func (m *Server) GetTlsCert() string

func (*Server) GetTlsKey

func (m *Server) GetTlsKey() string

func (*Server) Marshal

func (m *Server) Marshal() (dAtA []byte, err error)

func (*Server) MarshalTo

func (m *Server) MarshalTo(dAtA []byte) (int, error)

func (*Server) MarshalToSizedBuffer

func (m *Server) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) Size

func (m *Server) Size() (n int)

func (*Server) String

func (m *Server) String() string

func (*Server) Unmarshal

func (m *Server) Unmarshal(dAtA []byte) error

func (*Server) XXX_DiscardUnknown

func (m *Server) XXX_DiscardUnknown()

func (*Server) XXX_Marshal

func (m *Server) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Server) XXX_Merge

func (m *Server) XXX_Merge(src proto.Message)

func (*Server) XXX_MessageName

func (*Server) XXX_MessageName() string

func (*Server) XXX_Size

func (m *Server) XXX_Size() int

func (*Server) XXX_Unmarshal

func (m *Server) XXX_Unmarshal(b []byte) error

type Virt

type Virt struct {
	// contains filtered or unexported fields
}

Virt provides a power on/off interface to the LibVirt interface

func (*Virt) ConfigURL

func (*Virt) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*Virt) Entry

func (v *Virt) Entry()

Entry is the LibVirt module's executable entrypoint

func (*Virt) Init

func (v *Virt) Init(api types.ModuleAPIClient)

Init is used to intialize an executable module prior to entrypoint

func (*Virt) Name

func (*Virt) Name() string

Name returns the FQDN of the module

func (*Virt) NewConfig

func (*Virt) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*Virt) SetDiscoveryChan

func (v *Virt) SetDiscoveryChan(c chan<- types.Event)

SetDiscoveryChan sets the current discovery channel this is generally done by the API

func (*Virt) SetMutationChan

func (v *Virt) SetMutationChan(c <-chan types.Event)

SetMutationChan sets the current mutation channel this is generally done by the API

func (*Virt) Stop

func (v *Virt) Stop()

Stop attempts to perform a graceful exit, closing all connections, before exiting.

func (*Virt) UpdateConfig

func (v *Virt) UpdateConfig(cfg proto.Message) error

UpdateConfig updates the running config

Jump to

Keyboard shortcuts

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