ceremonyclient/go-libp2p/p2p/metricshelper/dir.go

15 lines
264 B
Go
Raw Permalink Normal View History

2023-08-21 03:50:38 +00:00
package metricshelper
import "github.com/libp2p/go-libp2p/core/network"
func GetDirection(dir network.Direction) string {
switch dir {
case network.DirOutbound:
return "outbound"
case network.DirInbound:
return "inbound"
default:
return "unknown"
}
}