Add support for various cache backends in anticipation of the
merge with master that has an additional redis backend.
The current memory based cache backend is refactored to implement
the new interface.
Merge changes including version 1.11.0 of upstream.
Conflicts:
README.md
* Keep `birdwatcher` in the configuration path
VERSION
* Keep version to 1.12.3 from development at DE-CIX
bird/bird.go
* Keep the default order of arguments to birdc in RoutesFiltered() and RoutesNoExport()
birdwatcher.go
* Keep `gorilla/handlers` for HTTP logging
Changes since last version:
* Parser: Fix a bug when parsing 'BGP.*community' output spanning
multiple lines.
* Fix the default config path to /etc/birdwatcher/birdwatcher.conf
Changes since last version:
* Fix testcase for /protocols/bgp
* New birdc query 'RoutesFilteredCount()'
* Queue for birdc commands, prevents running the same birdc command
multiple times in parallel on concurrent API requests.
* Cache: redesign cache structure, separation of Parsed and Meta cache
* allows independent cache access
* implement convenience methods for interaction with the cache
* Change the callback type to update the cache for RunAndParse()
to be a pointer to the Parsed record, which allows updating the
Parsed record before it will be stored inside the cache
* Update all functions that use the meta cache to only create
their own records and also use GetCacheKey() to request the
meta cache from other functions.
* eliminates the need for Clear() -> removed
* Add two new birdc commands:
* PipeRoutesFiltered()
* PipeRoutesFilteredCount()
This allows to determine the key in the cache, where the result of
specific functions are stored, without requiring to know what command
was executed by that function.
Also updated all functions to use GetCacheKey() to store Parsed
records.
The query can be used to determine the exact number of filtered
(not exported) prefixes from a table towards a pipe protocol for
a certain neighbor (if multiple neighbors are connected to
the given table).
* seperate Parsed and Meta cache, so that they may be locked independently
* extend the RunAndParse() function to allow the caller to specify a
callback which will update the Meta cache
* change all methods interacting with the Meta cache to use the
callback for RunAndParse() to update the Meta cache
Changes since last version:
* Fix race condition between main() and InstallRateLimitReset()
* Fix endpoint /routes/count/table now returns integer instead of routes
* Fix endpoint /routes/count/protocol now returns integer instead of routes
* Fix endpoint /routes/prefixed ignores URL paremeter
* Fix endpoint /symbols
* Fix TestParseProtocolBgp()
* Fix some filtered routes missing in /routes/dump
* Fix parser return correct type on error
* New endpoint for total number of best-paths '/routes/count/primary'
* Parser: support extended communities and test-cases
* Introduce new data structure for extended communities replacing the Parsed type
* Cache: avoid duplicate cache writes in Status()
Changes since last version:
* Move code to Alice-LG GitHub organization
* Include caching information alongside ttl
* Repair endpoint 'protocols'
* Documentation on interpretation of route count numbers
* Improve example configuration
* Caching of parsed responses from birdc.
Eliminates an additional parser run for cache hits.
* Fix quotes in arguments of birdc commands in Routes{Table,Lookup}* methods.
This eliminates the "IP address expected" error in BIRD.