Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit e5f43bb

Browse files
committed
rename routability -> reachability
1 parent 8157087 commit e5f43bb

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

event/reachability.go

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
}

event/routability.go

-13
This file was deleted.

network/network.go

+9-8
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,23 @@ const (
5353
CannotConnect
5454
)
5555

56-
// Routability indicates how reachable a node is.
57-
type Routability int
56+
// Reachability indicates how reachable a node is.
57+
type Reachability int
5858

5959
const (
60-
// RoutabilityUnknown indicates that the routability status is unknown.
61-
RoutabilityUnknown = iota
60+
// ReachabilityUnknown indicates that the reachability status of the
61+
// node is unknown.
62+
ReachabilityUnknown = iota
6263

63-
// RoutabilityPublic indicates that the node is reachable from the
64+
// ReachabilityPublic indicates that the node is reachable from the
6465
// public internet.
65-
RoutabilityPublic
66+
ReachabilityPublic
6667

67-
// RoutabilityPrivate indicates that the node is not reachable from the
68+
// ReachabilityPrivate indicates that the node is not reachable from the
6869
// public internet.
6970
//
7071
// NOTE: This node may _still_ be reachable via relays.
71-
RoutabilityPrivate
72+
ReachabilityPrivate
7273
)
7374

7475
// Stat stores metadata pertaining to a given Stream/Conn.

0 commit comments

Comments
 (0)