Documentation ¶
Index ¶
- Variables
- func GenerateCheckSimulationNotOfKindJob(config ConfigCheckSimulationNotOfKindJob) *actions.Job
- func GenerateCheckStatusJob(config CheckStatusJobConfig) *actions.Job
- func GenerateSetSimulationStatusJob(config GenerateSetSimulationStatusConfig) *actions.Job
- type CheckStatusJobConfig
- type ConfigCheckSimulationNotOfKindJob
- type GenerateSetSimulationStatusConfig
Constants ¶
This section is empty.
Variables ¶
var AddRunningSimulation = &actions.Job{ Name: "add-running-simulation", PreHooks: []actions.JobFunc{setStartState}, Execute: addRunningSimulation, PostHooks: []actions.JobFunc{returnState}, RollbackHandler: revertAddingRunningSimulation, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), }
AddRunningSimulation is job in charge of adding a running simulation to the list of running simulations.
var ChargeUser = &actions.Job{ Name: "charge-user", PreHooks: []actions.JobFunc{setStopState}, Execute: chargeUser, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
ChargeUser is a job that charges a user after a simulation has finished for the time it has been running.
var CheckSimulationNoErrors = jobs.CheckSimulationNoError.Extend(actions.Job{ Name: "check-sim-no-errors", PreHooks: []actions.JobFunc{createCheckSimulationNoErrorInput}, PostHooks: []actions.JobFunc{checkNoErrorOutput, returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
CheckSimulationNoErrors checks that a group of simulations don't have errors.
var CheckSimulationPendingStatus = GenerateCheckStatusJob(CheckStatusJobConfig{ Name: "check-simulation-pending-status", Status: simulations.StatusPending, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, generateCheckStartSimulationStatusInputPreHook(simulations.StatusPending)}, })
CheckSimulationPendingStatus is used to check that a certain simulation has the pending status.
var CheckSimulationTerminateRequestedStatus = GenerateCheckStatusJob(CheckStatusJobConfig{ Name: "check-simulation-terminate-requested-status", Status: simulations.StatusTerminateRequested, InputType: &state.StopSimulation{}, OutputType: &state.StopSimulation{}, PreHooks: []actions.JobFunc{setStopState, generateCheckStopSimulationStatusInputPreHook(simulations.StatusTerminateRequested)}, })
CheckSimulationTerminateRequestedStatus is used to check that a certain simulation has the terminate requested status.
var CheckStartSimulationIsNotParent = GenerateCheckSimulationNotOfKindJob( ConfigCheckSimulationNotOfKindJob{ Name: "check-start-simulation-no-parent", Kind: simulations.SimParent, PreHooks: []actions.JobFunc{setStartState}, PreparationPreHook: generateCheckStartSimulationNotOfKindInputPreHook(simulations.SimParent), InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, }, )
CheckStartSimulationIsNotParent is a job in charge of checking if a simulation is not a parent simulation.
var CheckStopSimulationIsNotParent = GenerateCheckSimulationNotOfKindJob( ConfigCheckSimulationNotOfKindJob{ Name: "check-stop-simulation-no-parent", Kind: simulations.SimParent, PreHooks: []actions.JobFunc{setStopState}, PreparationPreHook: generateCheckStopSimulationNotOfKindInputPreHook(simulations.SimParent), InputType: &state.StopSimulation{}, OutputType: &state.StopSimulation{}, }, )
CheckStopSimulationIsNotParent is a job in charge of checking if a simulation is not a parent simulation.
var ConfigureIngressGloo = jobs.ConfigureIngress.Extend(actions.Job{ Name: "configure-ingress-gloo", PreHooks: []actions.JobFunc{setStartState, prepareConfigureIngressInputUsingGloo}, PostHooks: []actions.JobFunc{checkConfigureIngressError, returnState}, RollbackHandler: rollbackGlooIngress, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
ConfigureIngressGloo is a job extending the generic jobs.ConfigureIngress job that will configure Gloo to accept websocket connections to the gzserver instance.
var CreateNetworkPolicyCommsBridges = jobs.CreateNetworkPolicies.Extend(actions.Job{ Name: "create-netpol-comms-bridges", PreHooks: []actions.JobFunc{setStartState, prepareNetworkPolicyCommsBridgesInput}, PostHooks: []actions.JobFunc{checkCreateNetworkPoliciesError, returnState}, RollbackHandler: removeCreatedNetworkPoliciesCommsBridge, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
CreateNetworkPolicyCommsBridges extends the generic jobs.CreateNetworkPolicies to create a network policy for the different comms bridges.
var CreateNetworkPolicyFieldComputers = jobs.CreateNetworkPolicies.Extend(actions.Job{ Name: "create-netpol-field-computers", PreHooks: []actions.JobFunc{setStartState, prepareNetworkPolicyFieldComputersInput}, PostHooks: []actions.JobFunc{checkCreateNetworkPoliciesError, returnState}, RollbackHandler: removeCreatedNetworkPoliciesFieldComputer, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
CreateNetworkPolicyFieldComputers extends the generic jobs.CreateNetworkPolicies to create a network policy for the different field computers.
var CreateNetworkPolicyGazeboServer = jobs.CreateNetworkPolicies.Extend(actions.Job{ Name: "create-netpol-gzserver", PreHooks: []actions.JobFunc{setStartState, prepareNetworkPolicyGazeboServerInput}, PostHooks: []actions.JobFunc{checkCreateNetworkPoliciesError, returnState}, RollbackHandler: removeCreatedNetworkPolicyGazeboServer, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
CreateNetworkPolicyGazeboServer extends the generic jobs.CreateNetworkPolicies to create a network policy for the gazebo server
var CreateNetworkPolicyMappingServer = jobs.CreateNetworkPolicies.Extend(actions.Job{ Name: "create-netpol-mapping-server", PreHooks: []actions.JobFunc{setStartState, prepareNetworkPolicyMappingServerInput}, PostHooks: []actions.JobFunc{checkCreateNetworkPoliciesError, returnState}, RollbackHandler: removeCreatedNetworkPoliciesMappingServer, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
CreateNetworkPolicyMappingServer extends the generic jobs.CreateNetworkPolicies to create a network policy for the mapping server.
var DisconnectWebsocket = &actions.Job{ Name: "disconnect-websocket", PreHooks: []actions.JobFunc{setStopState}, Execute: disconnectWebsocket, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
DisconnectWebsocket is a job in charge of disconnecting the websocket client.
var GetCommsBridgePodIP = &actions.Job{ Name: "get-comms-bridge-pod-ip", PreHooks: []actions.JobFunc{setStartState}, Execute: getCommsBridgeIP, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), }
GetCommsBridgePodIP is a job in charge of getting the IP from the simulation's comms bridge pods. WaitForCommsBridgePodIPs should be run before running this job.
var GetGazeboIP = &actions.Job{ Name: "get-gzserver-pod-ip", PreHooks: []actions.JobFunc{setStartState}, Execute: getGazeboIP, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), }
GetGazeboIP is a job in charge of getting the IP from the simulation's gazebo server pod. WaitForGazeboServerPod should be run before running this job.
var GetMappingServerIP = &actions.Job{ Name: "get-mapping-server-pod-ip", PreHooks: []actions.JobFunc{setStartState}, Execute: getMappingServerIP, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), }
GetMappingServerIP is a job in charge of getting the IP from the simulation's mapping server pod. WaitForMappingServerPod should be run before running this job.
var LaunchCommsBridgeCopyPods = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-comms-bridge-copy-pods", PreHooks: []actions.JobFunc{setStartState, prepareCommsBridgeCreateCopyPodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchCommsBridgeCopyPods, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchCommsBridgeCopyPods launches the list of comms bridge copy pods.
var LaunchCommsBridgePods = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-comms-bridge-pods", PreHooks: []actions.JobFunc{setStartState, prepareCommsBridgePodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchCommsBridgePods, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchCommsBridgePods launches the list of comms bridge and copy pods.
var LaunchFieldComputerPods = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-field-computer-pods", PreHooks: []actions.JobFunc{setStartState, prepareFieldComputerPodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchFieldComputerPods, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchFieldComputerPods launches the list of field computer pods.
var LaunchGazeboServerCopyPod = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-gzserver-copy-pod", PreHooks: []actions.JobFunc{setStartState, prepareGazeboCreateCopyPodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchGazeboServerCopyPod, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchGazeboServerCopyPod launches a gazebo server copy pod.
var LaunchGazeboServerPod = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-gzserver-pod", PreHooks: []actions.JobFunc{setStartState, prepareGazeboCreatePodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchGazeboServerPod, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchGazeboServerPod launches a gazebo server pod.
var LaunchInstances = jobs.LaunchInstances.Extend(actions.Job{ Name: "launch-instances", PreHooks: []actions.JobFunc{setStartState, createLaunchInstancesInput}, PostHooks: []actions.JobFunc{checkLaunchInstancesOutput, saveLaunchInstancesOutput, returnState}, RollbackHandler: removeLaunchedInstances, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchInstances is a job that is used to launch machine instances for simulations.
var LaunchMappingServerCopyPod = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-mapping-copy-pod", PreHooks: []actions.JobFunc{setStartState, prepareMappingCopyPodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchMappingServerCopyPod, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchMappingServerCopyPod launches a mapping server copy pod.
var LaunchMappingServerPod = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-mapping-server-pod", PreHooks: []actions.JobFunc{setStartState, prepareMappingCreatePodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchMappingServerPod, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchMappingServerPod launches a mapping server pod.
var LaunchMoleBridgePod = jobs.LaunchPods.Extend(actions.Job{ Name: "launch-mole-bridge-pod", PreHooks: []actions.JobFunc{setStartState, prepareMoleBridgePodInput}, PostHooks: []actions.JobFunc{checkLaunchPodsError, returnState}, RollbackHandler: rollbackLaunchMoleBridgePod, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchMoleBridgePod launches a mole bridge pod.
var LaunchWebsocketService = jobs.LaunchWebsocketService.Extend(actions.Job{ Name: "launch-websocket-service", PreHooks: []actions.JobFunc{setStartState, prepareLaunchWebsocketServiceInput}, PostHooks: []actions.JobFunc{checkLaunchServiceError, returnState}, RollbackHandler: rollbackLaunchWebsocketService, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
LaunchWebsocketService is a job extending the generic jobs.LaunchWebsocketService to launch a websocket service running inside the gazebo server pod.
var ReadRunData = &actions.Job{ Name: "read-simulation-run-data", PreHooks: []actions.JobFunc{setStopState}, Execute: readRunData, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
ReadRunData is a job in charge of reading the run data from a gzserver copy pod for the simulation that is being processed.
var ReadScore = &actions.Job{ Name: "read-simulation-score", PreHooks: []actions.JobFunc{setStopState}, Execute: readScore, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
ReadScore is a job in charge of reading the score from a gzserver copy pod for the simulation that is being processed.
var ReadStats = &actions.Job{ Name: "read-simulation-stats", PreHooks: []actions.JobFunc{setStopState}, Execute: readStats, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
ReadStats is a job in charge of reading the statistics from a gzserver copy pod for the simulation that is being processed.
var RemoveIngressRulesGloo = jobs.RemoveIngressRules.Extend(actions.Job{ Name: "remove-ingress-rules-gloo", PreHooks: []actions.JobFunc{setStopState, getUpstream, prepareRemoveIngressRulesInput}, PostHooks: []actions.JobFunc{checkRemoveIngressRulesError, returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), })
RemoveIngressRulesGloo is a job extending the generic jobs.RemoveIngressRules job that will remove rules from the Gloo ingress.
var RemoveInstances = jobs.RemoveInstances.Extend(actions.Job{ Name: "remove-instances", PreHooks: []actions.JobFunc{setStopState, prepareRemoveInstancesInput}, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), })
RemoveInstances is a job in charge of removing all machines for a certain simulation.
var RemoveNetworkPolicies = jobs.RemoveNetworkPolicies.Extend(actions.Job{ Name: "remove-network-policies", PreHooks: []actions.JobFunc{setStopState, prepareRemoveNetworkPoliciesInput}, PostHooks: []actions.JobFunc{checkRemoveNetworkPoliciesError, returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), })
RemoveNetworkPolicies is a specific subt job to remove network policies applied to the ignition gazebo server, field computer pods and comms bridges.
var RemovePods = jobs.RemovePods.Extend(actions.Job{ Name: "remove-pods", PreHooks: []actions.JobFunc{setStopState, prepareRemovePodsInput}, PostHooks: []actions.JobFunc{checkRemovePodsNoError, returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), })
RemovePods extends the generic jobs.RemovePods job. It's in charge of removing simulation pods.
var RemoveRunningSimulation = &actions.Job{ Name: "remove-running-simulation", PreHooks: []actions.JobFunc{setStopState}, Execute: removeRunningSimulation, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
RemoveRunningSimulation is job in charge of removing a running simulation from the list of running simulations.
var RemoveWebsocketService = jobs.RemoveWebsocketService.Extend(actions.Job{ Name: "remove-websocket-service", PreHooks: []actions.JobFunc{setStopState, prepareRemoveWebsocketServiceInput}, PostHooks: []actions.JobFunc{checkRemoveWebsocketServiceError, returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), })
RemoveWebsocketService is a job extending the generic jobs.RemoveWebsocketService to remove the websocket service pointing to the Ignition Gazebo Server inside the
var SaveScore = &actions.Job{ Name: "save-simulation-score", PreHooks: []actions.JobFunc{setStopState}, Execute: saveScore, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
SaveScore is a job in charge of persisting the score from a certain simulation
var SaveSummary = &actions.Job{ Name: "save-simulation-summary", PreHooks: []actions.JobFunc{setStopState}, Execute: saveSummary, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
SaveSummary is a job in charge of persisting the summary of a certain simulation
var SendSummaryEmail = &actions.Job{ Name: "send-summary-email", PreHooks: []actions.JobFunc{setStopState}, Execute: sendSummaryEmail, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
SendSummaryEmail is a job in charge of sending an email to participants with the simulation's statistics and score.
var SetRate = &actions.Job{ Name: "set-rate", PreHooks: []actions.JobFunc{setStartState}, Execute: setRate, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), }
SetRate is a job in charge of setting Rate field for a certain simulation in order to charge the user when the simulation is marked as completed.
var SetSimulationStatusToDeletingNodes = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-deleting-nodes", Status: simulations.StatusDeletingNodes, InputType: &state.StopSimulation{}, OutputType: &state.StopSimulation{}, PreHooks: []actions.JobFunc{setStopState, returnGroupIDFromStopState}, })
SetSimulationStatusToDeletingNodes is used to set a simulation status to deleting nodes.
var SetSimulationStatusToDeletingPods = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-deleting-pods", Status: simulations.StatusDeletingPods, InputType: &state.StopSimulation{}, OutputType: &state.StopSimulation{}, PreHooks: []actions.JobFunc{setStopState, returnGroupIDFromStopState}, })
SetSimulationStatusToDeletingPods is used to set a simulation status to deleting pods.
var SetSimulationStatusToLaunchInstances = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-launch-instances", Status: simulations.StatusLaunchingInstances, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, returnGroupIDFromStartState}, PostHooks: nil, })
SetSimulationStatusToLaunchInstances is used to set a simulation status to launch instances.
var SetSimulationStatusToLaunchPods = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-launch-pods", Status: simulations.StatusLaunchingPods, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, returnGroupIDFromStartState}, PostHooks: nil, })
SetSimulationStatusToLaunchPods is used to set a simulation status to launching pods.
var SetSimulationStatusToProcessingResults = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-processing-results", Status: simulations.StatusProcessingResults, InputType: &state.StopSimulation{}, OutputType: &state.StopSimulation{}, PreHooks: []actions.JobFunc{setStopState, returnGroupIDFromStopState}, })
SetSimulationStatusToProcessingResults is used to set a simulation status to processing results.
var SetSimulationStatusToRunning = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-running", Status: simulations.StatusRunning, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, returnGroupIDFromStartState}, PostHooks: nil, })
SetSimulationStatusToRunning is used to set a simulation status to running.
var SetSimulationStatusToTerminated = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-terminated", Status: simulations.StatusTerminated, InputType: &state.StopSimulation{}, OutputType: &state.StopSimulation{}, PreHooks: []actions.JobFunc{setStopState, returnGroupIDFromStopState}, })
SetSimulationStatusToTerminated is used to set a simulation status to terminated.
var SetSimulationStatusToWaitInstances = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-wait-instances", Status: simulations.StatusWaitingInstances, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, returnGroupIDFromStartState}, PostHooks: nil, })
SetSimulationStatusToWaitInstances is used to set a simulation status to waiting instances.
var SetSimulationStatusToWaitNodes = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-wait-nodes", Status: simulations.StatusWaitingNodes, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, returnGroupIDFromStartState}, PostHooks: nil, })
SetSimulationStatusToWaitNodes is used to set a simulation status to waiting nodes.
var SetSimulationStatusToWaitPods = GenerateSetSimulationStatusJob(GenerateSetSimulationStatusConfig{ Name: "set-simulation-status-wait-pods", Status: simulations.StatusWaitingPods, InputType: &state.StartSimulation{}, OutputType: &state.StartSimulation{}, PreHooks: []actions.JobFunc{setStartState, returnGroupIDFromStartState}, })
SetSimulationStatusToWaitPods is used to set a simulation status to waiting pods.
var SetStoppedAt = &actions.Job{ Name: "set-stopped-at", PreHooks: []actions.JobFunc{setStopState}, Execute: setStoppedAt, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
SetStoppedAt is a job in charge of setting StoppedAt field from a certain simulation to the time of when it has been stopped.
var SetWebsocketConnection = &actions.Job{ Name: "set-ws-conn", PreHooks: []actions.JobFunc{setStartState}, Execute: connectWebsocket, PostHooks: []actions.JobFunc{returnState}, RollbackHandler: revertWebsocketConnection, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), }
SetWebsocketConnection is a job in charge of setting a websocket connection to the Ignition Gazebo server.
var UploadLogs = &actions.Job{ Name: "upload-simulation-logs", PreHooks: []actions.JobFunc{setStopState}, Execute: uploadLogs, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StopSimulation{}), OutputType: actions.GetJobDataType(&state.StopSimulation{}), }
UploadLogs is a job in charge of uploading simulation logs.
var WaitForCommsBridgePodIPs = jobs.Wait.Extend(actions.Job{ Name: "wait-comms-bridge-pods-ips", PreHooks: []actions.JobFunc{createWaitRequestForCommsBridgePod}, PostHooks: []actions.JobFunc{checkWaitError, returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitForCommsBridgePodIPs waits for the simulation comms bridge pods to have an IP.
var WaitForCommsBridgePodsReady = jobs.Wait.Extend(actions.Job{ Name: "wait-comms-bridge-pods-ready", PreHooks: []actions.JobFunc{createWaitRequestForCommsBridgePodToBeReady}, PostHooks: []actions.JobFunc{checkWaitError, returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitForCommsBridgePodsReady waits for the simulation comms bridge pods to be ready.
var WaitForGazeboServerPod = jobs.Wait.Extend(actions.Job{ Name: "wait-gazebo-server-pod", PreHooks: []actions.JobFunc{createWaitRequestForGzServerPod}, PostHooks: []actions.JobFunc{checkWaitError, returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitForGazeboServerPod waits for the simulation Gazebo pod to finish launching.
var WaitForInstances = jobs.WaitForInstances.Extend(actions.Job{ Name: "wait-for-instances", PreHooks: []actions.JobFunc{createWaitForInstancesInput}, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitForInstances is the job in charge of waiting for instances to be OK.
var WaitForMappingServerPod = jobs.Wait.Extend(actions.Job{ Name: "wait-mapping-server-pod", PreHooks: []actions.JobFunc{createWaitRequestMappingServerPod}, PostHooks: []actions.JobFunc{checkMappingServerWaitError, returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitForMappingServerPod waits for the simulation mapping server pod to finish launching.
var WaitForNodes = jobs.Wait.Extend(actions.Job{ Name: "wait-for-nodes", PreHooks: []actions.JobFunc{setStartState, createWaitForNodesInput}, PostHooks: []actions.JobFunc{checkWaitError, returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitForNodes is the job in charge of waiting until all the simulation instances have joined the cluster and have been marked as ready.
var WaitSimulationPods = jobs.Wait.Extend(actions.Job{ Name: "wait-simulation-pods", PreHooks: []actions.JobFunc{setStartState, createSimulationWaitRequest}, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitSimulationPods is a job extending the generic jobs.Wait to wait for all simulation pods to be ready.
var WaitUpstream = jobs.Wait.Extend(actions.Job{ Name: "wait-upstream-gloo", PreHooks: []actions.JobFunc{setStartState, createWaitRequestForUpstream}, PostHooks: []actions.JobFunc{returnState}, InputType: actions.GetJobDataType(&state.StartSimulation{}), OutputType: actions.GetJobDataType(&state.StartSimulation{}), })
WaitUpstream is a job extending the generic jobs.Wait to wait for an upstream to be available.
Functions ¶
func GenerateCheckSimulationNotOfKindJob ¶
func GenerateCheckSimulationNotOfKindJob(config ConfigCheckSimulationNotOfKindJob) *actions.Job
GenerateCheckSimulationNotOfKindJob is a job generator for checking that a certain simulation is not of a certain kind.
func GenerateCheckStatusJob ¶
func GenerateCheckStatusJob(config CheckStatusJobConfig) *actions.Job
GenerateCheckStatusJob generates checkers that assert that a simulation has a certain status.
func GenerateSetSimulationStatusJob ¶
func GenerateSetSimulationStatusJob(config GenerateSetSimulationStatusConfig) *actions.Job
GenerateSetSimulationStatusJob generates a job from jobs.SetSimulationStatus to set a certain status to a simulation.
Types ¶
type CheckStatusJobConfig ¶
type CheckStatusJobConfig struct { Name string PreHooks []actions.JobFunc PostHooks []actions.JobFunc Status simulations.Status InputType interface{} OutputType interface{} }
CheckStatusJobConfig is used to configure a job generated by GenerateCheckStatusJob.
type ConfigCheckSimulationNotOfKindJob ¶
type ConfigCheckSimulationNotOfKindJob struct { // Name is the name of the job. Name string // Kind is the Kind that should be compared. Kind simulations.Kind // PreHooks are the pre-hooks that should go before the PreparationPreHook. PreHooks []actions.JobFunc // PreparationPreHook is a single pre-hook in charge of setting the input for the CheckSimulationKind generic job. PreparationPreHook actions.JobFunc // InputType is the job's input type. InputType interface{} // OutputType is the job's output type. OutputType interface{} }
ConfigCheckSimulationNotOfKindJob is used to configure the job returned by the GenerateCheckSimulationNotOfKindJob function.
type GenerateSetSimulationStatusConfig ¶
type GenerateSetSimulationStatusConfig struct { Name string Status simulations.Status InputType interface{} OutputType interface{} PreHooks []actions.JobFunc PostHooks []actions.JobFunc }
GenerateSetSimulationStatusConfig is the config needed by GenerateSetSimulationStatusJob to configure a new job.
Source Files ¶
- add_running_simulation.go
- charge_user.go
- check_sim_no_errors.go
- check_sim_no_parent.go
- check_statuses.go
- common.go
- create_netpols.go
- disconnect_websocket.go
- generator_check_kind.go
- generator_check_status.go
- generator_set_status.go
- get_comms_bridge_ip.go
- get_gazebo_ip.go
- get_mapping_server_ip.go
- gloo_configure_ingress.go
- gloo_remove_ingress_rule.go
- launch_comms_bridge_copy_pods.go
- launch_comms_bridge_pods.go
- launch_field_computer_pods.go
- launch_gzserver_copy_pod.go
- launch_gzserver_pod.go
- launch_instances.go
- launch_mapping_server_copy_pod.go
- launch_mapping_server_pod.go
- launch_mole_bridge_pod.go
- launch_websocket_service.go
- read_run_data.go
- read_score.go
- read_stats.go
- remove_instances.go
- remove_netpols.go
- remove_pods.go
- remove_running_simulation.go
- remove_websocket_service.go
- save_score.go
- save_summary.go
- send_summary_email.go
- set_rate.go
- set_stopped_at.go
- set_ws_conn.go
- sim_statuses.go
- upload_logs.go
- wait_comms_bridge_pod.go
- wait_comms_bridge_pods_ready.go
- wait_gzserver_pod.go
- wait_instances.go
- wait_mapping_server_pod.go
- wait_nodes.go
- wait_simulation_pods.go
- wait_upstream.go