workerpool

package
v0.0.0-...-89d5bac Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainerdServer

func NewContainerdServer(runDir string, config containerdrunner.Config) (*exec.Cmd, error)

Types

type GroupConfig

type GroupConfig struct {
	Size        int
	Runtime     string
	TargetLayer string `toml:"target_layer"`
}

type ScheduleWorker

type ScheduleWorker struct {
	// contains filtered or unexported fields
}

func (*ScheduleWorker) Decomission

func (sw *ScheduleWorker) Decomission() error

func (*ScheduleWorker) GetFunction

func (sw *ScheduleWorker) GetFunction() string

func (*ScheduleWorker) MarkRunTime

func (sw *ScheduleWorker) MarkRunTime()

func (*ScheduleWorker) SetFunction

func (sw *ScheduleWorker) SetFunction(f string)

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func NewFakeScheduler

func NewFakeScheduler(workers map[string]*ScheduleWorker, undeployed []string, decommissionTime time.Duration) *Scheduler

func NewScheduler

func NewScheduler(workers []*worker.Worker, runtime string) *Scheduler

func (*Scheduler) DeployedWorkers

func (s *Scheduler) DeployedWorkers() []string

func (*Scheduler) End

func (s *Scheduler) End() error

func (*Scheduler) ForceDecomission

func (s *Scheduler) ForceDecomission()

func (*Scheduler) Run

func (s *Scheduler) Run(function *types.FunctionDoc, request interface{}) (interface{}, error)

func (*Scheduler) RunComplete

func (s *Scheduler) RunComplete(name string)

func (*Scheduler) RunDeployedFunction

func (s *Scheduler) RunDeployedFunction(f string) (string, *ScheduleWorker, bool)

func (*Scheduler) RunUndeployed

func (s *Scheduler) RunUndeployed() (string, *ScheduleWorker)

func (*Scheduler) RunningWorkers

func (s *Scheduler) RunningWorkers() []string

func (*Scheduler) ScheduleDecommission

func (s *Scheduler) ScheduleDecommission(name string, schedulable *ScheduleWorker)

func (*Scheduler) UndeployedWorkers

func (s *Scheduler) UndeployedWorkers() []string

type WorkerPool

type WorkerPool struct {
	// contains filtered or unexported fields
}

func NewWorkerPool

func NewWorkerPool(groups []GroupConfig) (*WorkerPool, error)

func (*WorkerPool) Close

func (p *WorkerPool) Close() error

func (*WorkerPool) Run

func (p *WorkerPool) Run(function *types.FunctionDoc, request interface{}) (interface{}, error)

Jump to

Keyboard shortcuts

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