How do I connect to the Electrs index?
According to https://github.com/romanz/electrs

The server indexes the entire Bitcoin blockchain, and the resulting index enables fast queries for any given user wallet, allowing the user to keep real-time track of his balances and his transaction history using the Electrum wallet.
Supports Electrum protocol v1.4

It seems to me there are at least three ways forward:

Study the examples in the examples folder and add to electrs the facility you need using the interface of your choice.

Implement the Electrum protocol v1.4 in a custom client that you write. I would start by looking at the source code for Electrum.

use Electrum and import into it any address whose balance you are interested in.


The last seems like it might be the least work.