Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHistoryCollector ¶
func NewHistoryCollector(ctx context.Context, mgr *event.Manager, entity types.ManagedObjectReference, filters ...Filter) (*event.HistoryCollector, error)
NewHistoryCollector creates a new event collector for the specified entity. By default, events for the entity and all (indirect) children (if any) are retrieved and event collection starts at "now".
func ToCloudEvent ¶ added in v0.2.4
func ToCloudEvent(source string, be types.BaseEvent, extensions map[string]string) (ce.Event, error)
ToCloudEvent transforms the vSphere event into a CloudEvent. The full vSphere event is JSON-encoded and available in the data field. Extensions sets the map keys and values as CloudEvent extensions. Optional, i.e. can be nil. If specified, extensions must contain valid CloudEvent extensions.
Types ¶
type Details ¶
Details contains the type and class of an event received from vCenter supported event classes: event, eventex, extendedevent.
Class to type mapping: event: retrieved from event Class, e.g.VmPoweredOnEvent eventex: retrieved from EventTypeId extendedevent: retrieved from EventTypeId
func GetDetails ¶
GetDetails retrieves the underlying vSphere event class and name for the given BaseEvent, e.g. VmPoweredOnEvent (event) or com.vmware.applmgmt.backup.job.failed.event (extendedevent)
type Filter ¶
type Filter func(f *types.EventFilterSpec) error
Filter is a filter applied to the event filter spec. See vSphere API documentation for Details on the specific fields.
func WithEventTypeID ¶
WithEventTypeID limits the set of collected events to those specified types
func WithMaxCount ¶
WithMaxCount specifies the maximum number of returned events
func WithRecursion ¶
func WithRecursion(r types.EventFilterSpecRecursionOption) Filter
WithRecursion specifies whether events should be received only for the specified object, including its direct children or all children
func WithTime ¶
func WithTime(time *types.EventFilterSpecByTime) Filter
WithTime filters events based on time
func WithUsername ¶
func WithUsername(u *types.EventFilterSpecByUsername) Filter
WithUsername filters events based on username