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

Refactor/split handler #3

Merged
merged 9 commits into from
Jun 7, 2021
Merged

Refactor/split handler #3

merged 9 commits into from
Jun 7, 2021

Conversation

Wintus
Copy link
Owner

@Wintus Wintus commented Jun 6, 2021

resolve #2

log → log, slack

@todo
Copy link

todo bot commented Jun 6, 2021

narrow

Resource: "*", // TODO: narrow
Action: "lambda:InvokeFunction",
},
],
},
},


This comment was generated by todo based on a TODO comment in 7a052fb in #3. cc @Wintus.

Copy link
Owner Author

@Wintus Wintus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODOs

Comment on lines +6 to +8
environment: {
SLACK_WEBHOOK_URL: slackWebhookUrl,
},
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give typing

Comment on lines +7 to +10
const slackWebhookUrl = process.env.SLACK_WEBHOOK_URL;
if (!slackWebhookUrl) {
throw new Error("Missing Webhook URL");
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the corresponding typing is preferable.

Comment on lines 18 to 20
environment: {
SLACK_WEBHOOK_URL: slackWebhookUrl,
SLACK_ALERTER_ARN: target,
},
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type it

const command = (json: Buffer) =>
new InvokeCommand({
InvocationType: "Event", // = async
FunctionName: process.env.SLACK_ALERTER_ARN!,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type it.

statements: [
{
Effect: "Allow",
Resource: "*", // TODO: narrow
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME: circular dependency

@Wintus Wintus merged commit a404166 into master Jun 7, 2021
@Wintus Wintus deleted the refactor/split_handler branch June 7, 2021 14:14
@todo todo bot mentioned this pull request Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate ingester function and messanger function
1 participant