Documentation ¶
Index ¶
- Constants
- Variables
- func BuildDeployment(cl rectificationClient, clusters sous.Clusters, req SingReq) (sous.Deployment, error)
- func MakeDeployID(in string) string
- func MapResources(r sous.Resources) dtoMap
- func NewDeployer(r sous.Registry, c rectificationClient) sous.Deployer
- type DummyRectificationClient
- func (t *DummyRectificationClient) DeleteRequest(cluster, reqid, message string) error
- func (t *DummyRectificationClient) Deploy(cluster, depID, reqID, imageName string, res sous.Resources, e sous.Env, ...) error
- func (t *DummyRectificationClient) ImageLabels(in string) (map[string]string, error)
- func (t *DummyRectificationClient) PostRequest(cluster, id string, count int) error
- func (t *DummyRectificationClient) Scale(cluster, reqid string, count int, message string) error
- func (t *DummyRectificationClient) SetLogger(l *log.Logger)
- type RectiAgent
- func (ra *RectiAgent) DeleteRequest(cluster, reqID, message string) error
- func (ra *RectiAgent) Deploy(cluster, depID, reqID, dockerImage string, r sous.Resources, e sous.Env, ...) error
- func (ra *RectiAgent) ImageLabels(in string) (map[string]string, error)
- func (ra *RectiAgent) PostRequest(cluster, reqID string, instanceCount int) error
- func (ra *RectiAgent) Scale(cluster, reqID string, instanceCount int, message string) error
- type SingReq
Constants ¶
const ( ReqsPerServer = 10 MaxAssemblers = 100 )
ReqsPerServer limits the number of simultaneous number of requests made against a single Singularity server
Variables ¶
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 ¶
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 ¶
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
type SingReq ¶
type SingReq struct { SourceURL string Sing *singularity.Client ReqParent *dtos.SingularityRequestParent }
SingReq captures a request made to singularity with its initial response