gearcmd

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskConfig

type TaskConfig struct {
	FunctionName            string
	FunctionCmd             string
	WarningLines            int
	ParseArgs               bool
	CmdTimeout              time.Duration
	RetryCount              int
	Halt                    chan struct{}
	LastResults             *ring.Ring
	ErrorResultsBackoffRate time.Duration
	SigtermGracePeriod      time.Duration
	// contains filtered or unexported fields
}

TaskConfig defines the configuration for the task. Use constructor for a new struct

func (*TaskConfig) Process

func (conf *TaskConfig) Process(job baseworker.Job) (b []byte, returnErr error)

Process runs the Gearman job by running the configured task. We need to implement the Task interface so we return (byte[], error) though the byte[] is always nil.

func (*TaskConfig) ProcessWithErrorBackoff added in v0.9.0

func (conf *TaskConfig) ProcessWithErrorBackoff(job baseworker.Job) (b []byte, returnErr error)

ProcessWithErrorBackoff calls Process and sleeps if the last N jobs returned an error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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