Open mrserverless opened 6 years ago
Unsure if this is of interest to you or anyone else here but I did make a plugin that expands on serverless's native support that's now available. The plugin mostly just attempts to make go support easier by allowing you to specify .go files and public functions in the yml file, as well as a few other niceties.
It appears as if the syntax that is supported is the same between these two plugins - except for the required package
variable in the serverless.yml definition this has.
Let me know if you have any feedback! Or if there is anyway my project could be of help here.
Thanks @sean9keenan, will take a look. Just haven't got much time these few weeks since the go native support was launched. I did manage to contribute to serverless framework on both .net and go but haven't got around to my own code.
Awesome - thanks for your work @yunspace!
@yunspace it looks like you are doing some great work over here. I haven't used this plugin before and I am unfamiliar with the nuances of shims but I am very interested in seeing this type of feature. How much work would this require and how can we support you in implementing this? I am using Serverless with a lot of Python right now but I want to start moving forward with Go in new Serverless implementations. I am not a good Go developer but if help is what you need and the scope isn't too large than perhaps I can provide some assistance.
@pyrabbit don't use the current shim approach. I'm about to upgrade it to the official go support.
I'd suggest you get familiar with the serverless go example: https://serverless.com/framework/docs/providers/aws/examples/hello-world/go/#hello-world-go-example and if you wish to contribute more than happy to look at PRs
@yunspace Thank you for your response! I meant to get back to you earlier but I have been quite busy with my Calculus 2 course and work. I think I might have stated my intent in a confusing manner. what I meant to ask was that if I were to help implement this type of feature, I wouldn't know where to pull the shim feature out [if that is your intent now that Go is supported natively]. So I would need some sort of guidance to know where to start.
I am actually using Go in some Lambda functions already using an almost identical process as seen in the link you provided.
I think it would be cool to see some sort of feature where we can run a Go server on our localhost for more rapid development. Something similar to https://serverless.com/blog/flask-python-rest-api-serverless-lambda-dynamodb/. In this Flask example they use a wildcard handler to handle incoming API Gateway requests. Do you think this is within the scope of the serverless-golang project?
@pyrabbit for local dev it would be better to use either
By leveraging latest lambda support we would bypass the need for python shim and significantly simplify the call stack and potentially shave off some latency
https://aws.amazon.com/about-aws/whats-new/2018/01/aws-lambda-supports-go/
However, there is a dependency on serverless.com support first