forked from knative/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename Choice to Parallel and cases to branches (knative#1786)
- Loading branch information
1 parent
533e6b7
commit 6e8388e
Showing
19 changed files
with
95 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
.idea/ | ||
.vscode/ | ||
.history/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: "Parallel" | ||
weight: 20 | ||
type: "docs" | ||
--- | ||
|
||
Parallel CRD provides a way to easily define a list of branches, each receiving | ||
the same CloudEvent sent to the Parallel ingress channel. Typically, each branch | ||
consists of a filter function guarding the execution of the branch. | ||
|
||
Parallel creates `Channel`s and `Subscription`s under the hood. | ||
|
||
## Usage | ||
|
||
### Parallel Spec | ||
|
||
Parallel has three parts for the Spec: | ||
|
||
1. `branches` defines the list of `filter` and `subscriber` pairs, one per branch, | ||
and optionally a `reply` object. For each branch: | ||
1. (optional) the `filter` is evaluated and when it returns an event the `subscriber` is | ||
executed. Both `filter` and `subscriber` must be `Callable`. | ||
1. the event returned by the `subscriber` is sent to the branch `reply` | ||
object. When the `reply` is empty, the event is sent to the `spec.reply` | ||
object (see below). | ||
1. (optional) `channelTemplate` defines the Template which will be used to | ||
create `Channel`s. | ||
1. (optional) `reply` defines where the result of each branch is sent to when | ||
the branch does not have its own `reply` object. | ||
|
||
### Parallel Status | ||
|
||
Parallel has three parts for the Status: | ||
|
||
1. `conditions` which details the overall status of the Parallel object | ||
1. `ingressChannelStatus` and `branchesStatuses` which convey the status of | ||
underlying `Channel` and `Subscription` resource that are created as part of | ||
this Parallel. | ||
1. `address` which is exposed so that Parallel can be used where Addressable can | ||
be used. Sending to this address will target the `Channel` which is fronting | ||
this Parallel (same as `ingressChannelStatus`). | ||
|
||
## Examples | ||
|
||
Learn how to use Parallel by following the [examples](./samples/parallel/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/eventing/samples/choice/_index.md → docs/eventing/samples/parallel/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...samples/choice/multiple-cases/choice.yaml → .../parallel/multiple-branches/parallel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...les/choice/mutual-exclusivity/choice.yaml → ...parallel/mutual-exclusivity/parallel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.