mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-19 23:11:29 +02:00
The conntype package held only ConnPriority and its constants and was imported solely by peer. Move it into the peer package as priority.go and drop the conntype. qualifier from conn.go, event.go and worker_ice.go.
30 lines
433 B
Go
30 lines
433 B
Go
package peer
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
const (
|
|
None ConnPriority = 0
|
|
Relay ConnPriority = 1
|
|
ICETurn ConnPriority = 2
|
|
ICEP2P ConnPriority = 3
|
|
)
|
|
|
|
type ConnPriority int
|
|
|
|
func (cp ConnPriority) String() string {
|
|
switch cp {
|
|
case None:
|
|
return "None"
|
|
case Relay:
|
|
return "PriorityRelay"
|
|
case ICETurn:
|
|
return "PriorityICETurn"
|
|
case ICEP2P:
|
|
return "PriorityICEP2P"
|
|
default:
|
|
return fmt.Sprintf("ConnPriority(%d)", cp)
|
|
}
|
|
}
|