Documentation ¶
Index ¶
- type Notifier
- func (n *Notifier) AddNode(machineKey key.MachinePublic, c chan<- types.StateUpdate)
- func (n *Notifier) ConnectedMap() map[key.MachinePublic]bool
- func (n *Notifier) IsConnected(machineKey key.MachinePublic) bool
- func (n *Notifier) NotifyAll(ctx context.Context, update types.StateUpdate)
- func (n *Notifier) NotifyByMachineKey(ctx context.Context, update types.StateUpdate, mKey key.MachinePublic)
- func (n *Notifier) NotifyWithIgnore(ctx context.Context, update types.StateUpdate, ignore ...string)
- func (n *Notifier) RemoveNode(machineKey key.MachinePublic)
- func (n *Notifier) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
func NewNotifier() *Notifier
func (*Notifier) AddNode ¶
func (n *Notifier) AddNode(machineKey key.MachinePublic, c chan<- types.StateUpdate)
func (*Notifier) ConnectedMap ¶
func (n *Notifier) ConnectedMap() map[key.MachinePublic]bool
TODO(kradalby): This returns a pointer and can be dangerous.
func (*Notifier) IsConnected ¶
func (n *Notifier) IsConnected(machineKey key.MachinePublic) bool
IsConnected reports if a node is connected to headscale and has a poll session open.
func (*Notifier) NotifyAll ¶
func (n *Notifier) NotifyAll(ctx context.Context, update types.StateUpdate)
func (*Notifier) NotifyByMachineKey ¶
func (n *Notifier) NotifyByMachineKey( ctx context.Context, update types.StateUpdate, mKey key.MachinePublic, )
func (*Notifier) NotifyWithIgnore ¶
func (*Notifier) RemoveNode ¶
func (n *Notifier) RemoveNode(machineKey key.MachinePublic)
Click to show internal directories.
Click to hide internal directories.