mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fixes to recent extension changes. (#568)
* Fixes to recent extension changes. * Fixes issue where gin will continue calling the handler even if next() isn't called. * Updated docs.
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
If you are a developer using Fn through the API, this section is for you.
|
||||
|
||||
### Getting Started
|
||||
* [Quickstart](https://github.com/fnproject/fn)
|
||||
|
||||
* [Quickstart](https://github.com/fnproject/fn#quickstart)
|
||||
* [API Reference](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/fnproject/fn/master/docs/swagger.yml)
|
||||
* [FAQ](faq.md)
|
||||
* [Object Model](developers/model.md)
|
||||
@@ -17,17 +18,25 @@ If you are a developer using Fn through the API, this section is for you.
|
||||
* [Writing functions](writing.md)
|
||||
|
||||
### Advanced
|
||||
|
||||
* [Open Function Format](function-format.md)
|
||||
* [Packaging functions](packaging.md)
|
||||
* [CLI Source](https://github.com/fnproject/cli/)
|
||||
* [Async functions](async.md)
|
||||
* [Organizing functions into an application](developers/apps.md)
|
||||
|
||||
### Learn More
|
||||
|
||||
* [Examples](../examples)
|
||||
* [Getting Started Series](../examples/tutorial)
|
||||
* [Tutorials](https://github.com/fnproject/tutorials)
|
||||
|
||||
## For Operators
|
||||
|
||||
If you are operating Fn, this section is for you.
|
||||
|
||||
### Getting Started
|
||||
|
||||
* [Running in Production](operating/production.md)
|
||||
* [Logging](operating/logging.md)
|
||||
* [Message Queues](operating/mqs/README.md)
|
||||
@@ -37,18 +46,15 @@ If you are operating Fn, this section is for you.
|
||||
* [User Interface](operating/ui.md)
|
||||
|
||||
### Advanced
|
||||
|
||||
* [Extending Fn](operating/extending.md)
|
||||
* [Running Fn on Kubernetes](operating/kubernetes/README.md)
|
||||
* [Setting up development environment with Docker compose](./operating/compose.md)
|
||||
* [OpenStack Triggers](operating/triggers.md)
|
||||
* [Docker Configuration](operating/docker.md)
|
||||
|
||||
## For Contributors
|
||||
|
||||
If you are working on the Fn Project, want to work on it or are creating extensions, this section is for you.
|
||||
|
||||
## Learn More
|
||||
|
||||
* [Examples](../examples)
|
||||
* [Getting Started Series](../examples/tutorial)
|
||||
* [Tutorials](https://github.com/fnproject/tutorials)
|
||||
|
||||
|
||||
* [Writing Extensions](contributors/extensions.md)
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Docs for Contributors
|
||||
|
||||
* [Writing Extensions](extending.md)
|
||||
@@ -20,17 +20,19 @@ to be called during setup:
|
||||
```go
|
||||
func init() {
|
||||
server.RegisterExtension(&fnext.Extension{
|
||||
Name: "logspam",
|
||||
Name: "github.com/treeder/fn-ext-example/logspam", // Should be the import name
|
||||
Setup: setup, // Fn will call this during startup
|
||||
})
|
||||
}
|
||||
|
||||
func setup(s *fnext.ExtServer) error {
|
||||
// Add all the hooks you extension needs here
|
||||
// Add all the hooks your extension needs here
|
||||
s.AddCallListener(&LogSpam{})
|
||||
}
|
||||
```
|
||||
|
||||
See https://github.com/treeder/fn-ext-example for full example.
|
||||
|
||||
## Listeners
|
||||
|
||||
Listeners are the main way to extend Fn.
|
||||
|
||||
Reference in New Issue
Block a user