...

Package queue

import "scheduler/queue"
Overview
Index

Overview ▾

Package queue implement a producer consumer queue for lossless models.

func GetLength

func GetLength() int

func GetLengthOfTypes

func GetLengthOfTypes() map[int64]int64

func Looper

func Looper()

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       *types.FaasApiResponse
    ErrorExecution bool
    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)

}