Operator

trait Operator[R, E, T]

Core implementation of the operator logic. Watches a stream and calls an event processor.

An instance of this is tied to one particular resource type in one namespace.

Create an instance using either Operator.namespaced or Operator.cluster

Companion
object
class Object
trait Matchable
class Any
class ClusterOperator[R, E, T]
class NamespacedOperator[R, E, T]
Operator[R, E, T]

Value members

Abstract methods

def mapEventProcessor[R1, E1](f: ZIO[R, OperatorFailure[E], Unit] => ZIO[R1, OperatorFailure[E1], Unit]): Operator[R1, E1, T]

Modify the operator's event processor with the given function

Modify the operator's event processor with the given function

def processEvent(event: TypedWatchEvent[T]): ZIO[R, OperatorFailure[E], Unit]

Concrete methods

final
def provide(r: R)(implicit ev: NeedsEnv[R]): Operator[Any, E, T]

Provide the required environment for the operator

Provide the required environment for the operator

final
def provideCustomLayer[E1 >: E, R1 <: Has[_]](layer: ZLayer[ZEnv, OperatorFailure[E1], R1])(implicit ev: ZEnv & R1 <:< R, tagged: Tag[R1]): Operator[ZEnv, E1, T]

Provide the required environment for the operator with a layer on top of the standard ones

Provide the required environment for the operator with a layer on top of the standard ones

final
def provideLayer[E1 >: E, R0, R1](layer: ZLayer[R0, OperatorFailure[E1], R1])(implicit ev1: R1 <:< R, ev2: NeedsEnv[R]): Operator[R0, E1, T]

Provide the required environment for the operator with a layer

Provide the required environment for the operator with a layer

final
def provideSome[R0](f: R0 => R)(implicit ev: NeedsEnv[R]): Operator[R0, E, T]

Provide a part of the required environment for the operator

Provide a part of the required environment for the operator

final
def provideSomeLayer[R0 <: Has[_]]: ProvideSomeLayer[R0, R, E, T]

Provide parts of the required environment for the operator with a layer

Provide parts of the required environment for the operator with a layer

def start(): URIO[R & Clock & Logging, Runtime[Nothing, Unit]]

Starts the operator on a forked fiber

Starts the operator on a forked fiber

Abstract fields

val bufferSize: Int

Implicits

Implicits