mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Use Config Manager
This commit is contained in:
parent
081aeec142
commit
70d69f04cf
11 changed files with 55 additions and 104 deletions
|
@ -12,6 +12,6 @@ type GetDestinationNATRulesResult struct {
|
|||
|
||||
func (f *Firewall) GetDestinationNATRules(ctx context.Context, params struct{}) (GetDestinationNATRulesResult, error) {
|
||||
return GetDestinationNATRulesResult{
|
||||
DestinationNATRules: f.Conf.Firewall.DestinationNATRules,
|
||||
DestinationNATRules: f.ConfigManager.GetPendingConfig().Firewall.DestinationNATRules,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package firewall
|
||||
|
||||
import (
|
||||
"nfsense.net/nfsense/internal/definitions"
|
||||
"nfsense.net/nfsense/internal/config"
|
||||
)
|
||||
|
||||
type Firewall struct {
|
||||
Conf *definitions.Config
|
||||
ConfigManager *config.ConfigManager
|
||||
}
|
||||
|
|
|
@ -12,6 +12,6 @@ type GetForwardRulesResult struct {
|
|||
|
||||
func (f *Firewall) GetForwardRules(ctx context.Context, params struct{}) (GetForwardRulesResult, error) {
|
||||
return GetForwardRulesResult{
|
||||
ForwardRules: f.Conf.Firewall.ForwardRules,
|
||||
ForwardRules: f.ConfigManager.GetPendingConfig().Firewall.ForwardRules,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -12,6 +12,6 @@ type GetSourceNATRulesResult struct {
|
|||
|
||||
func (f *Firewall) GetSourceNATRules(ctx context.Context, params struct{}) (GetSourceNATRulesResult, error) {
|
||||
return GetSourceNATRulesResult{
|
||||
SourceNATRules: f.Conf.Firewall.SourceNATRules,
|
||||
SourceNATRules: f.ConfigManager.GetPendingConfig().Firewall.SourceNATRules,
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue