Vincent Bernat
217c484061
common/helpers: rename PrefixTo16 to PrefixTo6
...
Move it to common/helpers/ipv6.go and use it where needed.
2025-11-04 08:05:30 +01:00
Vincent Bernat
31b6591e0e
build: update revive
...
And remove some unused variables.
2025-09-09 07:39:00 +02:00
Vincent Bernat
e2f1df9add
tests: replace godebug by go-cmp for structure diffs
...
go-cmp is stricter and allow to catch more problems. Moreover, the
output is a bit nicer.
2025-08-23 16:03:09 +02:00
Vincent Bernat
6118bb7aac
common/helpers: convert SubnetMap to github.com/gaissmai/bart
...
I did not benchmark it myself, but it was benchmarked here:
https://github.com/osrg/gobgp/issues/1414#issuecomment-3067255941
Of course, no guarantee that this benchmark matches our use cases.
Moreover, SubnetMap have been optimized to avoid parsing keys all
the time.
Also, the interface is a bit nicer and it uses netip.Prefix directly.
The next step is to convert outlet/routing/provider/bmp.
2025-08-16 09:38:44 +02:00
Vincent Bernat
18beb310ee
chore: replace interface{} with any
2025-07-29 07:42:49 +02:00
Vincent Bernat
e08331a286
common/helpers: switch to a blessed fork of mapstructure
2025-02-15 14:51:17 +01:00
Vincent Bernat
de65ee6072
tests: introduce helpers.Pos/helpers.Mark
...
This helps locating the position of a test.
2024-07-01 07:42:36 +02:00
Itah
705e56cac4
inlet/metadata/static: allow exporters configuration refresh from http data source using common/remotedatasourcefetcher, refactored with orchestrator/clickhouse network-sources.
2024-01-17 11:11:34 +01:00
Vincent Bernat
895c34fa82
cmd: accept an !include tag for YAML files
2023-02-13 23:32:45 +01:00
Vincent Bernat
cdbae1c643
Revert "cmd: accept an !include tag for YAML files"
...
This reverts commit b8698bc060 . This
change is not complete, it is missing adaptations in docker-compose.yml.
2023-02-12 14:40:56 +01:00
Vincent Bernat
b8698bc060
cmd: accept an !include tag for YAML files
2023-01-29 14:48:57 +01:00
Vincent Bernat
9884844adf
cmd: switch to gopkg.in/yaml.v3 for YAML parsing
2023-01-29 13:09:22 +01:00
Vincent Bernat
6bfd3a0bd0
inlet/snmp: use netip.Addr internally instead of string
...
Also, make SubnetMap use `netip.Addr` as well.
2022-08-27 08:13:57 +02:00
Vincent Bernat
cd535c915d
common/helpers: make subnetmap work with struct as values
...
The way it was converted from a mapstruct made it not possible to have
struct as values. Fix that by checking if keys look like IP or not.
2022-08-14 00:54:55 +02:00
Vincent Bernat
f1585f3e6c
helpers/subnetmap: fix bug when using IPv6-mapped IPv4 addresses
...
Go will display them as IPv4. We want everything to be IPv6.
2022-07-31 22:45:19 +02:00
Vincent Bernat
c0d9d301b3
helpers/subnetmap: allow to use IP addresses
...
They will be considered as /32 or /128.
2022-07-31 22:39:14 +02:00
Vincent Bernat
5cdc567828
inlet/core: also accept a map from subnet for default-sampling-rate
...
This should be generalized to other parts of configuration (SNMP
community), however, we need to check what happens with default
values. Also, network definition in orchestrator is likely to be able
to reuse that.
2022-07-31 20:36:46 +02:00