ExBifrost.Api.Infrastructure (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Infrastructure.

Summary

Functions

Prometheus metrics Returns Prometheus-formatted metrics for monitoring.

MCP protocol message Receives a JSON-RPC 2.0 message for the MCP protocol server. Returns a JSON-RPC 2.0 response, or null for notifications.

MCP protocol SSE stream Opens a Server-Sent Events stream for the MCP protocol server. Returns Content-Type: text/event-stream.

WebSocket connection Upgrades to a WebSocket connection for real-time updates. Server pushes log events, MCP log events, and store update notifications. Heartbeat pings are sent every 30 seconds.

Functions

get_metrics(connection, opts \\ [])

@spec get_metrics(
  Tesla.Env.client(),
  keyword()
) :: {:ok, String.t()} | {:error, Tesla.Env.t()}

Prometheus metrics Returns Prometheus-formatted metrics for monitoring.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

mcp_server_message(connection, mcp_server_message_request, opts \\ [])

MCP protocol message Receives a JSON-RPC 2.0 message for the MCP protocol server. Returns a JSON-RPC 2.0 response, or null for notifications.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • mcp_server_message_request (McpServerMessageRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.McpServerMessage200Response.t} on success
  • {:error, Tesla.Env.t} on failure

mcp_server_sse(connection, opts \\ [])

@spec mcp_server_sse(
  Tesla.Env.client(),
  keyword()
) :: {:ok, String.t()} | {:error, Tesla.Env.t()}

MCP protocol SSE stream Opens a Server-Sent Events stream for the MCP protocol server. Returns Content-Type: text/event-stream.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

websocket_connect(connection, opts \\ [])

@spec websocket_connect(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

WebSocket connection Upgrades to a WebSocket connection for real-time updates. Server pushes log events, MCP log events, and store update notifications. Heartbeat pings are sent every 30 seconds.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure