Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscriber ¶
type Subscriber struct { Username string Password string BaseURL string Channel string Metrics *statsd.Client }
Subscriber is a utility for receiving wireguard key events from a message-queue server
func (*Subscriber) Subscribe ¶
func (s *Subscriber) Subscribe(ctx context.Context, channel chan<- WireguardEvent) error
Subscribe establishes a websocket connection for a message-queue channel, and emits messages on the given channel
type WireguardEvent ¶
type WireguardEvent struct { Action string `json:"action"` Peer api.WireguardPeer `json:"peer"` }
WireguardEvent is a wireguard key event
Click to show internal directories.
Click to hide internal directories.