worker

package
v0.0.0-...-b10e7cb Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SynchronizeError

type SynchronizeError struct {
	State int
	ID    string
}

Specific synchronization error

func (SynchronizeError) Error

func (err SynchronizeError) Error() string

Method to implement the interface error

type Worker

type Worker struct {
	Events chan api.EventManager
	// contains filtered or unexported fields
}

Object that manages the different kinds of synchronization

func New

func New(maxWorkers int, database db.Database) (worker *Worker)

Function that returns a new worker from given info

func (*Worker) IsClosed

func (worker *Worker) IsClosed() bool

Method that returns whether the channel is closed

func (*Worker) Process

func (worker *Worker) Process()

Method that process all requests of sync

func (*Worker) Start

func (worker *Worker) Start()

Method that starts the processing of the worker

func (*Worker) Stop

func (worker *Worker) Stop() (err error)

Method that stops the processing of the worker

Jump to

Keyboard shortcuts

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