ExMCP.Client.Middleware behaviour (ex_mcp v0.10.0)

View Source

Middleware pipeline for cross-cutting concerns in the ExMCP client.

This module will provide a composable middleware system for:

  • Telemetry and metrics
  • Rate limiting
  • Circuit breaking
  • Request/response logging
  • Error handling

Currently a placeholder for future implementation.

Summary

Functions

Executes a pipeline of middleware.

Types

context()

@type context() :: map()

middleware()

@type middleware() :: module()

Callbacks

call(context, next)

@callback call(context(), next :: fun()) :: {:ok, context()} | {:error, term()}

Functions

execute(context, middleware_list)

Executes a pipeline of middleware.