singularity

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultMaxHTTPConcurrencyPerServer = 10

DefaultMaxHTTPConcurrencyPerServer is the default maximum number of concurrent HTTP requests to send per Singularity server. To configure per deployer, see OptMaxHTTPConcurrencyPerServer.

View Source
const (
	// MaxAssemblers is the maximum number of simultaneous deployment
	// assemblers.
	MaxAssemblers = 100
)

Variables

This section is empty.

Functions

func BuildDeployment

func BuildDeployment(reg sous.ImageLabeller, clusters sous.Clusters, req SingReq, log logging.LogSink) (sous.DeployState, error)

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

func MakeRequestID added in v0.0.3

func MakeRequestID(depID sous.DeploymentID) (string, error)

MakeRequestID creates a Singularity request ID from a sous.DeploymentID.

func MakeRequestURL added in v1.0.1

func MakeRequestURL(baseURL string, requestID string) (string, error)

MakeRequestURL creates a singularity request url

func MapRequestTypeToManifestKind added in v1.0.1

func MapRequestTypeToManifestKind(requestType string) (sous.ManifestKind, bool)

MapRequestTypeToManifestKind returns the ManifestKind and true if the mapping is possible; an indefined value and false otherwise.

func MapStartupIntoHealthcheckOptions added in v1.0.1

func MapStartupIntoHealthcheckOptions(depMap *map[string]interface{}, startup sous.Startup) error

MapStartupIntoHealthcheckOptions updates the given dtoMap with fields for a HealthcheckOptions struct if appropriate. map[string]interface{} is used so that the function can be exported and used in integration tests. Once type aliases land, these backflips can go away.

func NewDeployer

func NewDeployer(c rectificationClient, ls logging.LogSink, options ...DeployerOption) sous.Deployer

NewDeployer creates a new Singularity-based sous.Deployer.

func SanitizeDeployID added in v1.0.1

func SanitizeDeployID(in string) string

SanitizeDeployID replaces characters forbidden in a Singularity deploy ID with underscores.

func StripDeployID added in v1.0.1

func StripDeployID(in string) string

StripDeployID removes all characters forbidden in a Singularity deployID.

Types

type DeployerOption added in v1.0.1

type DeployerOption func(*deployer)

DeployerOption is an option for configuring singularity deployers.

func OptMaxHTTPReqsPerServer added in v1.0.1

func OptMaxHTTPReqsPerServer(n int) DeployerOption

OptMaxHTTPReqsPerServer overrides the DefaultMaxHTTPConcurrencyPerServer for this server.

type RectiAgent

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

RectiAgent is an implementation of the RectificationClient interface

func NewRectiAgent

func NewRectiAgent(l sous.ImageLabeller, ls logging.LogSink) *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(d sous.Deployable, reqID, depID string) error

Deploy sends requests to Singularity to make a deployment happen

func (*RectiAgent) PostRequest

func (ra *RectiAgent) PostRequest(d sous.Deployable, reqID string) 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      singClient
	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