{"id":37187477,"url":"https://github.com/pedronasser/functions","last_synced_at":"2026-01-14T21:47:37.332Z","repository":{"id":91179303,"uuid":"89240951","full_name":"pedronasser/functions","owner":"pedronasser","description":"A fork of Iron's Functions","archived":false,"fork":false,"pushed_at":"2017-04-26T16:05:11.000Z","size":6707,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T19:19:58.428Z","etag":null,"topics":["docker","faas","functions","lambda","platform","serverless"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedronasser.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-24T13:04:29.000Z","updated_at":"2018-08-21T09:39:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ca1b39f-19d4-4856-9541-0f0e3b40333b","html_url":"https://github.com/pedronasser/functions","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/pedronasser/functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronasser%2Ffunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronasser%2Ffunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronasser%2Ffunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronasser%2Ffunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedronasser","download_url":"https://codeload.github.com/pedronasser/functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronasser%2Ffunctions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","faas","functions","lambda","platform","serverless"],"created_at":"2026-01-14T21:47:36.534Z","updated_at":"2026-01-14T21:47:37.326Z","avatar_url":"https://github.com/pedronasser.png","language":"Go","readme":"![IronFunctions](docs/assets/logo-black-400w.png)\n\n[![CircleCI](https://circleci.com/gh/pedronasser/functions.svg?style=svg)](https://circleci.com/gh/pedronasser/functions)\n[![GoDoc](https://godoc.org/github.com/pedronasser/functions?status.svg)](https://godoc.org/github.com/pedronasser/functions)\n\nWelcome to IronFunctions! The open source serverless platform.\n\n## What is IronFunctions?\n\nIronFunctions is an open source serverless platform, or as we like to refer to it, Functions as a\nService (FaaS) platform that you can run anywhere.\n\n* Write once\n  * [Any language](docs/faq.md#which-languages-are-supported)\n  * [AWS Lambda format supported](docs/lambda/README.md)\n* [Run anywhere](docs/faq.md#where-can-i-run-ironfunctions)\n  * Public, private and hybrid cloud\n  * [Import functions directly from Lambda](docs/lambda/import.md) and run them wherever you want\n* Easy to use [for developers](docs/README.md#for-developers)\n* Easy to manage [for operators](docs/README.md#for-operators)\n* Written in [Go](https://golang.org)\n\n## What is Serverless/FaaS?\n\nServerless is a new paradigm in computing that enables simplicity, efficiency and scalability for both developers\nand operators. It's important to distinguish the two, because the benefits differ:\n\n### Benefits for developers\n\nThe main benefits that most people refer to are on the developer side and they include:\n\n* No servers to manage (serverless) -- you just upload your code and the platform deals with the infrastructure\n* Super simple coding -- no more monoliths! Just simple little bits of code\n* Pay by the milliseconds your code is executing -- unlike a typical application that runs 24/7, and you're paying\n  24/7, functions only run when needed\n\nSince you'll be running IronFunctions yourself, the paying part may not apply, but it does apply to\ncost savings on your infrastructure bills as you'll read below.\n\n### Benefits for operators\n\nIf you will be operating IronFunctions (the person who has to manage the servers behind the serverless),\nthen the benefits are different, but related.\n\n* Extremely efficient use of resources\n  * Unlike an app/API/microservice that consumes resources 24/7 whether they\n    are in use or not, functions are time sliced across your infrastructure and only consume resources while they are\n    actually doing something\n* Easy to manage and scale\n  * Single system for code written in any language or any technology\n  * Single system to monitor\n  * Scaling is the same for all functions, you don't scale each app independently\n  * Scaling is simply adding more IronFunctions nodes\n\nThere is a lot more reading you can do on the topic, just search for [\"what is serverless\"](https://www.google.com/webhp?sourceid=chrome-instant\u0026ion=1\u0026espv=2\u0026ie=UTF-8#q=what%20is%20serverless)\nand you'll find plenty of information. We have pretty thorough post on the Iron.io blog called\n[What is Serverless Computing and Why is it Important](https://www.iron.io/what-is-serverless-computing/).\n\n## Join Our Community\n\nJoin our Slack community to get help and give feedback.\n\n[![Slack Status](https://open-iron.herokuapp.com/badge.svg)](\nget.iron.io/open-slack)\n\n## Quickstart\n\nThis guide will get you up and running in a few minutes.\n\n### Prequisites\n\n* Docker 1.12 or later installed and running\n* Logged into Docker Hub (`docker login`)\n\n### Run IronFunctions\n\nTo get started quickly with IronFunctions, just fire up an `pedronasser/functions` container:\n\n```sh\ndocker run --rm -it --name functions -v ${PWD}/data:/app/data -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 pedronasser/functions\n```\n\n*where ${PWD}/data is the directory where the functions application data files will be stored*\n\nThis will start IronFunctions in single server mode, using an embedded database and message queue. You can find all the\nconfiguration options [here](docs/operating/options.md). If you are on Windows, check [here](docs/operating/windows.md).\n\n### CLI tool\n\nInstall the IronFunctions CLI tool:\n\n```sh\ncurl -LSs https://raw.githubusercontent.com/pedronasser/functions/master/fn/install.sh | sh\n```\n\nThis will download a shell script and execute it.  If the script asks for a password, that is because it invokes sudo.\n\n### Write a Function\n\nFunctions are small, bite sized bits of code that do one simple thing. Forget about monoliths when using functions,\njust focus on the task that you want the function to perform.\n\nThe following is a Go function that just returns \"Hello ${NAME}!\":\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n)\n\ntype Person struct {\n\tName string\n}\n\nfunc main() {\n\tp := \u0026Person{Name: \"World\"}\n\tjson.NewDecoder(os.Stdin).Decode(p)\n\tfmt.Printf(\"Hello %v!\", p.Name)\n}\n```\n\nCopy and paste the code above into a file called `func.go`, then run the following commands to build your function\nand deploy it.\n\n```sh\n# create func.yaml file, replace $USERNAME with your Docker Hub username.\nfn init $USERNAME/hello\n# build the function\nfn build\n# test it - you can pass data into it too by piping it in, eg: `cat hello.payload.json | fn run`\nfn run\n# Once it's ready, build and push it to Docker Hub\nfn build \u0026\u0026 fn push\n# create an app - you only do this once per app\nfn apps create myapp\n# create a route that maps /hello to your new function\nfn routes create myapp /hello\n```\n\nNow you can call your function:\n\n```sh\ncurl http://localhost:8080/r/myapp/hello\n```\n\nOr surf to it: http://localhost:8080/r/myapp/hello\n\nTo update your function:\n\n```sh\n# update a function with a new version and push it\nfn bump \u0026\u0026 fn build \u0026\u0026 fn push\n# then update the route\nfn routes update myapp /hello\n```\n\nSee below for more details. And you can find a bunch of examples in various languages in the [examples](examples/) directory. You can also\nwrite your functions in AWS's [Lambda format](docs/lambda/README.md).\n\n## Usage\n\nThis is a more detailed explanation of the main commands you'll use in IronFunctions as a developer.\n\n### Create an Application\n\nAn application is essentially a grouping of functions, that put together, form an API. Here's how to create an app.\n\n```sh\nfn apps create myapp\n```\n\nOr using a cURL:\n\n```sh\ncurl -H \"Content-Type: application/json\" -X POST -d '{\n    \"app\": { \"name\":\"myapp\" }\n}' http://localhost:8080/v1/apps\n```\n\n[More on apps](docs/apps.md).\n\nNow that we have an app, we can route endpoints to functions.\n\n### Add a Route\n\nA route is a way to define a path in your application that maps to a function. In this example, we'll map\n`/hello` to a simple `Hello World!` function called `iron/hello` which is a function we already made that you\ncan use -- yes, you can share functions! The source code for this function is in the [examples directory](examples/hello/go).\nYou can read more about [writing your own functions here](docs/writing.md).\n\n```sh\nfn routes create myapp /hello -i iron/hello\n```\n\nOr using cURL:\n\n```sh\ncurl -H \"Content-Type: application/json\" -X POST -d '{\n    \"route\": {\n        \"path\":\"/hello\",\n        \"image\":\"iron/hello\"\n    }\n}' http://localhost:8080/v1/apps/myapp/routes\n```\n\n[More on routes](docs/routes.md).\n\n### Calling your Function\n\nCalling your function is as simple as requesting a URL. Each app has its own namespace and each route mapped to the app.\nThe app `myapp` that we created above along with the `/hello` route we added would be called via the following\nURL: http://localhost:8080/r/myapp/hello\n\nEither surf to it in your browser or use `fn`:\n\n```sh\nfn call myapp /hello\n```\n\nOr using a cURL:\n\n```sh\ncurl http://localhost:8080/r/myapp/hello\n```\n\n### Passing data into a function\n\nYour function will get the body of the HTTP request via STDIN, and the headers of the request will be passed in\nas env vars. You can test a function with the CLI tool:\n\n```sh\necho '{\"name\":\"Johnny\"}' | fn call myapp /hello\n```\n\nOr using cURL:\n\n```sh\ncurl -H \"Content-Type: application/json\" -X POST -d '{\n    \"name\":\"Johnny\"\n}' http://localhost:8080/r/myapp/hello\n```\n\nYou should see it say `Hello Johnny!` now instead of `Hello World!`.\n\n### Add an asynchronous function\n\nIronFunctions supports synchronous function calls like we just tried above, and asynchronous for background processing.\n\nAsynchronous function calls are great for tasks that are CPU heavy or take more than a few seconds to complete.\nFor instance, image processing, video processing, data processing, ETL, etc.\nArchitecturally, the main difference between synchronous and asynchronous is that requests\nto asynchronous functions are put in a queue and executed on upon resource availability so that they do not interfere with the fast synchronous responses required for an API.\nAlso, since it uses a message queue, you can queue up millions of function calls without worrying about capacity as requests will\njust be queued up and run at some point in the future.\n\nTo add an asynchronous function, create another route with the `\"type\":\"async\"`, for example:\n\n```sh\ncurl -H \"Content-Type: application/json\" -X POST -d '{\n    \"route\": {\n        \"type\": \"async\",\n        \"path\":\"/hello-async\",\n        \"image\":\"iron/hello\"\n    }\n}' http://localhost:8080/v1/apps/myapp/routes\n```\n\nNow if you request this route:\n\n```sh\ncurl -H \"Content-Type: application/json\" -X POST -d '{\n    \"name\":\"Johnny\"\n}' http://localhost:8080/r/myapp/hello-async\n```\n\nYou will get a `call_id` in the response:\n\n```json\n{\"call_id\":\"572415fd-e26e-542b-846f-f1f5870034f2\"}\n```\n\nIf you watch the logs, you will see the function actually runs in the background:\n\n![async log](docs/assets/async-log.png)\n\nRead more on [logging](docs/logging.md).\n\n## Functions UI\n\n```sh\ndocker run --rm -it --link functions:api -p 4000:4000 -e \"API_URL=http://api:8080\" pedronasser/functions-ui\n```\n\nFor more information, see: https://github.com/pedronasser/functions-ui\n\n## Writing Functions\n\nSee [Writing Functions](docs/writing.md).\n\nAnd you can find a bunch of examples in the [/examples](/examples) directory.\n\n## More Documentation\n\nSee [docs/](docs/README.md) for full documentation.\n\n## Roadmap\n\nThese are the high level roadmap goals. See [milestones](https://github.com/pedronasser/functions/milestones) for detailed issues.\n\n* ~~Alpha 1 - November 2016~~\n  * Initial release of base framework\n  * Lambda support\n* ~~Alpha 2 - December 2016~~\n  * Streaming input for hot functions #214\n  * Logging endpoint(s) for per function debugging #263\n* Beta 1 - January 2017\n  * Smart Load Balancer #151\n* Beta 2 - February 2017\n  * Cron like scheduler #100\n* GA - March 2017\n\n## Support\n\nYou can get community support via:\n\n* [Stack Overflow](http://stackoverflow.com/questions/tagged/ironfunctions)\n* [Slack](http://get.iron.io/open-slack)\n\nYou can get commercial support by contacting [Iron.io](https://iron.io/contact)\n\n## Want to contribute to IronFunctions?\n\nSee [contributing](CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedronasser%2Ffunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedronasser%2Ffunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedronasser%2Ffunctions/lists"}