2019-02-24 16:58:53 UTC - Roberto Diaz: Hey one question... In actionloop from the stdin we get the action name also right? I'm thinking in use it to select the function to execute in libraries with several functions
If the user library exposes a hashmap with his action names and a function reference we can select in execution time the function to execute in the actionloop launcher https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551027533137900 ---- 2019-02-24 16:59:55 UTC - Roberto Diaz: I have been working on the launcher and I think that I mostly integrated all the functionality used in the python one. https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551027595139300 ---- 2019-02-24 17:03:07 UTC - Roberto Diaz: Now I'm organizing it to include the user code as a library under the same cargo namespace. This way I think that we can have a lot of freedom to insert the user code with his own dependencies and we will get a launcher bin including all our necessary code and also the user code. https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551027787143600 ---- 2019-02-24 17:21:55 UTC - Carlos Santana: You can pass the name of the function/method, in the CLI is pass with flag “—main” like “—main foobar” the “foobar” string gets pass in the init to your executable when it starts https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551028915145500 ---- 2019-02-24 17:22:56 UTC - Roberto Diaz: Ok! We should take that into account then also https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551028976146100 ---- 2019-02-24 17:24:03 UTC - Carlos Santana: @Roberto Diaz my bad the executable doesn’t get this info is the compiler on init https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551029043146800 ---- 2019-02-24 17:24:24 UTC - Carlos Santana: Here in swift the python scripts gets call with the main function name <https://github.com/apache/incubator-openwhisk-runtime-swift/blob/master/core/swift42Action/swiftbuild.py#L91> https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551029064147500 ---- 2019-02-24 17:25:03 UTC - Carlos Santana: Then the executable is compiled to run that function when it starts and parses every invocation thru stdin https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551029103148500 ---- 2019-02-24 17:25:47 UTC - Carlos Santana: def main(argv): if len(argv) < 4: print("usage: <main-function> <source-dir> <target-dir>") sys.exit(1) https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551029147148700 ---- 2019-02-24 17:26:28 UTC - Carlos Santana: In the script that acts as the compiler is your opportunity to add source, modify source, change config, etc.. to make final executable aware what’s the function to run https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551029188149900 ---- 2019-02-24 18:58:32 UTC - Roberto Diaz: Okk, we have to modified the build, so we can get the action name anyway there and storage on a env variable if there is no option to access it from the launcher. BTW I thought that a json with a lot of info is provided to the launcher I saw in somewhere... But I should confuse it with the init https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551034712153200 ---- 2019-02-24 19:07:46 UTC - Carlos Santana: Yeah you dynamically Edit the launcher also https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551035266153700 ---- 2019-02-24 19:08:01 UTC - Carlos Santana: Before the final compile step https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1551035281154200 ----