Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read and write extensions APIs #122

Closed
slinkydeveloper opened this issue Apr 21, 2020 · 2 comments · Fixed by #162
Closed

Read and write extensions APIs #122

slinkydeveloper opened this issue Apr 21, 2020 · 2 comments · Fixed by #162
Assignees

Comments

@slinkydeveloper
Copy link
Member

Define APIs about how to read and write extensions

@slinkydeveloper
Copy link
Member Author

slinkydeveloper commented Apr 21, 2020

As #108:

ExtensionsParser singleton is provided to read extensions:

DistributedTracingExtension ext = ExtensionsParser
  .getInstance()
  .parseExtension(DistributedTracingExtension.class, event);

While to write extensions, the CloudEventBuilder supports them:

builder.withExtension(ext);

@slinkydeveloper
Copy link
Member Author

slinkydeveloper commented May 29, 2020

Extension needs to be reworked to remove the assertion that it can be translated to a map (aka similar to CloudEventExtensions, removing asMap).
Also readFromEvent should accept CloudEventExtensions, not CloudEvent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant