Skip to content

Commit

Permalink
fix: migrate app structs to page folder (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
afzal442 committed Dec 19, 2023
1 parent 5d1bb77 commit 60484de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Environment variables and Configuration file
weight: 80
weight: 50
---

# Environment Variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Function and Lifecycle events
weight: 80
weight: 40
---

# Functions
Expand Down Expand Up @@ -44,13 +44,14 @@ export default async function (event) {
|channel|string|The channel/topic you want to send the message to. Defaults to `event.channel`, i.e., the same channel as the received event.
|server|string|The server/broker you want to send the message to. Defaults to `event.serverName`, i.e., the same server as the received event.
## How does Glee know which function it should execute?
Glee reads your `asyncapi.yaml` file and searches for all the `publish` operations containing an `operationId` attribute. The `operationId` serves as a mechanism to bind a given operation to a specific function file. For instance, given the folowing AsyncAPI definition:
Glee reads your `asyncapi.yaml` file and searches for all the `receive` actions containing an `operations` attribute field. The `operations` field serves as a mechanism to bind a given operation to a specific function file. For instance, given the folowing AsyncAPI definition:
```yaml
...
channels:
hello:
publish:
operationId: onHello
operations:
onHello: # operation ID
action: receive
channel:
$ref: '#/channels/hello'
...
```

Expand Down

0 comments on commit 60484de

Please sign in to comment.