Endpoint

jsonrpclib.Endpoint
See theEndpoint companion object
sealed trait Endpoint[F[_]]

Represents a JSON-RPC method handler that can be invoked by the server.

An Endpoint[F] defines how to decode input from a JSON-RPC message, execute some effectful logic, and optionally return a response.

The endpoint's method field is used to match incoming JSON-RPC requests.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def mapK[G[_]](f: PolyFunction[F, G]): Endpoint[G]

Transforms the effect type of this endpoint using the provided PolyFunction.

Transforms the effect type of this endpoint using the provided PolyFunction.

This allows reinterpreting the endpoint’s logic in a different effect context (e.g., from IO to Kleisli[IO, Ctx, *], or from F to EitherT[F, E, *]).

Value parameters

f

A polymorphic function that transforms F[_] into G[_]

Attributes

Returns

A new Endpoint[G] with the same behavior but in a new effect type

def method: String

The JSON-RPC method name this endpoint responds to. Used for dispatching incoming requests.

The JSON-RPC method name this endpoint responds to. Used for dispatching incoming requests.

Attributes