This repository was archived by the owner on Sep 6, 2022. It is now read-only.
File tree 3 files changed +32
-21
lines changed
3 files changed +32
-21
lines changed Original file line number Diff line number Diff line change
1
+ package event
2
+
3
+ import (
4
+ "github.com/libp2p/go-libp2p-core/network"
5
+ )
6
+
7
+ // EvtLocalReachabilityChanged is an event struct to be emitted when the local's
8
+ // node reachability changes state.
9
+ //
10
+ // This event is usually emitted by the AutoNAT subsystem.
11
+ type EvtLocalReachabilityChanged struct {
12
+ Reachability network.Reachability
13
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -53,6 +53,25 @@ const (
53
53
CannotConnect
54
54
)
55
55
56
+ // Reachability indicates how reachable a node is.
57
+ type Reachability int
58
+
59
+ const (
60
+ // ReachabilityUnknown indicates that the reachability status of the
61
+ // node is unknown.
62
+ ReachabilityUnknown = iota
63
+
64
+ // ReachabilityPublic indicates that the node is reachable from the
65
+ // public internet.
66
+ ReachabilityPublic
67
+
68
+ // ReachabilityPrivate indicates that the node is not reachable from the
69
+ // public internet.
70
+ //
71
+ // NOTE: This node may _still_ be reachable via relays.
72
+ ReachabilityPrivate
73
+ )
74
+
56
75
// Stat stores metadata pertaining to a given Stream/Conn.
57
76
type Stat struct {
58
77
Direction Direction
You can’t perform that action at this time.
0 commit comments