ServerBuilderOps

fs2.grpc.syntax.ServerBuilderOps
final class ServerBuilderOps[SB <: ServerBuilder[SB]](val builder: SB) extends AnyVal

Attributes

Source
ServerBuilderSyntax.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def resource[F[_]](implicit F: Sync[F]): Resource[F, Server]

Builds a Server into a resource. The server is shut down when the resource is released. Shutdown is as follows:

Builds a Server into a resource. The server is shut down when the resource is released. Shutdown is as follows:

  1. We request an orderly shutdown, allowing preexisting calls to continue without accepting new calls. 2. We block for up to 30 seconds on termination, using the blocking context 3. If the server is not yet terminated, we trigger a forceful shutdown

For different tradeoffs in shutdown behavior, see {{resourceWithShutdown}}.

Attributes

Source
ServerBuilderSyntax.scala
def resourceWithShutdown[F[_]](shutdown: Server => F[Unit])(implicit F: Sync[F]): Resource[F, Server]

Builds a Server into a resource. The server is shut down when the resource is released.

Builds a Server into a resource. The server is shut down when the resource is released.

Value parameters

shutdown

Determines the behavior of the cleanup of the server, with respect to forceful vs. graceful shutdown and how to poll or block for termination.

Attributes

Source
ServerBuilderSyntax.scala
def stream[F[_]](implicit F: Async[F]): Stream[F, Server]

Builds a Server into a stream. The server is shut down when the stream is complete. Shutdown is as follows:

Builds a Server into a stream. The server is shut down when the stream is complete. Shutdown is as follows:

  1. We request an orderly shutdown, allowing preexisting calls to continue without accepting new calls. 2. We block for up to 30 seconds on termination, using the blocking context 3. If the server is not yet terminated, we trigger a forceful shutdown

For different tradeoffs in shutdown behavior, see {{streamWithShutdown}}.

Attributes

Source
ServerBuilderSyntax.scala
def streamWithShutdown[F[_]](shutdown: Server => F[Unit])(implicit F: Async[F]): Stream[F, Server]

Builds a Server into a stream. The server is shut down when the stream is complete.

Builds a Server into a stream. The server is shut down when the stream is complete.

Value parameters

shutdown

Determines the behavior of the cleanup of the server, with respect to forceful vs. graceful shutdown and how to poll or block for termination.

Attributes

Source
ServerBuilderSyntax.scala

Concrete fields

val builder: SB

Attributes

Source
ServerBuilderSyntax.scala