Documentation ¶
Index ¶
- Constants
- func GetStateString(state clusterState) string
- func ParseStateString(state string) clusterState
- type Clusters
- func (clusters *Clusters) DeleteCluster(runId string)
- func (clusters *Clusters) GetState(runId string) clusterState
- func (clusters *Clusters) ReloadClusterState() error
- func (clusters *Clusters) ReserveDeployment(config *viper.Viper, applicationConfig *models.ApplicationConfig, ...) <-chan ReserveResult
- func (clusters *Clusters) SetState(runId string, state clusterState)
- func (clusters *Clusters) UnreserveDeployment(runId string, deleteCluster bool, log *logging.Logger) <-chan UnreserveResult
- type DeploymentFiles
- type FailedJobs
- type Job
- type JobDeploymentConfig
- type JobManager
- type JobResults
- type JobSummary
- type ReserveResult
- type S3DeploymentFiles
- type UnreserveResult
- type Worker
Constants ¶
View Source
const ( DEPLOYING = 0 AVAILABLE = 1 RESERVED = 2 UNRESERVING = 3 FAILED = 4 ErrMaxClusters = "Max clusters reached" )
Possible deployment states
View Source
const ( JOB_QUEUED = "QUEUED" JOB_RESERVING = "RESERVING" JOB_RUNNING = "RUNNING" JOB_FINISHED = "FINISHED" JOB_FAILED = "FAILED" )
Variables ¶
This section is empty.
Functions ¶
func GetStateString ¶
func GetStateString(state clusterState) string
func ParseStateString ¶
func ParseStateString(state string) clusterState
Types ¶
type Clusters ¶
type Clusters struct { ClusterStore blobstore.BlobStore Config *viper.Viper DeployerClient *clients.DeployerClient MaxClusters int Deployments []*cluster // contains filtered or unexported fields }
func NewClusters ¶
func (*Clusters) DeleteCluster ¶
func (*Clusters) ReloadClusterState ¶
func (*Clusters) ReserveDeployment ¶
func (clusters *Clusters) ReserveDeployment( config *viper.Viper, applicationConfig *models.ApplicationConfig, jobDeploymentConfig JobDeploymentConfig, runId string, log *logging.Logger) <-chan ReserveResult
func (*Clusters) UnreserveDeployment ¶
type DeploymentFiles ¶
type DeploymentFiles interface {
DownloadDeployment(fileName string) (*deployer.Deployment, error)
}
func NewDeploymentFiles ¶
func NewDeploymentFiles(config *viper.Viper) (DeploymentFiles, error)
type FailedJobs ¶
type FailedJobs struct { Jobs []Job // contains filtered or unexported fields }
func NewFailedJobs ¶
func NewFailedJobs() *FailedJobs
func (*FailedJobs) AddJob ¶
func (jobs *FailedJobs) AddJob(job Job)
type Job ¶
type Job interface { GetId() string GetApplicationConfig() *models.ApplicationConfig GetJobDeploymentConfig() JobDeploymentConfig GetLog() *log.FileLog Run(deploymentId string) error GetState() string SetState(state string) GetSummary() JobSummary SetFailed(error string) GetResults() <-chan *JobResults IsSkipUnreserveOnFailure() bool IsDirectJob() bool }
type JobDeploymentConfig ¶
type JobDeploymentConfig struct {
Nodes []deployer.ClusterNode
}
func (JobDeploymentConfig) GetNodes ¶
func (config JobDeploymentConfig) GetNodes() []deployer.ClusterNode
type JobManager ¶
type JobManager struct { Queue chan Job Jobs map[string]Job Workers []*Worker FailedJobs *FailedJobs // contains filtered or unexported fields }
func NewJobManager ¶
func NewJobManager(config *viper.Viper) (*JobManager, error)
func (*JobManager) AddJob ¶
func (manager *JobManager) AddJob(job Job)
func (*JobManager) GetFailedJobs ¶
func (manager *JobManager) GetFailedJobs() []Job
func (*JobManager) GetJobs ¶
func (manager *JobManager) GetJobs() []Job
type JobResults ¶
type JobResults struct { Error string Data interface{} }
type JobSummary ¶
type ReserveResult ¶
type S3DeploymentFiles ¶
type S3DeploymentFiles struct {
// contains filtered or unexported fields
}
func (*S3DeploymentFiles) DownloadDeployment ¶
func (files *S3DeploymentFiles) DownloadDeployment(fileUrl string) (*deployer.Deployment, error)
type UnreserveResult ¶
Click to show internal directories.
Click to hide internal directories.