gcf.cr
gcf.cr copied to clipboard
RFC: gcloud attribute API
Right now it is necessary to use the command line parameters and/or information obtained directly from gcloud
to determine the function memory, trigger type, function name, gcp project ID, etc. Now that we have a crystal-based API, we could better specify this information directly within the cloud function source code. I'm thinking something like this:
require "gcf"
class MyFunction < GCF::CloudFunction
function_memory "256 MB"
project_id "some_project"
trigger_type :http
def run(params : JSON::Any)
# your function code here
end
end
etc.
Thoughts?