DaemonDiscovery

Finds a running server; never starts one (see TapDaemonProcess).

Functions

Link copied to clipboard

The token for an explicitly given address: tap.token / TAP_TOKEN, else null.

Link copied to clipboard

The tap executable: tap.bin / TAP_BIN, else tap on PATH.

Link copied to clipboard
suspend fun resolve(): String

tap.server / TAP_SERVER, else the address in a live daemon.json. Probes the descriptor with Info over a short-lived coroutine stub; a dead descriptor fails with "no running tap server; run tap start".

Link copied to clipboard

resolve plus the token: an explicit tap.server / TAP_SERVER pairs with explicitToken; a discovered server with the token in its daemon.json.

Link copied to clipboard
suspend fun running(dir: Path = stateDir()): String?

Address of the server daemon.json in dir points at, if it answers Info.

Link copied to clipboard
fun stateDir(): Path