command

package
v0.0.0-...-4921228 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct{}

Command holds data for the cli commands.

func (*Command) Flush

func (c *Command) Flush(cli *cli.Context) error

Flush empties an entire tube of jobs.

func (Command) GetBeanstalkdClient

func (c Command) GetBeanstalkdClient(cli *cli.Context) (*beanstalkd.BeanstalkdClient, error)

GetBeanstalkdClient returns a client object for interacting with a beanstalkd server.

func (Command) GetLogger

func (c Command) GetLogger(cli *cli.Context) *log.Logger

GetLogger returns a logrus object according to any flags set in the application parameters.

func (*Command) Monitor

func (c *Command) Monitor(cli *cli.Context) error

Monitor outputs a overview of server and tube statistics, repeated every second.

func (*Command) Peek

func (c *Command) Peek(cli *cli.Context) error

Peek displays the next job in the tube without removing it.

func (*Command) Pop

func (c *Command) Pop(cli *cli.Context) error

Pop removes and displays a job from the selected tube.

func (*Command) Put

func (c *Command) Put(cli *cli.Context) error

Put adds a new job into a queue, from a string or reading from stdin.

Jump to

Keyboard shortcuts

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