Lightning.Workers (Lightning v2.14.5-pre1)
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 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.