Documentation
¶
Overview ¶
Package compute is togo's compute capability — submitting batch/stream jobs to a pluggable engine. It is distinct from togo's `worker` (supervised background goroutine workers) and `queue` (app job dispatch): compute is for data/compute engines (Apache Beam, Spark, Flink, Databricks), selectable at runtime.
This repo is the MAIN plugin: it defines the Compute contract and ships the built-in `local` backend (runs the job as a local process). Engine backends live in their own repos (compute-beam, compute-spark, compute-flink, compute-databricks) and register into the same slot; pick one with `togo provider:use compute <name>` (or TOGO_COMPUTE_PROVIDER).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compute ¶
Compute submits jobs to an engine. The built-in `local` backend runs them as a local process; engine backends submit to Spark/Beam/Flink/Databricks.
func FromKernel ¶
FromKernel returns the active Compute backend (or nil if none registered).
type Job ¶
type Job struct {
Name string `json:"name"`
Cmd []string `json:"cmd"`
Env map[string]string `json:"env,omitempty"`
Args map[string]string `json:"args,omitempty"` // engine-specific options
}
Job is a unit of compute work. Cmd is the command (entrypoint + args) the engine runs — a script/binary locally, or a jar/module submitted to Spark/Beam.