Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CeFilter ¶
type CeFilter interface {
PredicateEvent(sourceEvent *cloudevents.Event) (bool, error)
}
CeFilter transforms source cloudEvent in a bool
type CeFilterHandler ¶
type CeFilterHandler struct {
// contains filtered or unexported fields
}
CeFilterHandler provides callback function for filtering cloudEvents
func NewCeFilterHandler ¶
func NewCeFilterHandler(predicate CeFilter, ceClient cloudevents.Client, debug bool) (*CeFilterHandler, error)
NewCeFilterHandler start handling cloudEvents
func (*CeFilterHandler) HandleCe ¶
func (cph *CeFilterHandler) HandleCe(ctx context.Context, sourceEvent cloudevents.Event) (*cloudevents.Event, protocol.Result)
HandleCe if predicate is true reply with the sourceEvent , reply with no content otherwise
type CeMapper ¶
type CeMapper interface {
TransformEvent(sourceEvent *cloudevents.Event) (*cloudevents.Event, error)
}
CeMapper transforms source cloudEvent in a destination cloudEvent
type CeMapperHandler ¶
type CeMapperHandler struct {
// contains filtered or unexported fields
}
CeMapperHandler provides callback functions for handling cloudEvents
func NewCeMapperHandler ¶
func NewCeMapperHandler(ceMapper CeMapper, ceClient cloudevents.Client, sink string, debug bool) (*CeMapperHandler, error)
NewCeMapperHandler start handling cloudEvents
func (*CeMapperHandler) ReceiveReplyCe ¶
func (ceh *CeMapperHandler) ReceiveReplyCe(ctx context.Context, sourceEvent cloudevents.Event) (*cloudevents.Event, protocol.Result)
ReceiveReplyCe transform event and put the result in the response
func (*CeMapperHandler) ReceiveSendCe ¶
func (ceh *CeMapperHandler) ReceiveSendCe(ctx context.Context, sourceEvent cloudevents.Event) protocol.Result
ReceiveSendCe transform event and send it to sink
type CeProducer ¶
type CeProducer interface {
CreateEvent(input interface{}) (*cloudevents.Event, error)
}
CeProducer create new cloudEvent from an input
type CeProducerHandler ¶
type CeProducerHandler struct {
// contains filtered or unexported fields
}
CeProducerHandler provides callback function for producing cloudEvents
func NewProducerHandler ¶
func NewProducerHandler(producer CeProducer, ceClient cloudevents.Client, sink string, timeout time.Duration, debug bool) *CeProducerHandler
NewProducerHandler create new instance
func (*CeProducerHandler) SendCe ¶
func (cph *CeProducerHandler) SendCe(input interface{}) error
SendCe producer and send cloudEvent