You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/net/portmapper
M. J. Fromberger 2731171c5e net/portmapper: fire an event when a port mapping is updated (#15371)
When an event bus is configured publish an event each time a new port mapping
is updated. Publication is unconditional and occurs prior to calling any
callback that is registered. For now, the callback is still fired in a separate
goroutine as before -- later, those callbacks should become subscriptions to
the published event.

For now, the event type is defined as a new type here in the package. We will
want to move it to a more central package when there are subscribers. The event
wrapper is effectively a subset of the data exported by the internal mapping
interface, but on a concrete struct so the bus plumbing can inspect it.

Updates #15160

Change-Id: I951f212429ac791223af8d75b6eb39a0d2a0053a
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
8 months ago
..
disabled_stubs.go net/portmapper: handle multiple UPnP discovery responses 2 years ago
igd_test.go net/portmapper: fire an event when a port mapping is updated (#15371) 8 months ago
legacy_upnp.go net/portmapper: support legacy "urn:dslforum-org" portmapping services 2 years ago
pcp.go net/portmapper: check returned epoch from PMP and PCP protocols 2 years ago
pcp_test.go all: update copyright and license headers 3 years ago
pcpresultcode_string.go all: update copyright and license headers 3 years ago
pmpresultcode_string.go all: update copyright and license headers 3 years ago
portmapper.go net/portmapper: fire an event when a port mapping is updated (#15371) 8 months ago
portmapper_test.go net/portmapper: fire an event when a port mapping is updated (#15371) 8 months ago
select_test.go net/portmapper: fire an event when a port mapping is updated (#15371) 8 months ago
upnp.go net/portmapper: retry UPnP when we get an "Invalid Args" 9 months ago
upnp_test.go net/portmapper: fire an event when a port mapping is updated (#15371) 8 months ago