api

package
v0.0.1-alpha Latest Latest
Warning

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

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

Documentation

Overview

Package api implements the Scoot thrift API, Bazel grpc remote execution and longrunning operation APIs, and the TwitterServer http API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeServer

func MakeServer(handler scoot.CloudScoot,
	transport thrift.TServerTransport,
	transportFactory thrift.TTransportFactory,
	protocolFactory thrift.TProtocolFactory) thrift.TServer

Creates a Thrift server given a Handler and Thrift connection information

func NewHandler

func NewHandler(scheduler server.Scheduler, sc saga.SagaCoordinator, stat stats.StatsReceiver) scoot.CloudScoot

Creates and returns a new server Handler, which combines the scheduler, saga coordinator and stats receivers.

Types

type Handler

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

Wrapping type that combines a scheduler, saga coordinator and stat receiver into a server

func (*Handler) GetClassLoadPercents

func (h *Handler) GetClassLoadPercents() (map[string]int32, error)

GetClassLoadPercents Implements GetClassLoadPercents Cloud Scoot API

func (*Handler) GetRebalanceMinimumDuration

func (h *Handler) GetRebalanceMinimumDuration() (int32, error)

GetRebalanceMinimumDuration get the duration(minutes) that the scheduler needs to be exceeding the rebalance threshold before rebalancing. <= 0 implies no rebalancing

func (*Handler) GetRebalanceThreshold

func (h *Handler) GetRebalanceThreshold() (int32, error)

GetRebalanceThreshold the % spread threshold that must be exceeded to trigger rebalance <= 0 implies no rebalancing

func (*Handler) GetRequestorToClassMap

func (h *Handler) GetRequestorToClassMap() (map[string]string, error)

GetRequestorToClassMap Implements GetRequestorToClassMap Cloud Scoot API

func (*Handler) GetSchedulerStatus

func (h *Handler) GetSchedulerStatus() (*scoot.SchedulerStatus, error)

Implements GetSchedulerStatus Cloud Scoot API

func (*Handler) GetStatus

func (h *Handler) GetStatus(jobId string) (*scoot.JobStatus, error)

Implements GetStatus Cloud Scoot API

func (*Handler) KillJob

func (h *Handler) KillJob(jobId string) (*scoot.JobStatus, error)

Implements KillJob Cloud Scoot API

func (*Handler) OfflineWorker

func (h *Handler) OfflineWorker(req *scoot.OfflineWorkerReq) error

Implements OfflineWorker Cloud Scoot API

func (*Handler) ReinstateWorker

func (h *Handler) ReinstateWorker(req *scoot.ReinstateWorkerReq) error

Implements ReinstateWorker Cloud Scoot API

func (*Handler) RunJob

func (h *Handler) RunJob(def *scoot.JobDefinition) (*scoot.JobId, error)

Implements RunJob Cloud Scoot API

func (*Handler) SetClassLoadPercents

func (h *Handler) SetClassLoadPercents(classLoadPercents map[string]int32) error

SetClassLoadPercents Implements SetClassLoadPercents Cloud Scoot API

func (*Handler) SetRebalanceMinimumDuration

func (h *Handler) SetRebalanceMinimumDuration(durationMinimum int32) error

SetRebalanceMinimumDuration set the duration(minutes) that the scheduler needs to be exceeding the rebalance threshold before rebalancing. <= 0 implies no rebalancing

func (*Handler) SetRebalanceThreshold

func (h *Handler) SetRebalanceThreshold(threshold int32) error

SetRebalanceThreshold the % spread threshold that must be exceeded to trigger rebalance <= 0 implies no rebalancing

func (*Handler) SetRequestorToClassMap

func (h *Handler) SetRequestorToClassMap(requestToClassMap map[string]string) error

SetRequestorToClassMap Implements SetRequestorToClassMap Cloud Scoot API

func (*Handler) SetSchedulerStatus

func (h *Handler) SetSchedulerStatus(maxNumTasks int32) error

Implements SetSchedulerStatus Cloud Scoot API

Directories

Path Synopsis
Package thrift implements the Scoot API, see scoot.thrift for details
Package thrift implements the Scoot API, see scoot.thrift for details

Jump to

Keyboard shortcuts

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