Skip to content

Commit

Permalink
Provide documentation for pushing events (#31)
Browse files Browse the repository at this point in the history
Provide documentation for pushing events.

Closes #24
  • Loading branch information
tomkerkhove committed Jan 28, 2019
1 parent c4cbb96 commit 71250cf
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/_site/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Documentation
====

All documentation for Arcus Event Grid Sidecar which are published via GitHub Pages with Jekyll.
All documentation for Arcus Event Grid Proxy which are published via GitHub Pages with Jekyll.

## Running Jekyll locally

Expand Down
9 changes: 8 additions & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Here is an overview of how you can configure the container.

# Runtime
The runtime is flexible and allows you to configure it to meet your needs:
- **ARCUS_HTTP_PORT** - Defines the port to serve HTTP traffic _(default 80)_
- `ARCUS_HTTP_PORT` - Defines the port to serve HTTP traffic _(default 80)_

# Azure Event Grid Topic
Proxy currently supports pushing events to only one Azure Event Grid topic.

The topic to push to must be configured with the following environment variables:
- `ARCUS_EVENTGRID_TOPICENDPOINT` - Url of the topic to push to
- `ARCUS_EVENTGRID_AUTHKEY` - Authentication key to authenticate with

[← back](/)
33 changes: 33 additions & 0 deletions docs/features/push-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: default
title: Push Events
---

You can easily push events to your topic via the proxy:
```bash
curl -X POST "http://localhost:8999/api/v1/events/Arcus.NewCarRegistered"
-H "accept: text/plain" -H "Content-Type: application/json-patch+json"
-d "{ \"licensePlate\": \"1-ABC-337\"}" --include
```

If everything is ok it will return an HTTP 204, otherwise an HTTP 503.

```bash
HTTP/1.1 204 No Content
Date: Mon, 28 Jan 2019 17:49:43 GMT
X-Event-Id: e9ca21cc-50ed-4138-a760-1ca9b01b092f
X-Event-Subject: /
X-Event-Timestamp: 2019-01-28T17:49:43.9021889+00:00
X-Event-Data-Version: 1.0
```

## Optional parameters
We provide the capability to be more specific about your events.

You can specify more information with the following query parameters:
- `eventId` - Unique id for your event _(default: Guid)_
- `eventTimestamp` - Timestamp of event _(default: UTC)_
- `eventSubject` - Subject of event _(default: /)_
- `dataVersion` - Version of data payload _(default: 1.0)_

[← back](/)
8 changes: 6 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ redirect_from:
# Installation
Running Arcus Event Grid Proxy is super easy:
```
docker run -d -p 8999:80 --name arcus arcusazure/azure-event-grid-proxy
docker run -d -p 8999:80 --name arcus arcusazure/azure-event-grid-proxy /
-e ARCUS_EVENTGRID_TOPICENDPOINT= /
-e ARCUS_EVENTGRID_AUTHKEY=
```

Docker image will be available on [Docker Hub](https://hub.docker.com/r/arcusazure/azure-event-grid-proxy).

# Features
- Push events to Azure Event Grid via REST ([docs](features/push-events))
- Monitor runtime with a health endpoint ([docs](operations/health))

# Documentation
Expand All @@ -27,7 +30,8 @@ Docker image will be available on [Docker Hub](https://hub.docker.com/r/arcusazu
- **Deployment**
- [Image Tagging Strategy](deploy/tagging-strategy)
- **Configuration**
- [Runtime](config#runtime)
- [Runtime](config#runtime)
- [Azure Event Grid Topic](config#azure-event-grid-topic)

# License
This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application.
Expand Down

0 comments on commit 71250cf

Please sign in to comment.