ArmeriaServer

org.sigilaris.node.jvm.transport.armeria.ArmeriaServer
object ArmeriaServer

Factory for building and managing Armeria HTTP servers backed by Tapir endpoints.

Attributes

Source
ArmeriaServer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def build[F[_] : Async](config: ArmeriaServerConfig, dispatcher: Dispatcher[F], endpoints: List[ServerEndpoint[Fs2Streams[F], F]]): F[Server]

Builds an Armeria server without starting it.

Builds an Armeria server without starting it.

Type parameters

F

the effect type

Value parameters

config

server configuration

dispatcher

cats-effect dispatcher for bridging async boundaries

endpoints

Tapir server endpoints to serve

Attributes

Returns

the constructed (but not yet started) server

Source
ArmeriaServer.scala
def buildWithScopedStreamTimeout[F[_] : Async](config: ArmeriaServerConfig, dispatcher: Dispatcher[F], finiteEndpoints: List[ServerEndpoint[Fs2Streams[F], F]], streamEndpoints: List[ServerEndpoint[Fs2Streams[F], F]], streamRoutePath: String, streamRequestTimeout: Duration): F[Server]

Builds an Armeria server that keeps the finite endpoint timeout guard while binding one long-lived stream route with its own timeout.

Builds an Armeria server that keeps the finite endpoint timeout guard while binding one long-lived stream route with its own timeout.

Type parameters

F

the effect type

Value parameters

config

server configuration for finite endpoints

dispatcher

cats-effect dispatcher for bridging async boundaries

finiteEndpoints

finite request/response Tapir endpoints

streamEndpoints

long-lived streaming Tapir endpoints

streamRequestTimeout

request timeout for the stream route; Duration.ZERO disables Armeria's request timeout for the long-lived response

streamRoutePath

Armeria route path pattern for the streaming endpoint

Attributes

Returns

the constructed (but not yet started) server

Source
ArmeriaServer.scala
def resource[F[_] : Async](config: ArmeriaServerConfig, endpoints: List[ServerEndpoint[Fs2Streams[F], F]]): Resource[F, Server]

Creates a managed resource that starts an Armeria server and shuts it down on release.

Creates a managed resource that starts an Armeria server and shuts it down on release.

Type parameters

F

the effect type

Value parameters

config

server configuration

endpoints

Tapir server endpoints to serve

Attributes

Returns

a resource that manages the server lifecycle

Source
ArmeriaServer.scala
def resourceWithScopedStreamTimeout[F[_] : Async](config: ArmeriaServerConfig, finiteEndpoints: List[ServerEndpoint[Fs2Streams[F], F]], streamEndpoints: List[ServerEndpoint[Fs2Streams[F], F]], streamRoutePath: String, streamRequestTimeout: Duration): Resource[F, Server]

Creates a managed server resource with a route-scoped stream timeout.

Creates a managed server resource with a route-scoped stream timeout.

Attributes

Source
ArmeriaServer.scala
def start[F[_] : Async](config: ArmeriaServerConfig, dispatcher: Dispatcher[F], endpoints: List[ServerEndpoint[Fs2Streams[F], F]]): F[Server]

Builds and starts an Armeria server, returning the running server instance.

Builds and starts an Armeria server, returning the running server instance.

Type parameters

F

the effect type

Value parameters

config

server configuration

dispatcher

cats-effect dispatcher for bridging async boundaries

endpoints

Tapir server endpoints to serve

Attributes

Returns

the started server

Source
ArmeriaServer.scala
def startWithScopedStreamTimeout[F[_] : Async](config: ArmeriaServerConfig, dispatcher: Dispatcher[F], finiteEndpoints: List[ServerEndpoint[Fs2Streams[F], F]], streamEndpoints: List[ServerEndpoint[Fs2Streams[F], F]], streamRoutePath: String, streamRequestTimeout: Duration): F[Server]

Builds and starts an Armeria server with a route-scoped stream timeout.

Builds and starts an Armeria server with a route-scoped stream timeout.

Attributes

Source
ArmeriaServer.scala