Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎁 Event sending docs with --to option acting as a sink #369

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,44 +73,44 @@ $ kn event build \

To send and event you should utilize `send` subcommand. The `send` command
leverages the same builder-like interface as `build` command does. You could
send an event to public address of your application by using `--to-url` option,
or to supported in-cluster resources by using `--to` option.
send an event to public address of your application or to supported
in-cluster resources by using `--to` option.

#### Sending to public address

To send event to public address you use `--to-url` option:
To send event to public address you use pass it to the `--to` option:

```sh
$ kn event send \
--field player.id=6354aa60-ddb1-452e-8c13-24893667de20 \
--field player.game=2345 \
--field points=456 \
--type org.example.gaming.foo \
--to-url http://ce-api.foo.example.org/
--to http://ce-api.foo.example.org/
```

> **NOTE**: All argument, except `--to-url` are optional. Use
> **NOTE**: All argument, except `--to` are optional. Use
> `kn event send --help` to see full usage information.

#### Sending to in-cluster resources

Sending event to in-cluster resources is done with a companion Job that is
deployed on your cluster. In that way `kn-event` and send your event even to
Sending events to in-cluster resources is done with a companion *Job* that
is deployed on your cluster. This allows `kn-event` to send your events to
resources that are not publicly accessible.

Send an event to a Knative service `event-display` in namespace `default`:
Send an event to a Knative service `showcase` in current namespace:

```sh
$ kn event send \
--type org.example.kn.ping \
--id $(uuidgen) \
--field event.type=test \
--field event.data=98765 \
--to Service:serving.knative.dev/v1:event-display
--to showcase
```

> **NOTE**: All argument, except `--to-url` are optional. Use
> `kn event send --help` to see full usage information.
> **NOTE**: The --to option follow [the Kn sink format](https://github.com/knative/client/blob/main/docs/cmd/kn_trigger_create.md#options).
> Use `kn event send --help` to see full format description.

## Install

Expand Down
Loading