added cache ttl to config
This commit is contained in:
parent
7cd4603232
commit
a58b3128b3
@ -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
|
||||
|
@ -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"`
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user