-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Run with Docker | ||
|
||
There's an official Feedbridge image located on https://hub.docker.com/r/tehwey/feedbridge/. To | ||
run the latest version just make use of the included `docker-compose` file. | ||
|
||
``` | ||
docker-compose -f docker-compose.yml up -d | ||
``` | ||
|
||
After that it'll run on Port 8080 and listening on localhost. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Prometheus Metrics | ||
|
||
Feedbridge per default exposes a Prometheus Metrics endpoint on `/metrics`. You | ||
can use Prometheus, Grafana and the included Grafana dashboard to monitor your instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Adding a new plugin | ||
|
||
The best starting point to get into plugin development is to look at the existing plugins | ||
located in `plugins/`. The main idea is that a plugin gets a *http.Client to do requests | ||
and returns a *feeds.Feed object that will then be stored by the system. | ||
|
||
Every plugin has to implement this interface: | ||
|
||
``` | ||
type Plugin interface { | ||
Run() (*feeds.Feed, error) | ||
Info() PluginMetadata | ||
} | ||
``` | ||
|
||
What you do within `Run()` is pretty flexible. You either talk to an API, Marshall JSON or you | ||
do webscraping with `goquery`. For that usecase there are already some convinience wrappers | ||
available, located in the `scrape` package. If sensible feel free to add new helper functions | ||
there if they are re-usable. | ||
|
||
# Installing the plugin | ||
|
||
To install a plugin it has to be added to the global plugin repository, once this is done the | ||
plugin will run periodically as defined by the interval that is set for the instance. | ||
|
||
``` | ||
pluginRepo.Install(scmp.NewPlugin(l, c)) | ||
``` | ||
|
||
# Open a Pull Request | ||
|
||
If you think your plugin could be useful to more people please open a Pull Request on Github: | ||
|
||
https://github.com/dewey/feedbridge/pulls | ||
|
||
I'll review, merge and release a new version so other people can use it on the hosted version. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters