Created
April 25, 2016 18:37
-
-
Save mweagle/6574a57e558fd69c91698fdb4a4be12c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add the string literal adapter, which requires us to add exported | |
// functions to the end of index.js. These NodeJS exports will be | |
// linked to the AWS Lambda NodeJS function name, and are basically | |
// automatically generated pass through proxies to the golang HTTP handler. | |
nodeJSWriter, err := lambdaArchive.Create("index.js") | |
if err != nil { | |
return nil, errors.New("Failed to create ZIP entry: index.js") | |
} | |
nodeJSSource := _escFSMustString(false, "/resources/index.js") | |
nodeJSSource += "\n// DO NOT EDIT - CONTENT UNTIL EOF IS AUTOMATICALLY GENERATED\n" | |
for _, eachLambda := range ctx.lambdaAWSInfos { | |
nodeJSSource += createNewNodeJSProxyEntry(eachLambda, ctx.logger) | |
} | |
// SPARTA CUSTOM RESOURCES | |
for _, eachCustomResourceName := range golangCustomResourceTypes { | |
nodeJSSource += createNewSpartaCustomResourceEntry(eachCustomResourceName, ctx.logger) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment