wireguard: implement Machine.SyncWireguardConfig()
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -16,6 +16,7 @@ var (
|
|||||||
|
|
||||||
_ WireguardConfigSyncer = (*Zones)(nil)
|
_ WireguardConfigSyncer = (*Zones)(nil)
|
||||||
_ WireguardConfigSyncer = (*Zone)(nil)
|
_ WireguardConfigSyncer = (*Zone)(nil)
|
||||||
|
_ WireguardConfigSyncer = (*Machine)(nil)
|
||||||
|
|
||||||
_ WireguardKeysWriter = (*Zones)(nil)
|
_ WireguardKeysWriter = (*Zones)(nil)
|
||||||
_ WireguardKeysWriter = (*Zone)(nil)
|
_ WireguardKeysWriter = (*Zone)(nil)
|
||||||
@@ -200,6 +201,12 @@ func syncWireguardConfig(z ZoneIterator, m MachineIterator, ring int) error {
|
|||||||
return err
|
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
|
// A WireguardKeysWriter writes the Wireguard Keys for all machines
|
||||||
// under its scope for the specified ring
|
// under its scope for the specified ring
|
||||||
type WireguardKeysWriter interface {
|
type WireguardKeysWriter interface {
|
||||||
|
|||||||
Reference in New Issue
Block a user