Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMissingIPs = errors.New("no IPs provided")
)
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter provides an IP service
func NewAdapter ¶
func NewAdapter( signaler string, key string, ice []string, config *AdapterConfig, ctx context.Context, ) *Adapter
NewAdapter creates the adapter
type AdapterConfig ¶
type AdapterConfig struct { *wrtcconn.NamedAdapterConfig Device string // Name to give to the TUN device OnSignalerConnect func(string) // Handler to be called when the adapter has connected to the signaler OnPeerConnect func(string) // Handler to be called when the adapter has connected to a peer OnPeerDisconnected func(string) // Handler to be called when the adapter has received a message CIDRs []string // IPv4 & IPv6 networks to join MaxRetries int // Maximum amount of IP address to try and claim before giving up Parallel int // Maximum amount of goroutines to use to unmarshal IP packets Static bool // Claim the exact IP specified in the CIDR notation instead of selecting a random one from the networks }
AdapterConfig configures the adapter
Click to show internal directories.
Click to hide internal directories.