yggdrasil-go/src/yggdrasil/adapter.go

19 lines
493 B
Go
Raw Normal View History

2018-12-14 18:29:00 +00:00
package yggdrasil
// Defines the minimum required struct members for an adapter type (this is
// now the base type for tunAdapter in tun.go)
type Adapter struct {
2019-01-14 14:25:52 +00:00
core *Core
send chan<- []byte
recv <-chan []byte
reconfigure chan chan error
2018-12-14 18:29:00 +00:00
}
// Initialises the adapter.
func (adapter *Adapter) init(core *Core, send chan<- []byte, recv <-chan []byte) {
adapter.core = core
adapter.send = send
adapter.recv = recv
2019-01-14 14:25:52 +00:00
adapter.reconfigure = make(chan chan error, 1)
2018-12-14 18:29:00 +00:00
}