ServiceReloader

zio.macros.ServiceReloader$
See theServiceReloader companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

sealed trait Error extends Throwable

Attributes

Supertypes
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
final case class ServiceInitializationError(error: Any) extends Error

Attributes

Supertypes
trait Product
trait Equals
trait Error
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class ServiceNotRegistered(tag: LightTypeTag) extends Error

Attributes

Supertypes
trait Product
trait Equals
trait Error
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def register[A : IsReloadable](serviceLayer: ZLayer[Any, Any, A]): ZIO[ServiceReloader, Error, A]

Registers the specified service with a layer that constructs the service. Returns an implementation of the service that is backed by a ScopedRef which will handle reloading the service. Fails with a ServiceInitializationError exception if an error occurs while acquiring the service.

Registers the specified service with a layer that constructs the service. Returns an implementation of the service that is backed by a ScopedRef which will handle reloading the service. Fails with a ServiceInitializationError exception if an error occurs while acquiring the service.

Attributes

Reloads the specified service, releasing any resources associated with the service and acquiring a new service. Fails with a ServiceInitializationError exception if an error occurs reloading the service or a ServiceNotRegistered exception if a layer constructing the service was never registered.

Reloads the specified service, releasing any resources associated with the service and acquiring a new service. Fails with a ServiceInitializationError exception if an error occurs reloading the service or a ServiceNotRegistered exception if a layer constructing the service was never registered.

Attributes

Concrete fields

val live: ZLayer[Any, Nothing, ServiceReloader]

The live implementation of the ServiceReloader service.

The live implementation of the ServiceReloader service.

Attributes