wireguard: implement Machine.SyncWireguardConfig()

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-08-26 18:31:56 +00:00
parent acf9e0e81d
commit b4f1d2e4d9
+7
View File
@@ -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 {