modgearman

package module
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: GPL-3.0 Imports: 30 Imported by: 0

README

Mod-Gearman-Worker

Build Status Go Report Card

this is a Mod-Gearman-Worker rewrite in golang. It supports all original command line parameters and therefor can be replace the c-worker without any config changes. Since it uses a go routines model instead of preforking workers, it uses much less ressources than the original worker.

Embedded Perl

This worker does not support embedded perl. It will run perl scripts simply like any other plugin.

Prometheus

Prometheus metrics will get exported when started with the prometheus-server option.

%> .../mod_gearman_worker --prometheus_server=127.0.0.1:8001

Build Instructions / Installation

Either use go install like:

%> go install github.com/ConSol/mod-gearman-worker-go/cmd/mod_gearman_worker
%> go install github.com/ConSol/mod-gearman-worker-go/cmd/send_gearman

Or clone the repository and build it manually:

%> go get github.com/ConSol/mod-gearman-worker-go
%> cd $GOPATH/src/ConSol/mod-gearman-worker-go
%> make
Windows Builds

Windows builds, for example a send_gearman.exe can be created by cloning the repository and running:

# 64bit windows builds
%> make build-windows-amd64

# 32bit windows builds
%> make build-windows-i386

Documentation

Index

Constants

View Source
const (
	// VERSION contains the actual lmd version
	VERSION = "1.1.3"
)

Variables

This section is empty.

Functions

func Sendgearman

func Sendgearman(build string)

Sendgearman starts the mod_gearman_worker program

func Worker

func Worker(build string)

Worker starts the mod_gearman_worker program

Types

type MainStateType

type MainStateType int

MainStateType is used to set different states of the main loop

const (
	// Reload flag if used after a sighup
	Reload MainStateType = iota

	// Restart is used when all worker should be recreated
	Restart

	// Shutdown is used when sigint received
	Shutdown

	// ShutdownGraceFully is used when sigterm received
	ShutdownGraceFully

	// Resume is used when signal does not change main state
	Resume
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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