rmanager

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestManager

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

RequestManager - Struct dedicated to managing a request queue, channel "next" is used to make the worker understand that he is ready to make a new request,

func GetRequestManager

func GetRequestManager() *RequestManager

GetRequestManager - Returns the once instance of RequestManager

func (*RequestManager) AddRequest

func (rm *RequestManager) AddRequest(r request.RemoteData) (<-chan interface{}, <-chan error)

AddRequest - Appends a request to the queue, if the worker is not running starts it and return the two channels of requestContainer to read the result or error

func (*RequestManager) StartService

func (rm *RequestManager) StartService()

StartService - Starts the worker

Jump to

Keyboard shortcuts

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