Lightning.Workers (Lightning v2.15.0-pre5)
View SourceLightning 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
@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 aDateTimestruct.
@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 aDateTimestruct.