event

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(events []types.BaseEvent)

Sort events in ascending order base on Key From the EventHistoryCollector.latestPage sdk docs:

The "oldest event" is the one with the smallest key (event ID).
The events in the returned page are unordered.

Types

type HistoryCollector

type HistoryCollector struct {
	*object.HistoryCollector
}

func (HistoryCollector) LatestPage

func (h HistoryCollector) LatestPage(ctx context.Context) ([]types.BaseEvent, error)

func (HistoryCollector) ReadNextEvents

func (h HistoryCollector) ReadNextEvents(ctx context.Context, maxCount int32) ([]types.BaseEvent, error)

func (HistoryCollector) ReadPreviousEvents

func (h HistoryCollector) ReadPreviousEvents(ctx context.Context, maxCount int32) ([]types.BaseEvent, error)

type Manager

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

func NewManager

func NewManager(c *vim25.Client) *Manager

func (Manager) CreateCollectorForEvents

func (m Manager) CreateCollectorForEvents(ctx context.Context, filter types.EventFilterSpec) (*HistoryCollector, error)

func (Manager) EventCategory

func (m Manager) EventCategory(ctx context.Context, event types.BaseEvent) (string, error)

EventCategory returns the category for an event, such as "info" or "error" for example.

func (Manager) Events added in v0.5.0

func (m Manager) Events(ctx context.Context, objects []types.ManagedObjectReference, pageSize int32, tail bool, force bool, f func(types.ManagedObjectReference, []types.BaseEvent) error) error

Get the events from the specified object(s) and optionanlly tail the event stream

func (Manager) LogUserEvent

func (m Manager) LogUserEvent(ctx context.Context, entity types.ManagedObjectReference, msg string) error

func (Manager) PostEvent

func (m Manager) PostEvent(ctx context.Context, eventToPost types.BaseEvent, taskInfo types.TaskInfo) error

func (Manager) QueryEvents

func (m Manager) QueryEvents(ctx context.Context, filter types.EventFilterSpec) ([]types.BaseEvent, error)

func (Manager) RetrieveArgumentDescription

func (m Manager) RetrieveArgumentDescription(ctx context.Context, eventTypeID string) ([]types.EventArgDesc, error)

Jump to

Keyboard shortcuts

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