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
Click to show internal directories.
Click to hide internal directories.