mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
5ad89ff02f
Signed-off-by: Johan Siebens <johan.siebens@gmail.com>
27 lines
396 B
Go
27 lines
396 B
Go
package broker
|
|
|
|
import (
|
|
"github.com/jsiebens/ionscale/internal/bind"
|
|
"tailscale.com/tailcfg"
|
|
)
|
|
|
|
func NewClient(id uint64, channel chan *Signal) Client {
|
|
return Client{
|
|
id: id,
|
|
channel: channel,
|
|
}
|
|
}
|
|
|
|
type Client struct {
|
|
id uint64
|
|
binder bind.Binder
|
|
node *tailcfg.Node
|
|
|
|
compress string
|
|
channel chan *Signal
|
|
}
|
|
|
|
func (c *Client) SignalUpdate(s *Signal) {
|
|
c.channel <- s
|
|
}
|