Documentation
¶
Index ¶
- Variables
- type EntityMetric
- type IntervalList
- type Manager
- func (m *Manager) AvailableMetric(ctx context.Context, entity types.ManagedObjectReference, interval int32) (MetricList, error)
- func (m *Manager) CounterInfo(ctx context.Context) ([]types.PerfCounterInfo, error)
- func (m *Manager) CounterInfoByKey(ctx context.Context) (map[int32]*types.PerfCounterInfo, error)
- func (m *Manager) CounterInfoByName(ctx context.Context) (map[string]*types.PerfCounterInfo, error)
- func (m *Manager) HistoricalInterval(ctx context.Context) (IntervalList, error)
- func (m *Manager) ProviderSummary(ctx context.Context, entity types.ManagedObjectReference) (*types.PerfProviderSummary, error)
- func (m *Manager) Query(ctx context.Context, spec []types.PerfQuerySpec) ([]types.BasePerfEntityMetricBase, error)
- func (m *Manager) QueryCounter(ctx context.Context, ids []int32) ([]types.PerfCounterInfo, error)
- func (m *Manager) SampleByName(ctx context.Context, spec types.PerfQuerySpec, metrics []string, ...) ([]types.BasePerfEntityMetricBase, error)
- func (m *Manager) ToMetricSeries(ctx context.Context, series []types.BasePerfEntityMetricBase) ([]EntityMetric, error)
- type MetricList
- type MetricSeries
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Intervals maps name to seconds for the built-in historical intervals Intervals = map[string]int32{ "real": 0, "day": 300, "week": 1800, "month": 7200, "year": 86400, } )
Functions ¶
This section is empty.
Types ¶
type EntityMetric ¶
type EntityMetric struct {
Entity types.ManagedObjectReference
SampleInfo []types.PerfSampleInfo
Value []MetricSeries
}
EntityMetric contains the same data as types.PerfEntityMetric, but with MetricSeries type for the Value field.
func (*EntityMetric) SampleInfoCSV ¶
func (m *EntityMetric) SampleInfoCSV() string
SampleInfoCSV converts the SampleInfo field to a CSV string
type IntervalList ¶
type IntervalList []types.PerfInterval
IntervalList wraps []types.PerfInterval.
func (IntervalList) Enabled ¶
func (l IntervalList) Enabled() map[int32][]string
Enabled returns a map with Level as the key and enabled PerfInterval.Name(s) as the value.