mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-28 19:13:31 +01:00
Store location information in peer event meta (#1994)
This commit is contained in:
parent
61034aaf4d
commit
91fa2e20a0
@ -216,7 +216,9 @@ func (p *Peer) FQDN(dnsDomain string) string {
|
|||||||
|
|
||||||
// EventMeta returns activity event meta related to the peer
|
// EventMeta returns activity event meta related to the peer
|
||||||
func (p *Peer) EventMeta(dnsDomain string) map[string]any {
|
func (p *Peer) EventMeta(dnsDomain string) map[string]any {
|
||||||
return map[string]any{"name": p.Name, "fqdn": p.FQDN(dnsDomain), "ip": p.IP, "created_at": p.CreatedAt}
|
return map[string]any{"name": p.Name, "fqdn": p.FQDN(dnsDomain), "ip": p.IP, "created_at": p.CreatedAt,
|
||||||
|
"location_city_name": p.Location.CityName, "location_country_code": p.Location.CountryCode,
|
||||||
|
"location_geo_name_id": p.Location.GeoNameID, "location_connection_ip": p.Location.ConnectionIP}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy PeerStatus
|
// Copy PeerStatus
|
||||||
|
Loading…
Reference in New Issue
Block a user