diff --git a/etc/alice-lg/alice.example.conf b/etc/alice-lg/alice.example.conf index 4636a9a..89e7817 100644 --- a/etc/alice-lg/alice.example.conf +++ b/etc/alice-lg/alice.example.conf @@ -196,3 +196,15 @@ servertime_ext = Mon, 02 Jan 2006 15:04:05 -0700 # Default: 300 # processing_timeout = 300 +# [source.rs0-example] +# name = rs-example.openbgpd-state-server +# [source.rs0-example.openbgpd-state-server] +# api = http://165.22.27.105:29111/api + +# Cache results from openbgpd for n seconds, 0 disables the cache. +# cache_ttl = 30 + +# [source.rs0-example-bgplgd] +# name = rs-example.bgplgd +# [source.rs0-example-bgplgd.openbgpd-bgplgd] +# api = http://165.22.27.105:29111/api diff --git a/pkg/sources/openbgpd/config.go b/pkg/sources/openbgpd/config.go index af700dd..877e358 100644 --- a/pkg/sources/openbgpd/config.go +++ b/pkg/sources/openbgpd/config.go @@ -3,6 +3,7 @@ package openbgpd import ( "fmt" "strings" + "time" ) // Config is a OpenBGPD source config @@ -10,6 +11,8 @@ type Config struct { ID string Name string + CacheTTL time.Duration + API string `ini:"api"` }