cli

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package cli provides command line support for cmdstalk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {

	// The beanstalkd TCP address.
	Address string

	// All == true means all tubes will be watched.
	All bool

	// The shell command to execute for each job.
	Cmd string

	// PerTube is the number of workers servicing each tube concurrently.
	PerTube uint64

	// The beanstalkd tubes to watch.
	Tubes TubeList
}

Options contains runtime configuration, and is generally the result of parsing command line flags.

func MustParseFlags

func MustParseFlags() (o Options)

Calls ParseFlags(), os.Exit(1) on error.

func ParseFlags

func ParseFlags() (o Options, err error)

ParseFlags parses and validates CLI flags into an Options struct.

type TubeList

type TubeList []string

TubeList is a list of beanstalkd tube names.

func (*TubeList) Set

func (t *TubeList) Set(value string) error

Set replaces the TubeList by parsing the comma-separated value string.

func (*TubeList) String

func (t *TubeList) String() string

Jump to

Keyboard shortcuts

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