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

Make the description dependent on the deployment environment #153

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions docs/functions/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,26 @@ You likely won't need to change this, but if you do, *you must include the envir
}
```

### Description

By default, Sidecar will generate a description for your Lambda function based on the deployment environment and the name of your app.

You likely won't need to customise it, however, you can if you want, although it has no direct impact.

```php
class ExampleFunction extends LambdaFunction
{
public function description()
{
return sprintf('%s [%s]: Sidecar function `%s`.', ...[
config('sidecar.app_name'),
Sidecar::getEnvironment(),
static::class,
]);
}
}
```

## Tags

A key-value array of strings of tags to be applied to your function, this can be used to organize your functions by owner, project or departement.
Expand Down
2 changes: 1 addition & 1 deletion src/LambdaFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function description()
{
return sprintf('%s [%s]: Sidecar function `%s`.', ...[
config('sidecar.app_name'),
config('app.env'),
Sidecar::getEnvironment(),
static::class,
]);
}
Expand Down