singularity

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReqsPerServer = 10
	MaxAssemblers = 100
)

ReqsPerServer limits the number of simultaneous number of requests made against a single Singularity server

Variables

View Source
var (
	// Log is an alias to sous.Log
	Log = sous.Log
)

Functions

func BuildDeployment

func BuildDeployment(reg sous.Registry, clusters sous.Clusters, req SingReq) (sous.Deployment, error)

BuildDeployment does all the work to collect the data for a Deployment from Singularity based on the initial SingularityRequest

func MakeDeployID

func MakeDeployID(in string) string

MakeDeployID cleans a string to be used as a Singularity deploy ID.

func MakeRequestID added in v0.0.3

func MakeRequestID(mid sous.DeployID) string

MakeRequestID creats a Singularity request ID from a sous.DeployID.

func NewDeployer

func NewDeployer(c rectificationClient) sous.Deployer

NewDeployer creates a new Singularity-based sous.Deployer.

func ParseRequestID added in v0.0.3

func ParseRequestID(id string) (sous.DeployID, error)

ParseRequestID parses a DeployID from a Singularity request ID created by Sous.

Types

type RectiAgent

type RectiAgent struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RectiAgent is an implementation of the RectificationClient interface

func NewRectiAgent

func NewRectiAgent() *RectiAgent

NewRectiAgent returns a set-up RectiAgent

func (*RectiAgent) DeleteRequest

func (ra *RectiAgent) DeleteRequest(cluster, reqID, message string) error

DeleteRequest sends a request to Singularity to delete a request

func (*RectiAgent) Deploy

func (ra *RectiAgent) Deploy(cluster, depID, reqID, dockerImage string,
	r sous.Resources, e sous.Env, vols sous.Volumes) error

Deploy sends requests to Singularity to make a deployment happen

func (*RectiAgent) PostRequest

func (ra *RectiAgent) PostRequest(cluster, reqID string, instanceCount int, kind sous.ManifestKind, owners sous.OwnerSet) error

PostRequest sends requests to Singularity to create a new Request

func (*RectiAgent) Scale

func (ra *RectiAgent) Scale(cluster, reqID string, instanceCount int, message string) error

Scale sends requests to Singularity to change the number of instances running for a given Request

type SingReq

type SingReq struct {
	SourceURL string
	Sing      *singularity.Client
	ReqParent *dtos.SingularityRequestParent
}

SingReq captures a request made to singularity with its initial response

Jump to

Keyboard shortcuts

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