(&mut self)
| 2763 | } |
| 2764 | |
| 2765 | fn parse_kafka_broker(&mut self) -> Result<WithOptionValue<Raw>, ParserError> { |
| 2766 | let _ = self.consume_token(&Token::Eq); |
| 2767 | let address = self.parse_literal_string()?; |
| 2768 | let tunnel = if self.parse_keyword(USING) { |
| 2769 | match self.expect_one_of_keywords(&[AWS, SSH])? { |
| 2770 | AWS => { |
| 2771 | self.expect_keywords(&[PRIVATELINK])?; |
| 2772 | KafkaBrokerTunnel::AwsPrivatelink(self.parse_aws_privatelink()?) |
| 2773 | } |
| 2774 | SSH => { |
| 2775 | self.expect_keywords(&[TUNNEL])?; |
| 2776 | KafkaBrokerTunnel::SshTunnel(self.parse_raw_name()?) |
| 2777 | } |
| 2778 | _ => unreachable!(), |
| 2779 | } |
| 2780 | } else { |
| 2781 | KafkaBrokerTunnel::Direct |
| 2782 | }; |
| 2783 | |
| 2784 | Ok(WithOptionValue::ConnectionKafkaBroker(KafkaBroker { |
| 2785 | address, |
| 2786 | tunnel, |
| 2787 | })) |
| 2788 | } |
| 2789 | |
| 2790 | fn parse_kafka_broker_aws_privatelink_option( |
| 2791 | &mut self, |
no test coverage detected