Documentation
¶
Overview ¶
Package cli is the `build` command: `wctr build` (ForEngine, for wctr's extension hook), and the standalone `wctr-build`.
Index ¶
Constants ¶
View Source
const DefaultHost = "unix:///var/run/wctr.sock"
DefaultHost is the engine's socket when neither -H nor WCTR_HOST says.
Variables ¶
This section is empty.
Functions ¶
func ForEngine ¶ added in v0.2.0
func ForEngine(e HTTPEngine) *cobra.Command
ForEngine is `build` for wctr's command tree:
cli.Options{Extra: []func(cli.Engine) *cobra.Command{
func(e cli.Engine) *cobra.Command { return buildcli.ForEngine(e) }}}
The build talks to the engine wctr's -H selects.
Types ¶
type HTTPEngine ¶ added in v0.2.0
HTTPEngine is how a host program hands over its engine: the engine's cli.Engine (wctr's Options.Extra) satisfies it.
type Options ¶
type Options struct {
// Engine returns the engine to build with; cmd is the build command
// (its flags, and its parents', are parsed). Nil: dial the -H/--host
// flag of the command or a parent, else $WCTR_HOST, else DefaultHost.
Engine func(cmd *cobra.Command) (driver.Engine, error)
// Cache is the step cache. Nil: a file under the user cache directory,
// or a cache for this build only where there is none (a browser).
Cache builder.Cache
// Stdin is read for "-" (default os.Stdin).
Stdin io.Reader
// Limits bound the context (default buildcontext.DefaultLimits).
Limits buildcontext.Limits
}
Options wire the command into a host program.
Click to show internal directories.
Click to hide internal directories.