Skip to content

Commit 0187f14

Browse files
committed
Improve readme
1 parent cf89390 commit 0187f14

File tree

2 files changed

+10
-68
lines changed

2 files changed

+10
-68
lines changed

readme.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
![Icon](https://raw.githubusercontent.com/devlooped/dotnet-eventgrid/main/img/icon-32.png) dotnet-eventgrid
22
============
33

4+
[![Version](https://img.shields.io/nuget/v/dotnet-eventgrid.svg?color=royalblue)](https://www.nuget.org/packages/dotnet-eventgrid)
5+
[![Downloads](https://img.shields.io/nuget/dt/dotnet-eventgrid.svg?color=darkmagenta)](https://www.nuget.org/packages/dotnet-eventgrid)
6+
[![License](https://img.shields.io/github/license/devlooped/dotnet-eventgrid.svg?color=blue)](https://github.com/devlooped/dotnet-eventgrid/blob/main/LICENSE)
7+
48
An Azure Function app with an EventGrid-trigger function that forwards events
59
to an Azure SignalR service, and an accompanying `dotnet` global tool to
610
connect to it and receive the streaming events in real-time.
@@ -13,7 +17,7 @@ I find the [Azure EventGrid Viewer](https://github.com/Azure-Samples/azure-event
1317
quite lacking and stagnating, it's [just a sample after all](https://docs.microsoft.com/en-us/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/).
1418
Also, I'm much more into [dotnet global tools](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools)
1519
than web pages, having created a bunch of others like [dotnet-vs](https://github.com/devlooped/dotnet-vs),
16-
[guit](https://github.com/devlooped/guit), [dotnet-file](https://github.com/devlooped/dotnet-file) and
20+
[guit](https://github.com/devlooped/guit), [dotnet-eventgrid](https://github.com/devlooped/dotnet-eventgrid) and
1721
[dotnet-config](https://github.com/devlooped/dotnet-config) ¯\_(ツ)_
1822

1923
## Install
@@ -31,6 +35,11 @@ dotnet tool update -g dotnet-eventgrid
3135
```
3236

3337
<!-- #tool -->
38+
39+
This tool provides a real-time view of Azure EventGrid events, by connecting to an Azure SignalR
40+
service through an Azure Function app. The function app is triggered by EventGrid events and forwards
41+
them to the SignalR service, which the tool connects to and receives the events in real-time.
42+
3443
## Usage
3544

3645
```

src/EventGrid/readme.md

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,3 @@
11
<!-- include ../../readme.md#tool -->
2-
<!-- #tool -->
3-
## Usage
42

5-
```
6-
Usage: eventgrid [url] -[property]* +[property[=minimatch]]*
7-
+all Render all properties
8-
-property Exclude a property
9-
+property[=minimatch] Include a property, optionally filtering
10-
with the given the minimatch expression.
11-
jq=expression When rendering event data containing JSON,
12-
apply the given JQ expression. Learn more at
13-
https://stedolan.github.io/jq/
14-
15-
Examples:
16-
- Include all event properties, for topic ending in 'System'
17-
eventgrid https://mygrid.com +all +topic=**/System
18-
19-
- Exclude data property and filter for specific event types
20-
eventgrid https://mygrid.com -data +eventType=Login
21-
22-
- Filter using synthetized path property '{domain}/{topic}/{subject}/{eventType}'
23-
eventgrid https://mygrid.com +path=MyApp/**/Login
24-
25-
- Filter using synthetized path property for a specific event and user (subject)
26-
eventgrid https://mygrid.com +path=MyApp/*/1bQUI/Login
27-
28-
- Render sponsorship action, sponsorable login and sponsor login from GH webhook JSON event data:
29-
eventgrid https://mygrid.com jq="{ action: .action, sponsorable: .sponsorship.sponsorable.login, sponsor: .sponsorship.sponsor.login }"
30-
```
31-
32-
*eventgrid* also supports [.netconfig](https://dotnetconfig.org) for configuring
33-
arguments:
34-
35-
```gitconfig
36-
[eventgrid]
37-
url = https://events.mygrid.com
38-
39-
# filters that events must pass to be rendered
40-
filter = path=MyApp/**/Login
41-
filter = eventType=*System*
42-
43-
# properties to include in the event rendering
44-
include = EventType
45-
include = Subject
46-
47-
# properties to exclude from event rendering
48-
exclude = data
49-
50-
# apply jq when rendering JSON data payloads
51-
jq = "{ action: .action, sponsor: .sponsorship.sponsor.login }"
52-
```
53-
54-
The `url` is the address of your deployed function app, which can optionally
55-
have an `?key=[access-key]` query string with the same value specified in the
56-
Function App configuration settings with the name `AccessKey`. If present, it
57-
will be used as a shared secret to authorize the SignalR stream connection.
58-
It's passed as the `X-Authorization` custom header and checked by the function
59-
during SignalR connection negotiation.
60-
61-
Keep in mind that the built-in EventGrid format for `topic` is rather unwieldy:
62-
`/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}`.
63-
For this reason, we also provide a synthetized `path` property with the much
64-
simpler format `{domain}/{topic}/{subject}/{eventType}`, which makes filtering
65-
with the [minimatch](https://github.com/isaacs/minimatch) format much more
66-
convenient.
67-
68-
<!-- #tool -->
69-
<!-- ../../readme.md#tool -->
703
<!-- exclude -->`

0 commit comments

Comments
 (0)