Node Executors are the functional units of the Certimate workflow engine. Each executor is responsible for a specific stage of the certificate lifecycle, ranging from ACME issuance and deployment to monitoring and notification. They operate within a NodeExecutionContext internal/workflow/engine/context.go7-17 and return a NodeExecutionResult internal/workflow/engine/executor.go17-25 which the engine uses to update the global VariableManager and InOutManager.
All executors implement the NodeExecutor interface internal/workflow/engine/executor.go10-15 and typically embed the nodeExecutor base struct to inherit logging and common repository access. The engine maps NodeType constants internal/domain/workflow.go91-105 to specific implementations during the Invoke process internal/workflow/engine/engine.go61-99
Executors interact with two primary state managers:
VariableManager: Stores key-value pairs (e.g., certificate.daysLeft) used for template rendering and condition evaluation internal/workflow/engine/state.go37-50InOutManager: Manages artifacts (like certificate IDs) passed between nodes via references internal/workflow/engine/state.go180-189The following diagram bridges the workflow configuration names to their corresponding Go implementation structs and logic.
Executor Implementation Map
Sources: internal/workflow/engine/executor_bizapply.go54-60 internal/workflow/engine/executor_bizdeploy.go21-27 internal/workflow/engine/executor_bizmonitor.go31-35 internal/workflow/engine/executor_biznotify.go15-19 internal/workflow/engine/executor_bizupload.go36-41 internal/workflow/engine/executor_delay.go11-13 internal/workflow/engine/executor_condition.go11-13 internal/workflow/engine/executor_trycatch.go11-13
The bizApplyNodeExecutor handles the automated issuance of certificates via ACME.
mproc package to prevent memory leaks or crashes in the main process from third-party ACME libraries. This behavior is controlled by the CERTIMATE_WORKFLOW_MULTIPROC environment variable internal/workflow/engine/executor_bizapply.go27-31 The Sender in mproc handles encrypted IPC via temporary files internal/tools/mproc/sender.go33-185lastOutput (saved in workflow_output). If domains, providers, or keys haven't changed and the certificate is still valid, it skips the request internal/workflow/engine/executor_bizapply.go159-210IsRenewed status of the previous certificate internal/workflow/engine/executor_bizapply.go127-131Sources: internal/workflow/engine/executor_bizapply.go62-138 internal/workflow/engine/executor_bizapply.go237-250 internal/tools/mproc/sender.go83-95
The bizDeployNodeExecutor pushes a certificate to a target provider (e.g., Alibaba Cloud, AWS, SSH).
nodeId#certId) stored in the InOutManager internal/workflow/engine/executor_bizdeploy.go46-60SkipOnLastSucceeded, the node will skip deployment if the previous run of this specific node succeeded and the input certificate hasn't been updated since that run internal/workflow/engine/executor_bizdeploy.go121-141certmgmt.NewClient to perform the actual deployment via the DeployCertificate method internal/workflow/engine/executor_bizdeploy.go92-103Sources: internal/workflow/engine/executor_bizdeploy.go29-110
The bizUploadNodeExecutor allows importing existing certificates into the workflow.
form (direct text), local (file path), and url (HTTP GET via resty) internal/workflow/engine/executor_bizupload.go87-133xcert.ParseCertificateFromPEM internal/workflow/engine/executor_bizupload.go144-146 and verifies the public key matches the provided private key using RSA, ECDSA, or Ed25519 equality checks internal/workflow/engine/executor_bizupload.go151-174certificate collection with source type CertificateSourceTypeUpload internal/workflow/engine/executor_bizupload.go177-189Sources: internal/workflow/engine/executor_bizupload.go49-197
The bizMonitorNodeExecutor performs a live TLS handshake with a target host to verify the deployed certificate.
cert.VerifyHostname internal/workflow/engine/executor_bizmonitor.go94-115certificate.daysLeft and certificate.validity for use in subsequent condition nodes internal/workflow/engine/executor_bizmonitor.go160-192Sources: internal/workflow/engine/executor_bizmonitor.go37-120
The bizNotifyNodeExecutor sends alerts via configured channels (Email, Telegram, Matrix, etc.).
{{ $run.id }}) and special variables like {{ $now }} internal/workflow/engine/executor_biznotify.go44-66SkipOnAllPrevSkipped) by checking the stateVarKeyNodeSkipped variable across all scopes internal/workflow/engine/executor_biznotify.go86-106Sources: internal/workflow/engine/executor_biznotify.go21-84
The conditionNodeExecutor acts as a container for multiple branchBlock nodes internal/workflow/engine/executor_condition.go15-49
branchBlock evaluates a string-based expression using the Expression.Eval method internal/workflow/engine/executor_condition.go78-82ValueString() and passed to the evaluator as a map internal/workflow/engine/executor_condition.go68-76The tryCatchNodeExecutor provides error handling internal/workflow/engine/executor_trycatch.go15-70
try block. If any node returns an error, it proceeds to execute the catch block. If errors occur in the try block, it returns an ErrBlocksException internal/workflow/engine/executor_trycatch.go25-67The delayNodeExecutor pauses execution for a configurable duration in seconds. It uses xwait.DelayWithContext to ensure the wait is interruptible if the workflow context is cancelled internal/workflow/engine/executor_delay.go15-24
Sources: internal/workflow/engine/executor_condition.go11-101 internal/workflow/engine/executor_trycatch.go11-130 internal/workflow/engine/executor_delay.go11-24
Refresh this wiki