status

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusV2ModeInteractive statusv2Mode = 1 + iota
	StatusV2ModeDump
	StatusV2ModeRaw
	StatusV2ModeLegacy
)

Variables

View Source
var Subcommand = &cli.Subcommand{
	Use:   "status",
	Short: "retrieve & display daemon status information",
	SetupFlags: func(f *pflag.FlagSet) {
		statusv2Flags.Mode.Init(
			"interactive", StatusV2ModeInteractive,
			"dump", StatusV2ModeDump,
			"raw", StatusV2ModeRaw,
			"legacy", StatusV2ModeLegacy,
		)
		statusv2Flags.Mode.SetTypeString("mode")
		statusv2Flags.Mode.SetDefaultValue(StatusV2ModeInteractive)
		f.Var(&statusv2Flags.Mode, "mode", statusv2Flags.Mode.Usage())
		f.StringVar(&statusv2Flags.Job, "job", "", "only show specified job (works in \"dump\" and \"interactive\" mode)")
		f.DurationVarP(&statusv2Flags.Delay, "delay", "d", 1*time.Second, "use -d 3s for 3 seconds delay (minimum delay is 1s)")
	},
	Run: func(ctx context.Context, subcommand *cli.Subcommand, args []string) error {
		return runStatusV2Command(ctx, subcommand.Config(), args)
	},
}

Functions

This section is empty.

Types

type Client

type Client interface {
	Status() (daemon.Status, error)
	StatusRaw() ([]byte, error)
	SignalWakeup(job string) error
	SignalReset(job string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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