Add inline rule-set & Add reload for local rule-set

This commit is contained in:
世界
2024-06-26 00:43:51 +08:00
parent b00570fc58
commit dd0c1a8a17
14 changed files with 309 additions and 278 deletions

View File

@@ -20,8 +20,8 @@ import (
func NewRuleSet(ctx context.Context, router adapter.Router, logger logger.ContextLogger, options option.RuleSet) (adapter.RuleSet, error) {
switch options.Type {
case C.RuleSetTypeLocal:
return NewLocalRuleSet(router, options)
case C.RuleSetTypeInline, C.RuleSetTypeLocal, "":
return NewLocalRuleSet(router, logger, options)
case C.RuleSetTypeRemote:
return NewRemoteRuleSet(ctx, router, logger, options), nil
default: