package alarm

import "github.com/vmware/govmomi/alarm"

Index

Variables

Types

type Manager

type Manager struct {
	object.Common
	// contains filtered or unexported fields
}

func GetManager

func GetManager(c *vim25.Client) (*Manager, error)

GetManager wraps NewManager, returning ErrNotSupported when the client is not connected to a vCenter instance.

func NewManager

func NewManager(c *vim25.Client) *Manager

func (Manager) AcknowledgeAlarm

func (m Manager) AcknowledgeAlarm(ctx context.Context, alarm types.ManagedObjectReference, entity object.Reference) error

func (Manager) CreateAlarm

func (Manager) GetAlarm

func (m Manager) GetAlarm(ctx context.Context, entity object.Reference) ([]mo.Alarm, error)

GetAlarm returns available alarms defined on the entity.

func (Manager) GetStateInfo

func (m Manager) GetStateInfo(ctx context.Context, entity object.Reference, opts StateInfoOptions) ([]StateInfo, error)

GetStateInfo combines AlarmState with Alarm.Info

type StateInfo

type StateInfo struct {
	types.AlarmState
	Info  *types.AlarmInfo `json:"name,omitempty"`
	Path  string           `json:"path,omitempty"`
	Event types.BaseEvent  `json:"event,omitempty"`
}

StateInfo combines AlarmState with Alarm.Info

type StateInfoOptions

type StateInfoOptions struct {
	Declared      bool
	InventoryPath bool
	Event         bool
}

StateInfoOptions for the GetStateInfo method

Source Files

manager.go

Version
v0.48.1 (latest)
Published
Feb 11, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
2 months ago

Tools for package owners.