knative / eventing

Event-driven application platform for Kubernetes
https://knative.dev/docs/eventing
Apache License 2.0
1.39k stars 582 forks source link

Delivery Format: support specifying the event format in the kncloudevents dispatcher #8074

Open Cali0707 opened 3 days ago

Cali0707 commented 3 days ago

Problem Throughout eventing, we use the kncloudevents dispatcher to dispatch cloudevents. We should add a SendOption which allows us to specify the format used when sending the events, along the lines of:

dispatcher.SendEvent(ctx, event, destination, WithEventFormat(format.Structured))

When no event format is specified, we should preserve the existing behavior of the package.

Persona: Which persona is this feature for?

Exit Criteria A unit test which sends an even with the structured format set and verifies that it gets a structured event, and a unit test which does the same for the binary format

Time Estimate (optional): How many developer-days do you think this may take to resolve? 1-2

Additional context (optional) Add any other context about the feature request here.

Cali0707 commented 3 days ago

/good-first-issue

knative-prow[bot] commented 3 days ago

@Cali0707: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/knative/eventing/issues/8074): >/good-first-issue Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
EraKin575 commented 3 days ago

/assign