{"id":28003160,"url":"https://github.com/fnproject/fn-ext-example","last_synced_at":"2026-01-12T02:52:37.636Z","repository":{"id":57516162,"uuid":"106340187","full_name":"fnproject/fn-ext-example","owner":"fnproject","description":"Example for adding third party plugins to fn project server.","archived":false,"fork":false,"pushed_at":"2019-01-16T08:07:57.000Z","size":10274,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T01:59:12.361Z","etag":null,"topics":[],"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/fnproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-09T22:06:15.000Z","updated_at":"2019-10-23T22:12:09.000Z","dependencies_parsed_at":"2022-08-28T16:50:40.282Z","dependency_job_id":null,"html_url":"https://github.com/fnproject/fn-ext-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnproject%2Ffn-ext-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnproject%2Ffn-ext-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnproject%2Ffn-ext-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnproject%2Ffn-ext-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnproject","download_url":"https://codeload.github.com/fnproject/fn-ext-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176436,"owners_count":21866142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-05-09T01:59:15.304Z","updated_at":"2025-10-16T11:36:39.286Z","avatar_url":"https://github.com/fnproject.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fn-plugin-example\n\nExample for adding third party plugins to fn project server.\n\nThis repo includes an example called `logspam`.\n\n## Method 1 - for end users / operators\n\nThis will build a custom Docker image for you with the extensions you provide in a yaml file built in.\n\n```yaml\nextensions:\n  - name: github.com/treeder/fn-ext-example/logspam\n  - name: github.com/treeder/fn-ext-example/logspam2\n```\n\nBuild it:\n\n```sh\nfn build-server -t imageuser/imagename\n```\n\nNow run your new server:\n\n```sh\ndocker run --rm --name fnserver -it -v $PWD/data:/app/data -p 8080:8080 imageuser/imagename\n```\n\nAnd deploy a function to try it out:\n\n```sh\nfn init --runtime go myfunc\ncd myfunc\nfn deploy --local --app myapp\nfn call myapp /myfunc\n```\n\n## Method 2 - for extension developers\n\nThis method is good for extension developers as it's fast builds for dev/testing.\n\nCopy [main.go](https://github.com/fnproject/fn/blob/master/cmd/fnserver/main.go) from `fn` repo, then add plugins. See [main.go](main.go) in this\nrepo for an example.\n\nThen assuming you have the fn project in your GOPATH or you've vendored it here, it should build:\n\n```sh\ngo build -o fnserver\n./fnserver\n```\n\nThen deploy a function and you'll see the special spam output like this:\n\n```txt\n\n        ______\n       / ____/___\n      / /_  / __ \\\n     / __/ / / / /\n    /_/   /_/ /_/\n        v0.3.528\n\nINFO[2018-08-08T13:46:13+03:00] Fn serving on `:8080`                         type=full\nYO! This is an annoying message that will happen every time a function is called.\nYO! And this is an annoying message that will happen AFTER every time a function is called.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnproject%2Ffn-ext-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnproject%2Ffn-ext-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnproject%2Ffn-ext-example/lists"}