cmd

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() (*cobra.Command, error)

Types

type Opts

type Opts struct {
	In          time.Duration `cmd:"flag,in,delay before starting the command,i"`
	At          string        `cmd:"flag,at,UTC date to start the command,a"`
	Every       time.Duration `cmd:"flag,every,period to execute the command,e"`
	CronSpec    string        `cmd:"flag,cron,cron spec defining the period to execute the command,s"`
	During      time.Duration `cmd:"flag,during,period after which to stop executing the command,d"`
	Until       string        `cmd:"flag,until,UTC date after which to stop executing the command,u"`
	Count       int           `cmd:"flag,count,count of command execution,c"`
	NoStopOnErr bool          `cmd:"flag,no-stop-on-error,do not stop execution when the command reports an error,n"`
	Async       bool          `cmd:"flag,async,execute command asynchronously,x"`
	Parallel    int           `cmd:"flag,parallel,limit count of parallel execution with --async (0: no limit),p"`
	LogLevel    string        `cmd:"flag,log-level,log level,l"`
	Command     []string      `cmd:"arg,command,command and args,0"`
	// contains filtered or unexported fields
}

func NewOpts

func NewOpts() *Opts

func (*Opts) InitLog

func (o *Opts) InitLog()

func (*Opts) Output

func (o *Opts) Output(res interface{}) error

func (*Opts) SchedExec added in v0.0.3

func (o *Opts) SchedExec() (interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL