8000 feat: add batch mode (#448) · jasonjlock/sdk-javascript@9a46e33 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a46e33

Browse files
authored
feat: add batch mode (cloudevents#448)
Adds a batched content mode for incoming events. ```js // It's possible for this to return 1:N events const ceArray = HTTP.toEvent(req.headers, req.body); ``` Signed-off-by: Lance Ball <lball@redhat.com>
1 parent d7e1c41 commit 9a46e33

File tree

7 files changed

+219
-448
lines changed
  • test/integration
  • 7 files changed

    +219
    -448
    lines changed

    README.md

    Lines changed: 10 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -113,7 +113,7 @@ Emitter.on("cloudevent", emit);
    113113
    // In any part of the code will send the event
    114114
    new CloudEvent({ type, source, data }).emit();
    115115

    116-
    // You can also have several listener to send the event to several endpoint
    116+
    // You can also have several listeners to send the event to several endpoints
    117117
    ```
    118118

    119119
    ## CloudEvent Objects
    @@ -151,21 +151,28 @@ There you will find Express.js, TypeScript and Websocket examples.
    151151

    152152
    ---
    153153

    154-
    | Event Formats | [v0.3](https://github.com/cloudevents/spec/tree/v0.3) | [v1.0](https://github.com/cloudevents/spec/tree/v1.0) |
    154+
    | Event Formats | [v0.3](https://github.com/cloudevents/spec/tree/v0.3) | [v1.0](https://github.com/cloudevents/spec/blob/v1.0/spec.md#event-format) |
    155155
    | ----------------- | ----------------------------------------------------- | ----------------------------------------------------- |
    156156
    | AVRO Event Format | :x: | :x: |
    157157
    | JSON Event Format | :heavy_check_mark: | :heavy_check_mark: |
    158158

    159159
    ---
    160160

    161-
    | Transport Protocols | [v0.3](https://github.com/cloudevents/spec/tree/v0.3) | [v1.0](https://github.com/cloudevents/spec/tree/v1.0) |
    161+
    | Protocol Bindings | [v0.3](https://github.com/cloudevents/spec/tree/v0.3) | [v1.0](https://github.com/cloudevents/spec/blob/v1.0/spec.md#protocol-binding) |
    162162
    | ---------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
    163163
    | AMQP Protocol Binding | :x: | :x: |
    164164
    | HTTP Protocol Binding | :heavy_check_mark: | :heavy_check_mark: |
    165165
    | Kafka Protocol Binding | :x: | :x: |
    166166
    | MQTT Protocol Binding | :x: | :x: |
    167167
    | NATS Protocol Binding | :x: | :x: |
    168168

    169+
    ---
    170+
    171+
    | Content Modes | [v0.3](https://github.com/cloudevents/spec/tree/v0.3) | [v1.0](https://github.com/cloudevents/spec/blob/v1.0/http-protocol-binding.md#13-content-modes) |
    172+
    | ---------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
    173+
    | HTTP Binary | :heavy_check_mark: | :heavy_check_mark: |
    174+
    | HTTP Structured | :heavy_check_mark: | :heavy_check_mark: |
    175+
    | HTTP Batch | :heavy_check_mark: | :heavy_check_mark: |
    169176
    ## Community
    170177

    171178
    - There are bi-weekly calls immediately following the [Serverless/CloudEvents

    0 commit comments

    Comments
     (0)
    0