Hermes.Transport.SSE (hermes_mcp v0.2.2)

A transport implementation that uses Server-Sent Events (SSE) for receiving messages and HTTP POST requests for sending messages back to the server.

Examples

iex> Hermes.Transport.SSE.start_link(server_url: "http://localhost:4000")
{:ok, #PID<0.123.0>}

iex> Hermes.Transport.SSE.send_message(pid, "Hello, world!")

Options

The options schema for the SSE transport.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

option()

@type option() ::
  {:name, atom()}
  | {:client, pid() | atom()}
  | {:server_url, String.t()}
  | {:headers, map()}
  | Supervisor.init_option()

params_t()

@type params_t() :: Enumerable.t(option())

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_schema(atom)

options_schema(data)

options_schema!(data)