worker

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package worker contains the core of the autodeb worker. It creates all dependencies injects them at the right place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerURL        string
	AccessToken      string
	WorkingDirectory string
	LogLevel         log.Level
	RunnerCount      int
}

Config contains configuration for Worker

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker is the autodeb worker. It retrieves jobs from the main server and passes them to JobRunners that will execute them.

Workers are not safe for use by multiple goroutines.

func New

func New(cfg *Config, loggingOutput io.Writer) (*Worker, error)

New creates a Worker

func (*Worker) Shutdown

func (w *Worker) Shutdown() error

Shutdown stop the worker gracefully.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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