server

package
v0.0.0-...-764741f Latest Latest
Warning

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

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

Documentation

Overview

Package server implements the Scoot Cloud API. For now, running the Cloud Server includes the Scheduler as well.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Defaults

func Defaults() (*ice.MagicBag, jsonconfig.Schema)

Creates an MagicBag and a JsonSchema for this server and returns them

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

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

func RunServer

func RunServer(bag *ice.MagicBag, schema jsonconfig.Schema, config []byte)

Starts the Server based on the MagicBag and config schema provided this method blocks until the server completes running or an error occurs.

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) 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) SetSchedulerStatus

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

Implements SetSchedulerStatus Cloud Scoot API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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