Skip to content

CloudEvent should expose a method to get all of the CE headers #149

Closed

Description

@lance

See: https://github.com/knative/docs/pull/2446/files#diff-de16006ea59029f2429d3228fed269c6R46-R55

The SDK should provide a simpler way to extract all of the headers from a CE. Check with sdk-go to see if/how this is exposed there. I'm not 100% sure about exposing them on a CloudEvent directly since that binds it to the HTTP transport. But what happens when we implement AVRO for example?

Activity

  1. self-assigned this
    on May 14, 2020
  2. lance commented on May 14, 2020

    @lance
    MemberAuthor

    In retrospect, it seems that adding this method directly to the CloudEvent class is perhaps not the best approach. That conflates the event itself with the HTTP transport protocol. I would like to keep these two concepts decoupled. I currently have an implementation for this on the HTTPEmitter which is introduced in this PR soon #141. Once that PR lands, I'll submit this change for consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions