Service

smithy4s.Service
See theService companion object
trait Service[Alg[_[_, _, _, _, _]]] extends FunctorK5[Alg] with HasId

Generic representation of a service, as a list of "endpoints" (mapping to smithy operations).

This abstraction lets us retrieve all information necessary to the generic implementation of protocols, as well as transform implementations of finally-encoded interfaces into interpreters (polymorphic functions) that operate on initially-encoded GADTs.

Attributes

Alg

: a finally-encoded interface (commonly called algebra) that works against an abstract "effect" that takes 5 type parameters: Input, Error, Output, StreamedInput, StreamedOutput

Op

: an initially encoded version of the finally-encoded interface. Typically, a GADT that acts as a reification of the operations. Passing the reified versions around makes it drastically easier to implement logic generically, without involving metaprogramming.

Companion:
object
Graph
Supertypes
trait HasId
trait FunctorK5[Alg]
class Object
trait Matchable
class Any
Known subtypes
trait Mixin[Alg, Op]
trait Reflective[Op]

Members list

Concise view

Type members

Types

type Endpoint[I, E, O, SI, SO] = Endpoint[Operation, I, E, O, SI, SO]
type ErrorAware[F[_, _]] = Alg[<none>]
type Impl[F[_]] = Alg[<none>]
type Interpreter[F[_, _, _, _, _]] = PolyFunction5[Operation, F]
type Operation[I, E, O, SI, SO]

Value members

Abstract methods

def endpoint[I, E, O, SI, SO](op: Operation[I, E, O, SI, SO]): (I, Endpoint[I, E, O, SI, SO])
def endpoints: List[Endpoint[Operation, _, _, _, _, _]]
def fromPolyFunction[P[_, _, _, _, _]](function: PolyFunction5[Operation, P]): Alg[P]
def reified: Alg[Operation]
def toPolyFunction[P[_, _, _, _, _]](algebra: Alg[P]): PolyFunction5[Operation, P]

Inherited methods

def id: ShapeId

Attributes

Inherited from:
HasId
def mapK5[F[_, _, _, _, _], G[_, _, _, _, _]](alg: Alg[F], function: PolyFunction5[F, G]): Alg[G]

Attributes

Inherited from:
FunctorK5

Concrete fields

val service: Service[Alg]