@@ -77,6 +77,7 @@ type PeerAction struct {
Peers []wgtypes.PeerConfig `json:"peers"`
}
+// FwUpdate - struct for firewall updates
type FwUpdate struct {
IsIngressGw bool `json:"is_ingress_gw"`
IsEgressGw bool `json:"is_egress_gw"`
@@ -585,6 +585,7 @@ func PublishHostDNSUpdate(old, new *models.Host, networks []string) error {
return nil
+// PublishFwUpdate - publishes fw update to host
func PublishFwUpdate(gwHost *models.Host, f *models.FwUpdate) error {
data, err := json.Marshal(f)
if err != nil {