View Source Skitter.Runtime (Skitter v0.6.1)

Interface to the skitter runtime system.

Link to this section Summary

Types

Reference to a deployed workflow.

Functions

Deploy a workflow.

Get the workflow for a reference or context.

Get the current runtime mode.

Get the workflow node based on a context.

Get the name of the workflow node based on a context.

Get the reference based on a context.

Get a list with references to every spawned workflow.

Stop the workflow with reference ref.

Link to this section Types

@type ref() :: reference()

Reference to a deployed workflow.

Link to this section Functions

@spec deploy(Skitter.Workflow.t()) :: ref()

Deploy a workflow.

Starts a Skitter application (i.e. a workflow) by deploying it over the cluster. Returns a reference to the deployed workflow.

@spec get_workflow(ref() | Skitter.Strategy.context()) :: Skitter.Workflow.t()

Get the workflow for a reference or context.

The workflow will not have any in or out ports and only contain operation nodes, since deploy/1 flattens workflows before it deploys them.

@spec mode() :: :worker | :master | :local | :test

Get the current runtime mode.

This function returns the mode of the current runtime. The available modes and their goal are documented in the configuration documentation. This function may also return :test, which is only used for testing.

Link to this function

node_for_context(context)

View Source

Get the workflow node based on a context.

The workflow node will always be an operation node.

Link to this function

node_name_for_context(context)

View Source
@spec node_name_for_context(Skitter.Strategy.context()) :: Skitter.Workflow.name()

Get the name of the workflow node based on a context.

Link to this function

ref_for_context(context)

View Source
@spec ref_for_context(Skitter.Strategy.context()) :: ref()

Get the reference based on a context.

This can be used to link a telemetry event which contained a context to a deployed workflow.

@spec spawned_workflows() :: [ref()]

Get a list with references to every spawned workflow.

This function communicates with the master node when called from a worker runtime.

@spec stop(ref()) :: :ok

Stop the workflow with reference ref.