View Source Lightning.Workers (Lightning v2.10.4)
Lightning uses external worker processes to execute workflow jobs.
This module deals with the security tokens and the formatting used on the communication with the workers.
Summary
Functions
Link to this function
generate_run_token(run, run_options \\ %Lightning.Runs.RunOptions{})
View Source@spec generate_run_token( Lightning.Run.t(), Lightning.Runs.RunOptions.t() ) :: binary()
@spec verify_run_token(binary(), map()) :: {:ok, Joken.claims()} | {:error, any()}
Verifies and validates a run token.
It requires a context map with the following keys:
:id
- the run id that the token was issued with.
Optionally takes a context map that will be passed to the validation:
:current_time
- the current time as aDateTime
struct.
@spec verify_worker_token(binary(), map()) :: {:ok, Joken.claims()} | {:error, any()}
Verifies and validates a worker token.
Optionally takes a context map that will be passed to the validation:
:current_time
- the current time as aDateTime
struct.