@tailnet/core
v0.1.2
Published
Shared contract behind @tailnet/headscale and @tailnet/tailscale
Maintainers
Readme
@tailnet/core
The contract behind @tailnet/headscale and @tailnet/tailscale: the
abstract Tailnet class, the NodeOps, UserOps, KeyOps and PolicyOps
interfaces, the shared node, user, key and policy types, and the error
classes.
You do not install this package yourself. Everything in it is re-exported from both control plane packages:
import { Headscale, type Tailnet, NotFoundError } from "@tailnet/headscale"
async function offline(control: Tailnet) {
const nodes = await control.nodes.fetch()
return nodes.filter(n => !n.online)
}