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

[Bindings] Update yaml snippet to match updated qs #3660

Merged
merged 9 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ Using Dapr's bindings API, you can trigger your app with events coming in from e
- Switch between bindings at runtime.
- Build portable applications with environment-specific bindings set-up and no required code changes.

For example, with bindings, your microservice can respond to incoming Twilio/SMS messages without:
For example, with bindings, your application can respond to incoming Twilio/SMS messages without:

- Adding or configuring a third-party Twilio SDK
- Worrying about polling from Twilio (or using WebSockets, etc.)

{{% alert title="Note" color="primary" %}}
<img src="/images/binding-overview.png" width=1000 alt="Diagram showing bindings">

In the above diagram:
- The input binding triggers a method on your application.
- Execute output binding operations on the component, such as `"create"`.

Bindings are developed independently of Dapr runtime. You can [view and contribute to the bindings](https://github.com/dapr/components-contrib/tree/master/bindings).
{{% /alert %}}

{{% alert title="Note" color="primary" %}}
If you are using the HTTP Binding, then it is preferable to use [service invocation]({{< ref service_invocation_api.md >}}) instead. Read [How-To: Invoke Non-Dapr Endpoints using HTTP]({{< ref "howto-invoke-non-dapr-endpoints.md" >}}) for more information.
Expand Down Expand Up @@ -53,7 +57,12 @@ With output bindings, you can invoke external resources. An optional payload and
To invoke an output binding:

1. Define the component YAML that describes the binding type and its metadata (connection info, etc.).
2. Use the HTTP endpoint or gRPC method to invoke the binding with an optional payload.
1. Use the HTTP endpoint or gRPC method to invoke the binding with an optional payload.
1. Specify an output operation. Output operations depend on the binding component you use, and can include:
- `"create"`
- `"update"`
- `"delete"`
- `"exec"`

Read the [Use output bindings to interface with external resources guide]({{< ref howto-bindings.md >}}) to get started with output bindings.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ spec:
metadata:
- name: schedule
value: "@every 10s" # valid cron schedule
- name: direction
value: "input" # direction of the cron binding
```

**Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked.
Expand Down Expand Up @@ -216,6 +218,8 @@ spec:
metadata:
- name: url # Required
value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10"
- name: direction
value: "output" # direction of the postgresql binding
```

In the YAML file:
Expand Down Expand Up @@ -391,6 +395,8 @@ spec:
metadata:
- name: schedule
value: "@every 10s" # valid cron schedule
- name: direction
value: "input" # direction of the cron binding
```

**Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked.
Expand Down Expand Up @@ -418,6 +424,8 @@ spec:
metadata:
- name: url # Required
value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10"
- name: direction
value: "output" # direction of the postgresql binding
```

In the YAML file:
Expand Down Expand Up @@ -595,6 +603,8 @@ spec:
metadata:
- name: schedule
value: "@every 10s" # valid cron schedule
- name: direction
value: "input" # direction of the cron binding
```

**Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked.
Expand Down Expand Up @@ -622,6 +632,8 @@ spec:
metadata:
- name: url # Required
value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10"
- name: direction
value: "output" # direction of the postgresql binding
```

In the YAML file:
Expand Down Expand Up @@ -805,6 +817,8 @@ spec:
metadata:
- name: schedule
value: "@every 10s" # valid cron schedule
- name: direction
value: "input" # direction of the cron binding
```

**Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked.
Expand Down Expand Up @@ -832,6 +846,8 @@ spec:
metadata:
- name: url # Required
value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10"
- name: direction
value: "output" # direction of the postgresql binding
```

In the YAML file:
Expand Down Expand Up @@ -1017,6 +1033,8 @@ spec:
metadata:
- name: schedule
value: "@every 10s" # valid cron schedule
- name: direction
value: "input" # direction of the cron binding
```

**Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked.
Expand Down Expand Up @@ -1044,6 +1062,8 @@ spec:
metadata:
- name: url # Required
value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10"
- name: direction
value: "output" # direction of the postgresql binding
```

In the YAML file:
Expand Down
Binary file added daprdocs/static/images/binding-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading