fake

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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