Hermes.Transport.Behaviour behaviour (hermes_mcp v0.3.6)

Defines the behavior that all transport implementations must follow.

Summary

Types

The JSON-RPC message encoded

t()

Types

message()

@type message() :: String.t()

The JSON-RPC message encoded

reason()

@type reason() :: term() | Hermes.MCP.Error.t()

t()

@type t() :: GenServer.server()

Callbacks

send_message(t, message)

@callback send_message(t(), message()) :: :ok | {:error, reason()}

shutdown(t)

@callback shutdown(t()) :: :ok | {:error, reason()}

start_link(keyword)

@callback start_link(keyword()) :: GenServer.on_start()