Documentation
¶
Index ¶
- func CreateLocalTestCluster() (*setup.Cmds, error)
- func CreateScootClient(addr string) *client.CloudScootClient
- func GenJobDefinition(rng *rand.Rand, numTasks int, snapshotID string) *scoot.JobDefinition
- func GenJobId(rng *rand.Rand) string
- func GenRandomAlphaNumericString(rng *rand.Rand) string
- func GenTask(rng *rand.Rand, taskID, snapshotID string) *scoot.TaskDefinition
- func GenTaskId(rng *rand.Rand) string
- func GenerateJob(numTasks int, snapshotID string) *scoot.JobDefinition
- func InstallBinaries() error
- func IsJobCompleted(s *scoot.JobStatus) bool
- func KillAndExit1(cmds *setup.Cmds, err error)
- func NewRand() *rand.Rand
- func PrintJobs(jobs map[string]*scoot.JobStatus)
- func StartJob(client *client.CloudScootClient, job *scoot.JobDefinition) string
- func WaitForClusterToBeReady(client scoot.CloudScoot)
- func WaitForJobsToCompleteAndLogStatus(jobIds []string, client scoot.CloudScoot, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLocalTestCluster ¶
Spins up a new Local Test Cluster in a separate goroutine. Returns the associated Cmds. To Kill the cluster run Kill() on return Cmds
func CreateScootClient ¶
func CreateScootClient(addr string) *client.CloudScootClient
Creates a CloudScootClient that talks to the specified address
func GenJobDefinition ¶
Generates a scoot.JobDefinition with numTasks tasks (or random if numTasks == -1)
func GenRandomAlphaNumericString ¶
Generates an AlphaNumericString of random length (0, 21]
func GenTask ¶
func GenTask(rng *rand.Rand, taskID, snapshotID string) *scoot.TaskDefinition
Generates a scoot.TaskDefinition TODO: actually make more realistic
func GenerateJob ¶
func GenerateJob(numTasks int, snapshotID string) *scoot.JobDefinition
Generates a random Job and sends it to the specified client to run returns the JobId if successfully scheduled, otherwise "", error
func InstallBinaries ¶
func InstallBinaries() error
func IsJobCompleted ¶
Returns true if a job is completed or failed, false otherwise
func KillAndExit1 ¶
func StartJob ¶
func StartJob(client *client.CloudScootClient, job *scoot.JobDefinition) string
func WaitForClusterToBeReady ¶
func WaitForClusterToBeReady(client scoot.CloudScoot)
Blocks until the cluster is ready, by pinging the GetStatus Api Until a successful response is returned.
func WaitForJobsToCompleteAndLogStatus ¶
func WaitForJobsToCompleteAndLogStatus( jobIds []string, client scoot.CloudScoot, timeout time.Duration, ) error
Waits until all jobs specified have completed running or the specified timeout has occurred. Periodically the status of running jobs is printed to the console
Types ¶
This section is empty.