func KafkaRuleParser(rule *cilium.PortNetworkPolicyRule) []L7NetworkPolicyRule {
	l7Rules := rule.GetKafkaRules()
	if l7Rules == nil {
		return nil
	}

	allowRules := l7Rules.GetKafkaRules()
	rules := make([]L7NetworkPolicyRule, 0, len(allowRules))
	for _, r := range allowRules {
		rules = append(rules, kafka.NewRule(r.ApiVersion, r.ApiKeys, r.ClientId, r.Topic))
	}
	return rules
}
// KafkaRuleParser parses protobuf L7 rules to enforcement objects
// May panic
KafkaRuleParser parses protobuf L7 rules to enforcement objects
May panic
// KafkaRuleParser parses protobuf L7 rules to enforcement objects // May panic
func KafkaRuleParser(rule *cilium.PortNetworkPolicyRule) []L7NetworkPolicyRule {
	l7Rules := rule.GetKafkaRules()
	if l7Rules == nil {
		return nil
	}
	allowRules := l7Rules.GetKafkaRules()
	rules := make([]L7NetworkPolicyRule, 0, len(allowRules))
	for _, r := range allowRules {
		rules = append(rules, kafka.NewRule(r.ApiVersion, r.ApiKeys, r.ClientId, r.Topic))
	}
	return rules
}
func KafkaRuleParser ( rule * cilium . PortNetworkPolicyRule ) [ ] L7NetworkPolicyRule { l7Rules := rule . GetKafkaRules ( ) if l7Rules == nil { return nil } allowRules := l7Rules . GetKafkaRules ( ) rules := make ( [ ] L7NetworkPolicyRule , 0 , len ( allowRules ) ) for _ , r := range allowRules { rules = append ( rules , kafka . NewRule ( r . ApiVersion , r . ApiKeys , r . ClientId , r . Topic ) ) } return rules }
KafkaRuleParser parses protobuf L7 rules to enforcement objects
May panic
KafkaRuleParser parses protobuf L7 rules to enforcement objects May panic