Exemple #1
0
    /// <summary>
    /// Drop a connector and delete it from the Connect cluster. The topics associated with this cluster are not deleted by this command. The statement fails if the connector doesn't exist.
    /// </summary>
    /// <param name="connectorName">Name of the connector to drop.</param>
    /// <param name="cancellationToken">Optional cancellation token to cancel the operation</param>
    /// <returns></returns>
    public Task <HttpResponseMessage> DropConnectorAsync(string connectorName, CancellationToken cancellationToken = default)
    {
        string dropStatement = StatementTemplates.DropConnector(connectorName);

        KSqlDbStatement ksqlDbStatement = new(dropStatement);

        return(ExecuteStatementAsync(ksqlDbStatement, cancellationToken));
    }
    public void DropConnector()
    {
        //Arrange
        string connectorName = "CONNECTOR_NAME";

        //Act
        var statement = StatementTemplates.DropConnector(connectorName);

        //Assert
        statement.Should().Be($"DROP CONNECTOR {connectorName};");
    }