scheduler

package
v0.0.0-...-a65126b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

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

Scheduler is an object that can schedule lambda function workloads to a pool of workers.

func NewScheduler

func NewScheduler(c config.Config) *Scheduler

func (*Scheduler) AddWorkers

func (s *Scheduler) AddWorkers(urls []url.URL)

func (*Scheduler) GetLambdaInfoFromRequest

func (s *Scheduler) GetLambdaInfoFromRequest(r *http.Request) (*lambda.Lambda,
	*httputil.HttpError)

func (*Scheduler) RemoveWorkers

func (s *Scheduler) RemoveWorkers(urls []url.URL)

func (*Scheduler) RunLambda

func (s *Scheduler) RunLambda(w http.ResponseWriter, r *http.Request)

RunLambda is an HTTP request handler that expects requests of form /runLambda/<lambdaName>. It extracts the lambda name from the request path and then chooses a worker to run the lambda workload using the configured load balancer. The lambda response is forwarded to the client "as-is" without any modifications.

func (*Scheduler) StatusCheckAllWorkers

func (s *Scheduler) StatusCheckAllWorkers(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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