singularity

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2016 License: MIT Imports: 16 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(cl rectificationClient, 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 MapResources

func MapResources(r sous.Resources) dtoMap

SingMap produces a DTOMap appropriate for building a Singularity dto.Resources struct from

func NewDeployer

func NewDeployer(r sous.Registry, c rectificationClient) sous.Deployer

NewDeployer creates a new Singularity-based sous.Deployer.

Types

type DummyRectificationClient

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

DummyRectificationClient implements RectificationClient but doesn't act on the Mesos scheduler; instead it collects the changes that would be performed and options

func NewDummyRectificationClient

func NewDummyRectificationClient(nc sous.Registry) *DummyRectificationClient

NewDummyRectificationClient builds a new DummyRectificationClient

func (*DummyRectificationClient) DeleteRequest

func (t *DummyRectificationClient) DeleteRequest(
	cluster, reqid, message string) error

DeleteRequest (cluster url, request id, instance count, message)

func (*DummyRectificationClient) Deploy

func (t *DummyRectificationClient) Deploy(
	cluster, depID, reqID, imageName string, res sous.Resources, e sous.Env, vols sous.Volumes) error

Deploy implements part of the RectificationClient interface

func (*DummyRectificationClient) ImageLabels

func (t *DummyRectificationClient) ImageLabels(in string) (map[string]string, error)

ImageLabels gets the labels for an image name

func (*DummyRectificationClient) PostRequest

func (t *DummyRectificationClient) PostRequest(
	cluster, id string, count int) error

PostRequest (cluster, request id, instance count)

func (*DummyRectificationClient) Scale

func (t *DummyRectificationClient) Scale(
	cluster, reqid string, count int, message string) error

Scale (cluster url, request id, instance count, message)

func (*DummyRectificationClient) SetLogger

func (t *DummyRectificationClient) SetLogger(l *log.Logger)

SetLogger sets the logger for the client

type RectiAgent

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

RectiAgent is an implementation of the RectificationClient interface

func NewRectiAgent

func NewRectiAgent(b sous.Registry) *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) ImageLabels

func (ra *RectiAgent) ImageLabels(in string) (map[string]string, error)

ImageLabels gets the labels for an image name.

func (*RectiAgent) PostRequest

func (ra *RectiAgent) PostRequest(cluster, reqID string, instanceCount int) 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