Version: v0.0.0-...-5ae6e0f Latest Latest

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

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



Package utils implement utilities functions



This section is empty.


This section is empty.


func ComputeTimings

func ComputeTimings(start *types.TimingsStart, timings *types.Timings)

func GetRandomInteger

func GetRandomInteger(max int) int

func HttpGet

func HttpGet(url string) (*http.Response, error)

func HttpMachineGet

func HttpMachineGet(url string) (*http.Response, error)

HttpMachineGet performs and http get setting as user agent Machine

func HttpMachinePostJSON

func HttpMachinePostJSON(url string, json string) (*http.Response, error)

func HttpPostJSON

func HttpPostJSON(url string, json string) (*http.Response, error)

func LoadsBelowSpecificLoad

func LoadsBelowSpecificLoad(slots []uint, threshold uint) []uint

func MaxOfArrayFloat

func MaxOfArrayFloat(array []float64) (float64, int)

func MaxOfArrayUint

func MaxOfArrayUint(array []uint) (uint, int)

func MinOfArrayUint

func MinOfArrayUint(array []uint) (uint, int)

func SendJSONResponse

func SendJSONResponse(w *http.ResponseWriter, code int, body string)

func SendJSONResponseByte

func SendJSONResponseByte(w *http.ResponseWriter, code int, body []byte)

func SlotsAboveSpecificFreeSlots

func SlotsAboveSpecificFreeSlots(slots []uint, threshold uint) []uint


type ErrorHttpCannotCreateRequest

type ErrorHttpCannotCreateRequest struct{}

func (ErrorHttpCannotCreateRequest) Error

type Semaphore

type Semaphore chan empty

func (Semaphore) Lock

func (s Semaphore) Lock()

func (Semaphore) P

func (s Semaphore) P(n int)

acquire n resources

func (Semaphore) Signal

func (s Semaphore) Signal()

func (Semaphore) Unlock

func (s Semaphore) Unlock()

func (Semaphore) V

func (s Semaphore) V(n int)

release n resources

func (Semaphore) Wait

func (s Semaphore) Wait(n int)

Jump to

Keyboard shortcuts

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