Make history module optional

This commit is contained in:
Patrick Pacher
2023-06-14 10:22:32 +02:00
committed by Daniel
parent 135b68c008
commit cf2b8f26b9
5 changed files with 50 additions and 4 deletions

View File

@@ -49,6 +49,7 @@ type LayeredProfile struct {
DomainHeuristics config.BoolOption `json:"-"`
UseSPN config.BoolOption `json:"-"`
SPNRoutingAlgorithm config.StringOption `json:"-"`
HistoryEnabled config.BoolOption `json:"-"`
}
// NewLayeredProfile returns a new layered profile based on the given local profile.
@@ -120,6 +121,10 @@ func NewLayeredProfile(localProfile *Profile) *LayeredProfile {
CfgOptionRoutingAlgorithmKey,
cfgOptionRoutingAlgorithm,
)
lp.HistoryEnabled = lp.wrapBoolOption(
CfgOptionEnableHistoryKey,
cfgOptionEnableHistory,
)
lp.LayerIDs = append(lp.LayerIDs, localProfile.ScopedID())
lp.layers = append(lp.layers, localProfile)