added cache ttl to config

This commit is contained in:
Annika Hannig 2021-07-05 16:21:46 +02:00
parent 7cd4603232
commit a58b3128b3
No known key found for this signature in database
GPG Key ID: 62E226E47DDCE58D
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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"`
}