Choice CRD provides a way to easily define a list of branches, each receiving the same CloudEvent sent to the Choice ingress channel. Typically, each branch consists of a filter function guarding the execution of the branch.
Subscriptions under the hood.
Choice has three parts for the Spec:
casesdefines the list of
subscriberpairs, one per branch, and optionally a
replyobject. For each branch:
filteris evaluated and when it returns an event the
subscriberis executed. Both
- the event returned by the
subscriberis sent to the branch
replyobject. When the
replyis empty, the event is sent to the
spec.replyobject (see below).
channelTemplatedefines the Template which will be used to create
replydefines where the result of each branch is sent to when the branch does not have its own
Choice has three parts for the Status:
conditionswhich details the overall status of the Choice object
caseStatuseswhich convey the status of underlying
Subscriptionresource that are created as part of this Choice.
addresswhich is exposed so that Choice can be used where Addressable can be used. Sending to this address will target the
Channelwhich is fronting this Choice (same as
Learn how to use Choice by following the examples
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.