Documentation ¶
Index ¶
- type StatsCollector
- func (c *StatsCollector) MarkCloneFailure(baseVMName string)
- func (c *StatsCollector) MarkCloneSuccess(baseVMName string)
- func (c *StatsCollector) MarkPowerOffFailure(hostname string)
- func (c *StatsCollector) MarkPowerOffSuccess(hostname string)
- func (c *StatsCollector) MarkPowerOnFailure(hostname string)
- func (c *StatsCollector) MarkPowerOnSuccess(hostname string)
- type VSphereConfig
- type VSphereEventListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatsCollector ¶
type StatsCollector struct {
// contains filtered or unexported fields
}
A StatsCollector stores various stats that are sent to it and allows you to fetch metrics based on them.
func NewStatsCollector ¶
func NewStatsCollector(writer api.Writer, interval time.Duration, logger logrus.FieldLogger, collectdPluginInstance string) *StatsCollector
NewStatsCollector returns a new StatsCollector with no stats, which writes its stats to the given api.Writer every interval.
func (*StatsCollector) MarkCloneFailure ¶
func (c *StatsCollector) MarkCloneFailure(baseVMName string)
MarkCloneFailure increases the number of failed clones of a base VM with a given name.
func (*StatsCollector) MarkCloneSuccess ¶
func (c *StatsCollector) MarkCloneSuccess(baseVMName string)
MarkCloneSuccess increases the number of successful clones of a base VM with a given name.
func (*StatsCollector) MarkPowerOffFailure ¶
func (c *StatsCollector) MarkPowerOffFailure(hostname string)
MarkPowerOffFailure increases the number of failed VM power-off events on a host with a given hostname.
func (*StatsCollector) MarkPowerOffSuccess ¶
func (c *StatsCollector) MarkPowerOffSuccess(hostname string)
MarkPowerOffSuccess increases the number of successful VM power-off events on a host with a given hostname.
func (*StatsCollector) MarkPowerOnFailure ¶
func (c *StatsCollector) MarkPowerOnFailure(hostname string)
MarkPowerOnFailure increases the number of failed VM power-on events on a host with a given hostname.
func (*StatsCollector) MarkPowerOnSuccess ¶
func (c *StatsCollector) MarkPowerOnSuccess(hostname string)
MarkPowerOnSuccess increases the number of successful VM power-on events on a host with a given hostname.
type VSphereConfig ¶
A VSphereConfig provides configuration for a VSphereEventListener
type VSphereEventListener ¶
type VSphereEventListener struct {
// contains filtered or unexported fields
}
VSphereEventListener connects to a vSphere API and listens for certain events, reporting them to a StatsCollector
func NewVSphereEventListener ¶
func NewVSphereEventListener(config VSphereConfig, statsCollector *StatsCollector, logger logrus.FieldLogger) *VSphereEventListener
NewVSphereEventListener creates a VSphereEventListener with a given configuration. Call Start on the event listener to start listening and reporting to the given stats collector.