Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokenEchoCloudEventProcessor ¶
type BrokenEchoCloudEventProcessor struct { EventSender EventSender Sleeper Sleeper }
BrokenEchoCloudEventProcessor is an implementation that does wrong event signalling. I.e., it sends a .finished event before a .started event. Useful for testing purposes.
func (BrokenEchoCloudEventProcessor) Process ¶
func (ep BrokenEchoCloudEventProcessor) Process(event cloudevents.Event) error
Process processes a cloud event
type CloudEventProcessor ¶
type CloudEventProcessor interface {
Process(event cloudevents.Event) error
}
CloudEventProcessor defines a processor on cloud events
type ConfigurableSleeper ¶
type ConfigurableSleeper struct {
// contains filtered or unexported fields
}
ConfigurableSleeper sleeps a configured amount of time
func (ConfigurableSleeper) GetSleepDuration ¶
func (c ConfigurableSleeper) GetSleepDuration() time.Duration
type EchoCloudEventProcessor ¶
type EchoCloudEventProcessor struct { EventSender EventSender Sleeper Sleeper }
EchoCloudEventProcessor is the default implementation of a CloudEventProcessor that hhah
func (EchoCloudEventProcessor) Process ¶
func (ep EchoCloudEventProcessor) Process(event cloudevents.Event) error
Process processes a cloud event
type EventSender ¶
type EventSender interface { // SendEvent sends a cloud event SendEvent(event cloudevents.Event) error }
EventSender defines a cloud event sender
func NewHTTPEventSender ¶
func NewHTTPEventSender(svcEndpoint url.URL) EventSender
NewHTTPEventSender creates a new instance of a HTTP based cloud event sender
type HTTPEventSender ¶
type HTTPEventSender struct {
// contains filtered or unexported fields
}
HTTPEventSender is a HTTP based implementation of a cloud event sender
func (HTTPEventSender) SendEvent ¶
func (es HTTPEventSender) SendEvent(event cloudevents.Event) error
SendEvent sends a cloud event
type Sleeper ¶
type Sleeper interface { // Sleep pauses execution Sleep() // GetSleepDuration returns the current configured sleep duration of the sleeper GetSleepDuration() time.Duration }
Sleeper is responsible to pause execution
type TestSleeper ¶
type TestSleeper struct { }
TestSleeper is an implementation of a Sleeper which pretends to sleep
func (*TestSleeper) GetSleepDuration ¶
func (s *TestSleeper) GetSleepDuration() time.Duration