notifier

package
v0.23.0-alpha4-docker-... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

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 (n *Notifier) NotifyWithIgnore(
	ctx context.Context,
	update types.StateUpdate,
	ignore ...string,
)

func (*Notifier) RemoveNode

func (n *Notifier) RemoveNode(machineKey key.MachinePublic)

func (*Notifier) String

func (n *Notifier) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL