alarm

package
v0.46.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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