This repository is a just a showcase of different languages calling and being a Digital Ocean function.
Language | Subject | Link |
---|---|---|
Go | CLI Using Functions | https://github.com/j4ng5y/digitalocean-functions-challenge/blob/main/go/main.go |
doctl sls deploy .
Output from deploy will look like this:
Deploying '/path/to/main/digitalocean-functions-challenge'
to namespace 'fn-...'
on host 'https://example.doserverless.co'
Submitted action 'go' for remote building and deployment in runtime go:default (id: some-id)
Processing of 'go' is still running remotely ...
Deployment status recorded
Deployed functions ('doctl sls fn get <funcName> --url' for URL):
- challenge/go
And to run the Function we can use doctl serverlesss function invoke
or the shorter form shown below.
doctl sls fn invoke challenge/go -p sammyname:yay -p sammytype:robot