Skip to main content

Module program

Module program 

Source
Expand description

Which command the hooks this CLI installs call.

The library runs as two binaries: the tracevault command and, under visdom trace, the visdom one that replaces it. Whatever one of them installs for an agent or for git to run later — hooks, the telemetry helper, plugins — has to name a command, and it names the one that installed it: a machine set up with visdom alone has no tracevault on PATH.

The move goes one way. visdom rewrites tracevault … commands it finds to visdom trace …; tracevault leaves visdom trace … commands as they are (see installs_visdom), so an automatic refresh started by one binary never undoes what the other set up.

Structs§

Cli
The command name in a message, for the running binary: {CLI} repo switch reads tracevault repo switch or visdom trace repo switch.
Env
The prefix of the environment variables in a message: {ENV}_API_KEY reads TRACEVAULT_API_KEY or VISDOM_API_KEY (which visdom accepts for it).
Top
The binary’s own name in a message, for the commands visdom has at its top level and for message prefixes: {TOP} login, {TOP}: warning: ….

Constants§

CLI
See Cli.
ENV
See Env.
TOP
See Top.
TRACEVAULT
How the tracevault binary spells a tracing command.
VISDOM_TRACE
How the visdom binary spells one.

Functions§

installs_visdom
Whether what is being installed should call visdom: this is the visdom binary, or what is already there (existing_is_visdom) does.
is_visdom
Whether this process is the visdom binary.
is_visdom_command
Whether command is one of ours and names the visdom binary.
name
The command name to install.
run_as_visdom
Called once by the visdom binary before it runs anything.
say
text — a message written with tracevault … commands and TRACEVAULT_… variables — as the running binary says it. For messages that are not format strings; those use CLI, TOP and ENV.
spelled
command (one of ours, under either name) spelled for the binary chosen by visdom. Anything else comes back unchanged.
subcommand
What comes after the command name when command is one of ours (tracevault stream … or visdom trace stream … → stream …).