Documentation ¶
Index ¶
- Constants
- func BuildDeployment(reg sous.ImageLabeller, clusters sous.Clusters, req SingReq, ...) (sous.DeployState, error)
- func MakeRequestID(depID sous.DeploymentID) (string, error)
- func MakeRequestURL(baseURL string, requestID string) (string, error)
- func MapRequestTypeToManifestKind(requestType string) (sous.ManifestKind, bool)
- func MapStartupIntoHealthcheckOptions(depMap *map[string]interface{}, startup sous.Startup) error
- func NewDeployer(c rectificationClient, ls logging.LogSink, options ...DeployerOption) sous.Deployer
- func SanitizeDeployID(in string) string
- func StripDeployID(in string) string
- type DeployerOption
- type RectiAgent
- func (ra *RectiAgent) DeleteRequest(cluster, reqID, message string) error
- func (ra *RectiAgent) Deploy(d sous.Deployable, reqID, depID string) error
- func (ra *RectiAgent) PostRequest(d sous.Deployable, reqID string) error
- func (ra *RectiAgent) Scale(cluster, reqID string, instanceCount int, message string) error
- type SingReq
Constants ¶
const DefaultMaxHTTPConcurrencyPerServer = 10
DefaultMaxHTTPConcurrencyPerServer is the default maximum number of concurrent HTTP requests to send per Singularity server. To configure per deployer, see OptMaxHTTPConcurrencyPerServer.
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
MakeRequestID creates a Singularity request ID from a sous.DeploymentID.
func MakeRequestURL ¶ added in v1.0.1
MakeRequestURL creates a singularity request url
func MapRequestTypeToManifestKind ¶ added in v1.0.1
MapRequestTypeToManifestKind returns the ManifestKind and true if the mapping is possible; an indefined value and false otherwise.
func MapStartupIntoHealthcheckOptions ¶ added in v1.0.1
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
SanitizeDeployID replaces characters forbidden in a Singularity deploy ID with underscores.
func StripDeployID ¶ added in v1.0.1
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 ¶
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
type SingReq ¶
type SingReq struct { SourceURL string Sing singClient ReqParent *dtos.SingularityRequestParent }
SingReq captures a request made to singularity with its initial response