Browse Source

wireguard: implement Machine.SyncWireguardConfig()

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/1/head
Alejandro Mery 10 months ago
parent
commit
b4f1d2e4d9
  1. 7
      pkg/zones/wireguard.go

7
pkg/zones/wireguard.go

@ -16,6 +16,7 @@ var (
_ WireguardConfigSyncer = (*Zones)(nil)
_ WireguardConfigSyncer = (*Zone)(nil)
_ WireguardConfigSyncer = (*Machine)(nil)
_ WireguardKeysWriter = (*Zones)(nil)
_ WireguardKeysWriter = (*Zone)(nil)
@ -200,6 +201,12 @@ func syncWireguardConfig(z ZoneIterator, m MachineIterator, ring int) error {
return err
}
// SyncWireguardConfig updates all wgN.conf files for the specified
// ring
func (m *Machine) SyncWireguardConfig(ring int) error {
return m.zone.SyncWireguardConfig(ring)
}
// A WireguardKeysWriter writes the Wireguard Keys for all machines
// under its scope for the specified ring
type WireguardKeysWriter interface {

Loading…
Cancel
Save