Skip to main content

Crate packset_client

Crate packset_client 

Source
Expand description

Loopback HTTP client for packsetd.

Reads PACKSET_URL or INSIDE_MEMORY_URL. search/get against packsetd; no SQLite. Does not open LMDB.

Structs§

Hit
PacksetClient

Enums§

Error

Constants§

DEFAULT_PORT
The port a writer listens on when nothing names one. The command line, the server and this client agree on it, so a seat needs no variable set.
TOKEN_FILE
The name of the token file in a pack home.

Functions§

authorize
request with this seat’s token as a bearer header. A caller that speaks to the writer outside PacksetClient wraps its request in this.
default_port
PACKSET_PORT (GROK_MEM_PORT is an alias), else DEFAULT_PORT.
load_seat_env
Load ~/.config/ljos/env (KEY=VALUE) when the process has not set those keys. ljos, packset, and packset-mcp then share one pack.
resolved_workspace
The workspace the seat’s memory lives in: PACKSET_WORKSPACE after loading the seat env file, else seat. Not default, and not the working directory’s git remote: those two are how one harness’s remember missed the other’s sitting.
token
The token this seat shows the writer: PACKSET_TOKEN, else the first line of token_path. None when there is neither, and the writer then answers 401 to everything but /health.
token_path
The token file a writer leaves in its pack home: PACKSET_TOKEN_FILE, else token under PACKSET_HOME (GROKINSIDE_HOME, GROK_INSIDE_MEMORY_HOME), else under the default home (packset_core::home::resolve). packsetd resolves its home the same way.