...

Package memdb

import "scheduler/memdb"
Overview
Index

Overview ▾

Package memdb implements a fast way for in-memory variables.

func GetFreeRunningSlots

func GetFreeRunningSlots() int

func GetNextRequestNumber

func GetNextRequestNumber() uint64

GetNextRequestNumber returns the next id for the request

func GetNextRequestNumberFromPeers

func GetNextRequestNumberFromPeers() uint64

GetNextRequestNumberFromPeers returns the next id for the request

func GetRunningInstances

func GetRunningInstances(functionName string) (uint, error)

func GetTotalRunningFunctions

func GetTotalRunningFunctions() uint

func GetTotalRunningFunctionsOfType

func GetTotalRunningFunctionsOfType() map[int64]int64

func SetFunctionRunning

func SetFunctionRunning(functionName string, functionType int64) error

func SetFunctionStopped

func SetFunctionStopped(functionName string, functionType int64) error

type ErrorFunctionNotFound

type ErrorFunctionNotFound struct{}

func (ErrorFunctionNotFound) Error

func (ErrorFunctionNotFound) Error() string

type Function

type Function struct {
    Name             string
    RunningInstances uint
}