Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventReceiver ¶
type EventReceiver struct{}
EventReceiver implements ResponseSubscriber to validate function invocation and return status
func NewEventReceiver ¶
func NewEventReceiver() *EventReceiver
NewEventReceiver returns an EventReceiver which implements the ResponseSubscriber interface to print status information for each function invokation
func (*EventReceiver) Response ¶
func (e *EventReceiver) Response(res ofsdk.InvokerResponse)
Response prints status information for each function invokation
type OutboundEvent ¶
type OutboundEvent struct { Topic string `json:"topic,omitempty"` Category string `json:"category,omitempty"` Source string `json:"source"` UserName string `json:"userName,omitempty"` CreatedTime time.Time `json:"createdTime,omitempty"` ObjectName string `json:"objectName,omitempty"` ManagedObjectReference *vtypes.ManagedObjectReference `json:"managedObjectReference,omitempty"` }
OutboundEvent is the JSON object sent to subscribed functions If the ManagedObjectReference for an event cannot be retrieved, it will be nil and thus not marshaled into the JSON OutboundEvent It's the receivers responsibility to check whether managedObjectReference key is present in the JSON message payload ObjectName is the name of the object as it appears in vCenter - uniqueness is only guaranteed at the folder level, if applicable, where this object resides