feat: not inline rule-provider can also set payload as fallback rules when file/http parsing fails

This commit is contained in:
wwqgtxx
2025-04-30 14:09:15 +08:00
parent 61d6a9abd6
commit 5c40a6340c
2 changed files with 5 additions and 2 deletions

View File

@@ -63,5 +63,5 @@ func ParseRuleProvider(name string, mapping map[string]any, parse common.ParseRu
return nil, fmt.Errorf("unsupported vehicle type: %s", schema.Type)
}
return NewRuleSetProvider(name, behavior, format, time.Duration(uint(schema.Interval))*time.Second, vehicle, parse), nil
return NewRuleSetProvider(name, behavior, format, time.Duration(uint(schema.Interval))*time.Second, vehicle, schema.Payload, parse), nil
}