add documentation + rename database from yanic to respondd

This commit is contained in:
Martin Geno 2018-01-21 21:06:04 +01:00 committed by Martin/Geno
parent 22797a36d1
commit 16d1251739
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
5 changed files with 51 additions and 4 deletions

View File

@ -163,6 +163,16 @@ address = "localhost:2003"
# probably wont care much about "polluting" the namespace.
prefix = "freifunk"
# respondd (yanic)
# forward collected respondd package to a address
# (e.g. to another respondd collector like a central yanic instance or hopglass)
[[database.connection.respondd]]
enable = false
# type of network to create a connection
type = "udp6"
# destination address to connect/send respondd package
address = "stats.bremen.freifunk.net:11001"
# Logging
[[database.connection.logging]]
enable = false

View File

@ -4,4 +4,5 @@ import (
_ "github.com/FreifunkBremen/yanic/database/graphite"
_ "github.com/FreifunkBremen/yanic/database/influxdb"
_ "github.com/FreifunkBremen/yanic/database/logging"
_ "github.com/FreifunkBremen/yanic/database/respondd"
)

View File

@ -1,4 +1,4 @@
package yanic
package respondd
/**
* This database type is for injecting into another yanic instance.
@ -33,7 +33,7 @@ func (c Config) Address() string {
}
func init() {
database.RegisterAdapter("yanic", Connect)
database.RegisterAdapter("respondd", Connect)
}
func Connect(configuration map[string]interface{}) (database.Connection, error) {

View File

@ -1,4 +1,4 @@
package yanic
package respondd
import (
"testing"

View File

@ -579,13 +579,49 @@ prefix = "freifunk"
## [[database.connection.respondd]]
{% method %}
Forward collected respondd package to a address
(e.g. to another respondd collector like a central yanic instance or hopglass)
{% sample lang="toml" %}
```toml
enable = false
type = "udp6"
address = "stats.bremen.freifunk.net:11001"
```
{% endmethod %}
### type
{% method %}
Type of network to create a connection.
Known networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only), "udp", "udp4" (IPv4-only), "udp6" (IPv6-only), "ip", "ip4" (IPv4-only), "ip6" (IPv6-only), "unix", "unixgram" and "unixpacket".
{% sample lang="toml" %}
```toml
type = "udp6"
```
{% endmethod %}
### address
{% method %}
Destination address to connect/send respondd package.
{% sample lang="toml" %}
```toml
address = "stats.bremen.freifunk.net:11001"
```
{% endmethod %}
## [[database.connection.logging]]
{% method %}
This database type is just for, debugging without a real database connection.
A example for other developers for new database types.
{% sample lang="toml" %}
```toml
enable = false
enable = false
path = "/var/log/yanic.log"
```
{% endmethod %}