Skip to main content

Module dev_inspect

Module dev_inspect 

Source
Expand description

bynk dev inspect (#3581, the dev agent-inspection track): list the agent instances a running bynk dev session has seen, and read one’s stored state.

A running session writes .bynk/dev/session.json (see SessionFile) naming each served context and the URL it answers on. This command reads it, signs a request under the local call key as bynk.dev, and prints the Worker’s answer as JSON on stdout. The request is the published call signature, as bynk migrate sweep’s wake is, so a Worker that was not built by bynk dev has no such route and answers 404.

Structs§

InspectMember
One member of a group, as bynk-inspect.json records it (classes empty for one that hosts no agent).
Local
The real transport: plain HTTP to a local Worker.
Page
Which page of a collection to read (--field, --after, --limit).
Session
The session file: each served Worker by its worker-dir name.
SessionFile
A written session file, removed when dropped (when the session stops).
SessionWorker
One served Worker, as the session file records it.

Enums§

Inspect
What bynk dev inspect was asked.

Traits§

Post
One HTTP exchange with a Worker: the status and the body.

Functions§

command
bynk dev inspect: find the session under project_root, run what, print the JSON.
context_of_worker
The qualified context a worker-dir name serves.
inspect_members
The agent-hosting members a group’s build records beside its entry (bynk-inspect.json); none for a Worker that is one context, or an unreadable file.
key_matches
Whether a registry key (its wire form) is the one the user typed: a string key by its text, any other by its JSON.
run
Run what against the session, returning the JSON to print. A context that cannot be reached is named in errors and the rest still answer.
session_path
Where a running session records itself, under the managed build directory.
signed_request
The signed POST of one inspect request: its URL and headers.