diff --git a/core/src/main/java/com/spotify/ffwd/AgentCore.java b/core/src/main/java/com/spotify/ffwd/AgentCore.java index f2a4f944..4dccc754 100644 --- a/core/src/main/java/com/spotify/ffwd/AgentCore.java +++ b/core/src/main/java/com/spotify/ffwd/AgentCore.java @@ -378,10 +378,11 @@ protected void configure() { /** * Reads the configuration of the agent from multiple possible sources. In order of precedence, * the following sources are loaded: - * - System properties - * - Environment variables - * - YAML file in specified location - * - YAML file bundled with JAR + *

+ * - System properties

+ * - Environment variables

+ * - YAML file in specified location

+ * - YAML file bundled with JAR

* * Values are merged, those higher on this list override those that are lower. * diff --git a/docs/content/_docs/components.md b/docs/content/_docs/components.md index db844cdc..31302d6f 100644 --- a/docs/content/_docs/components.md +++ b/docs/content/_docs/components.md @@ -6,42 +6,41 @@ title: Components This document covers some of the major components in FastForward. -#### Module +![Overview of main FFWD components](./images/ffwd-components.svg "Overview of main FFWD components") -A module is a loadable component that extends the functionality of FastForward. -When a module is loaded it typically registers a set of plugins. +## Module -#### Plugin +A [module](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/module/FastForwardModule.java) is a dynamically loaded component that extends the functionality of FastForward. +When a module is [loaded](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/core/src/main/java/com/spotify/ffwd/AgentCore.java#L400) it typically [registers a plugin](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/modules/pubsub/src/main/java/com/spotify/ffwd/pubsub/PubsubOutputModule.java#L36). -Either an input or an output plugin. +## Plugin -This provides the implementation to read or send data from the agent. -A plugin can have multiple _instances_ with different configurations (like -which port to listen to). +Either an [input](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/input/PluginSource.java) or an [output](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/output/PluginSink.java) plugin. -#### Early Injector +This provides an implementation which either ingests or emits data from the agent. -The early injector is setup by AgentCore and is intended to provide the basic -facilities to perform module setup. +A plugin can have multiple _instances_ with different configurations (like which port to listen to). + +## Early Injector + +The [early injector](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/core/src/main/java/com/spotify/ffwd/AgentCore.java#L212) is setup by AgentCore and is intended to provide the basic facilities to perform module setup. The following is a list of components that are given access to and their purpose. -* _com.spotify.ffwd.module.PluginContext_ +* [_com.spotify.ffwd.module.PluginContext_](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/module/PluginContext.java) Register input and output plugins. * _com.fasterxml.jackson.databind.ObjectMapper (config)_ ObjectMapper used to parse provided configuration file. -#### Primary Injector +## Primary Injector -The primary injector contains the dependencies which are available after -modules have been registered and the initial bootstrap is done. +The [primary injector](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/core/src/main/java/com/spotify/ffwd/AgentCore.java#L100) contains the dependencies which are available after modules have been registered and the initial bootstrap is done. It contains all the components of the early injector, with the following additions. -* _eu.toolchain.async.AsyncFramework_ - Framework implementation to use for - async operations. +* _eu.toolchain.async.AsyncFramework_ - Framework implementation to use for async operations. * _io.netty.channel.EventLoopGroup (boss)_ Event loop group used for boss threads in ServerBootstrap's. * _io.netty.channel.EventLoopGroup (worker)_ Event loop group used for diff --git a/docs/content/_docs/images/ffwd-components.svg b/docs/content/_docs/images/ffwd-components.svg new file mode 100644 index 00000000..442383d8 --- /dev/null +++ b/docs/content/_docs/images/ffwd-components.svg @@ -0,0 +1 @@ + \ No newline at end of file