mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-03-13 11:00:10 +08:00
rename routability -> reachability
This commit is contained in:
parent
8157087fc9
commit
e5f43bb541
13
event/reachability.go
Normal file
13
event/reachability.go
Normal file
@ -0,0 +1,13 @@
|
||||
package event
|
||||
|
||||
import (
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
)
|
||||
|
||||
// EvtLocalReachabilityChanged is an event struct to be emitted when the local's
|
||||
// node reachability changes state.
|
||||
//
|
||||
// This event is usually emitted by the AutoNAT subsystem.
|
||||
type EvtLocalReachabilityChanged struct {
|
||||
Reachability network.Reachability
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package event
|
||||
|
||||
import (
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
)
|
||||
|
||||
// EvtLocalRoutability is an event struct to be emitted with the local's node
|
||||
// routability changes state.
|
||||
//
|
||||
// This event is usually emitted by the AutoNAT subsystem.
|
||||
type EvtLocalRoutability struct {
|
||||
Routability network.Routability
|
||||
}
|
@ -53,22 +53,23 @@ const (
|
||||
CannotConnect
|
||||
)
|
||||
|
||||
// Routability indicates how reachable a node is.
|
||||
type Routability int
|
||||
// Reachability indicates how reachable a node is.
|
||||
type Reachability int
|
||||
|
||||
const (
|
||||
// RoutabilityUnknown indicates that the routability status is unknown.
|
||||
RoutabilityUnknown = iota
|
||||
// ReachabilityUnknown indicates that the reachability status of the
|
||||
// node is unknown.
|
||||
ReachabilityUnknown = iota
|
||||
|
||||
// RoutabilityPublic indicates that the node is reachable from the
|
||||
// ReachabilityPublic indicates that the node is reachable from the
|
||||
// public internet.
|
||||
RoutabilityPublic
|
||||
ReachabilityPublic
|
||||
|
||||
// RoutabilityPrivate indicates that the node is not reachable from the
|
||||
// ReachabilityPrivate indicates that the node is not reachable from the
|
||||
// public internet.
|
||||
//
|
||||
// NOTE: This node may _still_ be reachable via relays.
|
||||
RoutabilityPrivate
|
||||
ReachabilityPrivate
|
||||
)
|
||||
|
||||
// Stat stores metadata pertaining to a given Stream/Conn.
|
||||
|
Loading…
Reference in New Issue
Block a user