queue

package
v0.0.0-...-5ae6e0f Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package queue implement a producer consumer queue for lossless models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQueueFill

func GetQueueFill() int

func Looper

func Looper()

Types

type ErrorFull

type ErrorFull struct{}

func (ErrorFull) Error

func (e ErrorFull) Error() string

type QueuedJob

type QueuedJob struct {
	Request   *types.ServiceRequest
	Semaphore *utils.Semaphore
	Response  *faas.APIResponse
	Timings   *Timings
}

func EnqueueJob

func EnqueueJob(request *types.ServiceRequest) (*QueuedJob, error)

EnqueueJob enqueues the passed job in the queue and it blocks the caller until the job has been executed

type Timings

type Timings struct {
	ExecutionTime     float64 `json:"execution_time"`      // the time of executing the job comprising the GET to openfaas
	FaasExecutionTime float64 `json:"faas_execution_time"` // the execution time as it is told by openfaas
	QueueTime         float64 `json:"queue_time"`          // the time in which the job remains in the local queue (comprises the execution time)

}

Jump to

Keyboard shortcuts

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