mirror of
https://github.com/netbirdio/netbird.git
synced 2025-07-21 16:28:16 +02:00
23 lines
308 B
Go
23 lines
308 B
Go
package ice
|
|
|
|
import (
|
|
"sync/atomic"
|
|
|
|
"github.com/pion/stun/v2"
|
|
)
|
|
|
|
type StunTurn atomic.Value
|
|
|
|
func (s *StunTurn) Load() []*stun.URI {
|
|
v := (*atomic.Value)(s).Load()
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
|
|
return v.([]*stun.URI)
|
|
}
|
|
|
|
func (s *StunTurn) Store(value []*stun.URI) {
|
|
(*atomic.Value)(s).Store(value)
|
|
}
|