mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Adding '-verbose' will print out the allocation information for the deployment. This also changes the job run command so that it now blocks until deployment is complete and adds timestamps to the output so that it's more in line with the output of node drain. This uses glint to print in place in running in a tty. Because glint doesn't yet support cmd/powershell, Windows workflows use a different library to print in place, which results in slightly different formatting: 1) different margins, and 2) no spinner indicating deployment in progress.
19 lines
431 B
Go
19 lines
431 B
Go
package glint
|
|
|
|
// Context is a component type that can be used to set data on the context
|
|
// given to Body calls for components that are children of this component.
|
|
func Context(inner Component, kv ...interface{}) Component {
|
|
if len(kv)%2 != 0 {
|
|
panic("kv must be set in pairs")
|
|
}
|
|
|
|
return &contextComponent{inner: inner, pairs: kv}
|
|
}
|
|
|
|
type contextComponent struct {
|
|
terminalComponent
|
|
|
|
inner Component
|
|
pairs []interface{}
|
|
}
|