Documentation ¶
Index ¶
- Constants
- Variables
- type LambdoService
- type LambdoSpawnRequest
- type LambdoSpawnResponse
- type RootFSInfo
- type Scheduler
- func (s *Scheduler) FindAndDestroyUnsused(hoursTimeout float64)
- func (s *Scheduler) GetStateByID(id string) (fnState database.FunctionState, err error)
- func (s *Scheduler) LookForReadyInstance(functionId uuid.UUID, cursor uint64) (fnState database.FunctionState, returnedCursor uint64, err error)
- func (s *Scheduler) SetStatus(id string, status database.FnStatusCode) error
- func (s *Scheduler) SpawnVM(function database.Function) (fnState database.FunctionState, err error)
Constants ¶
View Source
const (
IDTimestampSeparator = "_"
)
Variables ¶
View Source
var ErrRecordNotFound = errors.New("could not find an available function")
Functions ¶
This section is empty.
Types ¶
type LambdoService ¶
func (*LambdoService) DeleteVM ¶
func (service *LambdoService) DeleteVM(VMID string) (err error)
func (*LambdoService) SpawnVM ¶
func (service *LambdoService) SpawnVM(function database.Function) (data LambdoSpawnResponse, err error)
type LambdoSpawnRequest ¶
type LambdoSpawnRequest struct { // URL to the rootfs of the function Rootfs RootFSInfo `json:"rootfs"` // Ports that the virtual machine needs to be exposed // right now we only support one port RequestedPorts []uint16 `json:"requestedPorts"` }
type LambdoSpawnResponse ¶
type RootFSInfo ¶
type Scheduler ¶
type Scheduler struct { Redis *redis.Client Context *context.Context Lambdo *LambdoService }
func (*Scheduler) FindAndDestroyUnsused ¶
goes through the whole redis instance and remove that have not been used within the last {hoursTimeout} Hours
func (*Scheduler) GetStateByID ¶
func (s *Scheduler) GetStateByID(id string) (fnState database.FunctionState, err error)
Get all keys of a state by its ID
func (*Scheduler) LookForReadyInstance ¶
func (s *Scheduler) LookForReadyInstance(functionId uuid.UUID, cursor uint64) (fnState database.FunctionState, returnedCursor uint64, err error)
Uses SCAN to look for the first instance marked as ready (https://redis.io/docs/latest/commands/scan/)
Click to show internal directories.
Click to hide internal directories.