Documentation ¶
Index ¶
- Variables
- func NewDomain(dom cli.VirDomain) (*api.Domain, error)
- func NewDomainSpec(dom cli.VirDomain) (*api.DomainSpec, error)
- func NewSharedInformer(c cli.Connection) (cache.SharedInformer, error)
- func SplitVMNamespaceKey(domainName string) (namespace, name string)
- func VMNamespaceKeyFunc(vm *v1.VM) string
- type DomainWatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var CrashedReasonTranslationMap = map[libvirt.DomainCrashedReason]api.StateChangeReason{ libvirt.DOMAIN_CRASHED_UNKNOWN: api.ReasonUnknown, libvirt.DOMAIN_CRASHED_PANICKED: api.ReasonPanicked, }
View Source
var LifeCycleTranslationMap = map[libvirt.DomainState]api.LifeCycle{ libvirt.DOMAIN_NOSTATE: api.NoState, libvirt.DOMAIN_RUNNING: api.Running, libvirt.DOMAIN_BLOCKED: api.Blocked, libvirt.DOMAIN_PAUSED: api.Paused, libvirt.DOMAIN_SHUTDOWN: api.Shutdown, libvirt.DOMAIN_SHUTOFF: api.Shutoff, libvirt.DOMAIN_CRASHED: api.Crashed, libvirt.DOMAIN_PMSUSPENDED: api.PMSuspended, }
View Source
var ShutdownReasonTranslationMap = map[libvirt.DomainShutdownReason]api.StateChangeReason{ libvirt.DOMAIN_SHUTDOWN_UNKNOWN: api.ReasonUnknown, libvirt.DOMAIN_SHUTDOWN_USER: api.ReasonUser, }
View Source
var ShutoffReasonTranslationMap = map[libvirt.DomainShutoffReason]api.StateChangeReason{ libvirt.DOMAIN_SHUTOFF_UNKNOWN: api.ReasonUnknown, libvirt.DOMAIN_SHUTOFF_SHUTDOWN: api.ReasonShutdown, libvirt.DOMAIN_SHUTOFF_DESTROYED: api.ReasonDestroyed, libvirt.DOMAIN_SHUTOFF_CRASHED: api.ReasonCrashed, libvirt.DOMAIN_SHUTOFF_MIGRATED: api.ReasonMigrated, libvirt.DOMAIN_SHUTOFF_SAVED: api.ReasonSaved, libvirt.DOMAIN_SHUTOFF_FAILED: api.ReasonFailed, libvirt.DOMAIN_SHUTOFF_FROM_SNAPSHOT: api.ReasonFromSnapshot, }
Functions ¶
func NewDomainSpec ¶
func NewDomainSpec(dom cli.VirDomain) (*api.DomainSpec, error)
func NewSharedInformer ¶
func NewSharedInformer(c cli.Connection) (cache.SharedInformer, error)
func SplitVMNamespaceKey ¶
SplitVMNamespaceKey returns the namespace and name that is encoded in the domain name.
func VMNamespaceKeyFunc ¶
VMNamespaceKeyFunc constructs the domain name with a namespace prefix i.g. namespace_name.
Types ¶
type DomainWatcher ¶
func (*DomainWatcher) ResultChan ¶
func (d *DomainWatcher) ResultChan() <-chan watch.Event
func (*DomainWatcher) Stop ¶
func (d *DomainWatcher) Stop()
Click to show internal directories.
Click to hide internal directories.