Documentation ¶
Index ¶
- type EventSender
- func (es *EventSender) AddReactor(eventTypeSelector string, reactor func(event cloudevents.Event) error)
- func (es *EventSender) AssertSentEventTypes(eventTypes []string) error
- func (es *EventSender) Send(ctx context.Context, event cloudevents.Event) error
- func (es *EventSender) SendEvent(event cloudevents.Event) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventSender ¶
type EventSender struct { SentEvents []cloudevents.Event Reactors map[string]func(event cloudevents.Event) error // contains filtered or unexported fields }
EventSender fakes the sending of CloudEvents
func (*EventSender) AddReactor ¶
func (es *EventSender) AddReactor(eventTypeSelector string, reactor func(event cloudevents.Event) error)
AddReactor adds custom logic that should be applied when SendEvent is called for the given event type
func (*EventSender) AssertSentEventTypes ¶
func (es *EventSender) AssertSentEventTypes(eventTypes []string) error
AssertSentEventTypes checks if the given event types have been passed to the SendEvent function
func (*EventSender) Send ¶
func (es *EventSender) Send(ctx context.Context, event cloudevents.Event) error
func (*EventSender) SendEvent ¶
func (es *EventSender) SendEvent(event cloudevents.Event) error
SendEvent fakes the sending of CloudEvents
Click to show internal directories.
Click to hide internal directories.