Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertActivityTaskInString(task ActivityTask) string
- func ConvertSubActivityTaskInString(task ActivityTask) string
- func DumpData(file string, data interface{}, overwrite bool)
- func GetExclusionListExceptInstanceList(infrastructure model.Infrastructure, instanceIds []string) []string
- func SortGroups(groups []ActivityGroup)
- type ActivityCouple
- func GetPostBuildTaskActivities(infrastructure model.Infrastructure, task ActivityTask, exclusionList []string) ([]ActivityCouple, error)
- func GetTaskActivities(project model.Project, infrastructure model.Infrastructure, task ActivityTask) ([]ActivityCouple, error)
- func GetTaskActivitiesExclusion(project model.Project, infrastructure model.Infrastructure, task ActivityTask, ...) ([]ActivityCouple, error)
- type ActivityGroup
- type ActivityTask
- type Job
- type JobProcess
- type MachineOperationsJob
- func (job *MachineOperationsJob) IsError() bool
- func (job *MachineOperationsJob) IsInterrupted() bool
- func (job *MachineOperationsJob) Response() interface{}
- func (job *MachineOperationsJob) Start(exitChannel chan bool)
- func (job *MachineOperationsJob) Status() bool
- func (job *MachineOperationsJob) Stop()
- func (job *MachineOperationsJob) WaitFor()
- type Runnable
- type SchedulerState
- type SchedulerTask
- type SortGroupType
- type TaskProcess
- type TaskSignal
Constants ¶
View Source
const MachineReadOperationTimeout = 900
Variables ¶
View Source
var TaskMutex sync.RWMutex
Functions ¶
func ConvertActivityTaskInString ¶
func ConvertActivityTaskInString(task ActivityTask) string
func ConvertSubActivityTaskInString ¶
func ConvertSubActivityTaskInString(task ActivityTask) string
func GetExclusionListExceptInstanceList ¶
func GetExclusionListExceptInstanceList(infrastructure model.Infrastructure, instanceIds []string) []string
func SortGroups ¶
func SortGroups(groups []ActivityGroup)
Types ¶
type ActivityCouple ¶
type ActivityCouple struct { Project model.Project Infra model.Infrastructure IsCloud bool IsInstance bool Machine model.LocalMachine CMachine model.CloudMachine Instance model.LocalInstance CInstance model.CloudInstance Plans []model.InstallationPlan Task ActivityTask NewInfra bool }
func GetPostBuildTaskActivities ¶
func GetPostBuildTaskActivities(infrastructure model.Infrastructure, task ActivityTask, exclusionList []string) ([]ActivityCouple, error)
func GetTaskActivities ¶
func GetTaskActivities(project model.Project, infrastructure model.Infrastructure, task ActivityTask) ([]ActivityCouple, error)
func GetTaskActivitiesExclusion ¶
func GetTaskActivitiesExclusion(project model.Project, infrastructure model.Infrastructure, task ActivityTask, exclusionList []string) ([]ActivityCouple, error)
type ActivityGroup ¶
type ActivityGroup struct { Name string Subject string Activities []ActivityCouple NewInfra bool Task ActivityTask IsCloud bool }
func GroupActivitiesBySubject ¶
func GroupActivitiesBySubject(activities []ActivityCouple) []ActivityGroup
type ActivityTask ¶
type ActivityTask int
const ( CreateMachine ActivityTask = iota DestroyMachine StopMachine StartMachine RestartMachine MachineStatus MachineEnv MachineInspect MachineIPAddress MachineExtendsDisk )
type Job ¶
type Job struct { Id string Name string Runnable Runnable Async bool Sequence int Of int State bool }
func (*Job) GetRunnable ¶
type JobProcess ¶
type MachineOperationsJob ¶
type MachineOperationsJob struct { Name string State bool OutChan chan *MachineOperationsJob OwnState term.KeyValueElement Project model.Project Infra model.Infrastructure InstanceId string Activity ActivityCouple ActivityGroup ActivityGroup MachineMessage procedures.MachineMessage Index int PartOf int SendStartMessage bool Command string Machine string // contains filtered or unexported fields }
func (*MachineOperationsJob) IsError ¶
func (job *MachineOperationsJob) IsError() bool
func (*MachineOperationsJob) IsInterrupted ¶
func (job *MachineOperationsJob) IsInterrupted() bool
func (*MachineOperationsJob) Response ¶
func (job *MachineOperationsJob) Response() interface{}
func (*MachineOperationsJob) Start ¶
func (job *MachineOperationsJob) Start(exitChannel chan bool)
func (*MachineOperationsJob) Status ¶
func (job *MachineOperationsJob) Status() bool
func (*MachineOperationsJob) Stop ¶
func (job *MachineOperationsJob) Stop()
func (*MachineOperationsJob) WaitFor ¶
func (job *MachineOperationsJob) WaitFor()
type SchedulerState ¶
type SchedulerState struct { Active bool Paused bool Pool []SchedulerTask }
type SchedulerTask ¶
type SchedulerTask struct { Id string Jobs []JobProcess Active bool Working bool LastIndex int State *state.StateContext }
func (*SchedulerTask) Abort ¶
func (task *SchedulerTask) Abort()
func (*SchedulerTask) Deactivate ¶
func (task *SchedulerTask) Deactivate()
func (*SchedulerTask) Execute ¶
func (task *SchedulerTask) Execute()
func (*SchedulerTask) Init ¶
func (task *SchedulerTask) Init(context *state.StateContext)
func (*SchedulerTask) IsRunning ¶
func (task *SchedulerTask) IsRunning() bool
func (*SchedulerTask) Wait ¶
func (task *SchedulerTask) Wait()
type SortGroupType ¶
type SortGroupType []ActivityGroup
func (SortGroupType) Len ¶
func (a SortGroupType) Len() int
func (SortGroupType) Less ¶
func (a SortGroupType) Less(i, j int) bool
func (SortGroupType) Swap ¶
func (a SortGroupType) Swap(i, j int)
type TaskProcess ¶
type TaskProcess interface { Run() IsRunning() bool Abort() Init(context *state.StateContext) Wait() Deactivate() }
Click to show internal directories.
Click to hide internal directories.