* feat!: expose a version agnostic event emitter This is a breaking change. This commit exposes an HTTP based event emitter that simplifes the API. To use it, simply import the SDK and start emitting. The default spec version is 1.0, but you can use 0.3 by supplying that to the constructor. By default, CloudEvents are emitted in binary mode, but this can be changed by providing the "structured" parameter to the `send()` function. This commit also eliminates the version specific emitters and receivers from the `v1` and `v03` exports, and eliminates the explicit usage of versioned emitters from `lib/bindings/http`. Finally, the CE headers can be retrieved from the emitter for a given event by passing the event to the `headers()` function. Fixes: https://github.com/cloudevents/sdk-javascript/issues/124 Fixes: https://github.com/cloudevents/sdk-javascript/issues/149 Signed-off-by: Lance Ball <lball@redhat.com> |
||
---|---|---|
.. | ||
index.js |