Liking cljdoc? Tell your friends :D

boundary.core.interceptor-context

Context schema and validation for interceptor pipelines.

Defines the structure and validation rules for the context map that flows through interceptor pipelines, ensuring consistent data flow and preventing common runtime errors.

Context schema and validation for interceptor pipelines.

Defines the structure and validation rules for the context map that flows
through interceptor pipelines, ensuring consistent data flow and preventing
common runtime errors.
raw docstring

add-breadcrumbclj

(add-breadcrumb context category action details)

Adds a breadcrumb for observability tracking.

Adds a breadcrumb for observability tracking.
sourceraw docstring

add-effect-errorclj

(add-effect-error context effect error)

Adds an effect execution error to the context.

Adds an effect execution error to the context.
sourceraw docstring

add-validation-errorclj

(add-validation-error context error-key error-details)

Adds a validation error to the context.

Adds a validation error to the context.
sourceraw docstring

Contextclj

Complete schema for interceptor context.

Complete schema for interceptor context.
sourceraw docstring

context-summaryclj

(context-summary context)

Creates a summary of context for debugging purposes.

Creates a summary of context for debugging purposes.
sourceraw docstring

create-cli-contextclj

(create-cli-context op system args options)

Creates context for CLI command processing.

Creates context for CLI command processing.
sourceraw docstring

create-http-contextclj

(create-http-context op system request)

Creates context for HTTP request processing.

Creates context for HTTP request processing.
sourceraw docstring

create-initial-contextclj

(create-initial-context op system & {:keys [request correlation-id tenant]})

Creates a properly structured initial context for pipeline execution.

Creates a properly structured initial context for pipeline execution.
sourceraw docstring

create-service-contextclj

(create-service-context op system data & {:keys [correlation-id]})

Creates context for internal service calls.

Creates context for internal service calls.
sourceraw docstring

default-error-mappingsclj

Default mapping of exception types to HTTP status codes and titles.

Default mapping of exception types to HTTP status codes and titles.
sourceraw docstring

EffectErrorclj

Schema for side effect execution errors.

Schema for side effect execution errors.
sourceraw docstring

fail-with-exceptionclj

(fail-with-exception context exception)

Marks context as failed and associates an exception.

Marks context as failed and associates an exception.
sourceraw docstring

get-correlation-idclj

(get-correlation-id context)

Extracts correlation ID from context.

Extracts correlation ID from context.
sourceraw docstring

get-error-reporterclj

(get-error-reporter context)

Extracts error reporter from system dependencies.

Extracts error reporter from system dependencies.
sourceraw docstring

get-interface-typeclj

(get-interface-type context)

Gets the interface type from context (:http, :cli, :service).

Gets the interface type from context (:http, :cli, :service).
sourceraw docstring

get-loggerclj

(get-logger context)

Extracts logger from system dependencies.

Extracts logger from system dependencies.
sourceraw docstring

get-metricsclj

(get-metrics context)

Extracts metrics collector from system dependencies.

Extracts metrics collector from system dependencies.
sourceraw docstring

get-operationclj

(get-operation context)

Safely extracts operation from context.

Safely extracts operation from context.
sourceraw docstring

get-request-dataclj

(get-request-data context)
(get-request-data context key-path)

Safely extracts request data from context.

Safely extracts request data from context.
sourceraw docstring

get-responseclj

(get-response context)

Extracts response from context.

Extracts response from context.
sourceraw docstring

get-resultclj

(get-result context)
(get-result context key-path)

Extracts result from context.

Extracts result from context.
sourceraw docstring

get-serviceclj

(get-service context)

Gets the service/user-service from system dependencies.

Gets the service/user-service from system dependencies.
sourceraw docstring

get-system-dependencyclj

(get-system-dependency context dependency-key)

Safely extracts system dependency from context.

Safely extracts system dependency from context.
sourceraw docstring

get-timingclj

(get-timing context)
(get-timing context timing-key)

Extracts timing information from context.

Extracts timing information from context.
sourceraw docstring

halted?clj

(halted? context)

Checks if pipeline execution should be halted.

Args: context: Interceptor context map

Returns: Boolean indicating halt flag status

Checks if pipeline execution should be halted.

Args:
  context: Interceptor context map

Returns:
  Boolean indicating halt flag status
sourceraw docstring

has-errors?clj

(has-errors? context)

Checks if context contains validation or domain errors.

Args: context: Interceptor context map

Returns: Boolean indicating error presence

Checks if context contains validation or domain errors.

Args:
  context: Interceptor context map

Returns:
  Boolean indicating error presence
sourceraw docstring

has-result?clj

(has-result? context)

Checks if context contains a result from core function execution.

Args: context: Interceptor context map

Returns: Boolean indicating result presence

Checks if context contains a result from core function execution.

Args:
  context: Interceptor context map

Returns:
  Boolean indicating result presence
sourceraw docstring

merge-contextclj

(merge-context context additional-data)

Safely merges additional data into context.

Safely merges additional data into context.
sourceraw docstring

record-end-timeclj

(record-end-time context)

Records operation end time and calculates duration.

Records operation end time and calculates duration.
sourceraw docstring

record-start-timeclj

(record-start-time context)

Records operation start time in nanoseconds.

Records operation start time in nanoseconds.
sourceraw docstring

Requestclj

Schema for request data (HTTP, CLI, or service call).

Schema for request data (HTTP, CLI, or service call).
sourceraw docstring

Responseclj

Schema for final response data.

Schema for final response data.
sourceraw docstring

Resultclj

Schema for core function results.

Schema for core function results.
sourceraw docstring

sanitize-context-for-loggingclj

(sanitize-context-for-logging context)

Removes sensitive data from context for safe logging.

Removes sensitive data from context for safe logging.
sourceraw docstring

success?clj

(success? context)

Checks if the operation was successful based on result status.

Args: context: Interceptor context map

Returns: Boolean indicating operation success

Checks if the operation was successful based on result status.

Args:
  context: Interceptor context map

Returns:
  Boolean indicating operation success
sourceraw docstring

SystemDepsclj

Schema for the system dependency injection map.

Schema for the system dependency injection map.
sourceraw docstring

Timingclj

Schema for timing measurements.

Schema for timing measurements.
sourceraw docstring

update-timingclj

(update-timing context timing-key value)

Updates timing information in context.

Updates timing information in context.
sourceraw docstring

validate-contextclj

(validate-context context)

Validates context map against schema. Returns {:valid? true :data context} or {:valid? false :errors [...]}.

Validates context map against schema.
Returns {:valid? true :data context} or {:valid? false :errors [...]}.
sourceraw docstring

validate-context!clj

(validate-context! context)

Validates context and throws exception if invalid.

Validates context and throws exception if invalid.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close