Documentation
¶
Overview ¶
Package cli runs grelot's client verbs: it reads the command line, the client config and the shell it runs in, sends the API calls, and prints what an agent reads, the status line first.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// Lookup reads an environment variable.
Lookup func(name string) (string, bool)
Hostname func() (string, error)
Getwd func() (string, error)
// Home is the user's home directory, for a ~ in a provider's paths.
Home func() (string, error)
// Now is the clock of the hooks' marks, time.Now when nil.
Now func() time.Time
// Machine is the machine id, <kind>:<hex>, or "" when unknown.
Machine func(context.Context) string
InContainer func() bool
Providers *provider.Set
// Processes is read for this process's ancestors; nil reads none.
Processes proctree.Table
// ConfigDir is the user config dir; grelot's files are under its grelot
// folder.
ConfigDir string
// Version is the Grelot-Version this client sends; Build is the
// version grelot version prints, which may be a pseudo-version.
Version string
Build string
PID int
// Timeout bounds each API call; zero takes the client's default.
Timeout time.Duration
}
Env is what a command reads of the process it runs in.
Click to show internal directories.
Click to hide internal directories.