Skip to content

jcbym/workflow-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workflow-prototype

About

A Golang prototype for Kubernetes-native Nirmata workflows. Watches WorkflowTask Kubernetes custom resources and executes user-defined Go tasks upon resource creation. Tasks of different types may be assigned individually to different executors and run in parallel.

A Java implementation can be found here.

Usage

First, define a slice of Executors. The Executor struct contains Task, a user-defined function to be executed, TaskType, a string, and an integer ThreadPoolSize. This assigns tasks of type TaskType to an executor with a fixed thread pool of size ThreadPoolSize that runs Task.

executors := make([]app.Executor, 1)
executors[0] = app.Executor{Task: executeTestTask, TaskType: "type", ThreadPoolSize: 3}

app.Start() starts the workflow application by taking in a client-go config and the slice of executors.

app.Start(config, executors)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published