Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCloudEvent ¶
func NewCloudEvent(opts ...CloudEventOption) cloudevents.Event
Types ¶
type CloudEventOption ¶
type CloudEventOption func(*cloudevents.Event)
func CloudEventWithExtensionOption ¶
func CloudEventWithExtensionOption(key, value string) CloudEventOption
func CloudEventWithIDOption ¶
func CloudEventWithIDOption(id string) CloudEventOption
func CloudEventWithSourceOption ¶
func CloudEventWithSourceOption(s string) CloudEventOption
func CloudEventWithTypeOption ¶
func CloudEventWithTypeOption(t string) CloudEventOption
type Consumer ¶
type Consumer interface {
Start(ctx context.Context) error
GetStoredEvents() []StoredEvent
GetConsumerEndPoint() string
WaitForEvent(timeout time.Duration, filters ...EventFilterOption) bool
}
func NewSimpleConsumer ¶
type EventFilterOption ¶
type EventFilterOption func(event *cloudevents.Event) bool
func EventiFilterWithID ¶
func EventiFilterWithID(id string) EventFilterOption
type Producer ¶
type Producer interface {
Produce(ctx context.Context, event cloudevents.Event) error
GetStoredEvents() []StoredEvent
}
func NewSimpleProducer ¶
type SimpleConsumer ¶
type SimpleConsumer struct {
// contains filtered or unexported fields
}
func (*SimpleConsumer) GetConsumerEndPoint ¶
func (s *SimpleConsumer) GetConsumerEndPoint() string
func (*SimpleConsumer) GetStoredEvents ¶
func (s *SimpleConsumer) GetStoredEvents() []StoredEvent
func (*SimpleConsumer) WaitForEvent ¶
func (s *SimpleConsumer) WaitForEvent(timeout time.Duration, filters ...EventFilterOption) bool
type SimpleProducer ¶
type SimpleProducer struct {
// contains filtered or unexported fields
}
func (*SimpleProducer) GetStoredEvents ¶
func (p *SimpleProducer) GetStoredEvents() []StoredEvent
func (*SimpleProducer) Produce ¶
func (p *SimpleProducer) Produce(ctx context.Context, event cloudevents.Event) error
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Add ¶
func (s *Store) Add(event cloudevents.Event, opts ...StoredEventOption)
func (*Store) GetAll ¶
func (s *Store) GetAll() []StoredEvent
type StoredEvent ¶
type StoredEvent struct {
Time time.Time
Event cloudevents.Event
Result cloudevents.Result
Reply cloudevents.Event
}
type StoredEventOption ¶
type StoredEventOption func(*StoredEvent)
func StoredEventWithResult ¶
func StoredEventWithResult(r cloudevents.Result) StoredEventOption
Click to show internal directories.
Click to hide internal directories.