diff --git a/commands/set_grace.go b/commands/set_grace.go new file mode 100644 index 0000000..6068342 --- /dev/null +++ b/commands/set_grace.go @@ -0,0 +1,18 @@ +package commands + +import ( + "time" +) + +type SetGraceTime struct { + Grace time.Duration `short:"g" long:"grace" description:"grace time (resetting ttl) of container" required:"true"` +} + +func (command *SetGraceTime) Execute(maybeHandle []string) error { + container, err := globalClient().Lookup(handle(maybeHandle)) + failIf(err) + + err = container.SetGraceTime(command.Grace) + failIf(err) + return nil +}