orchescala.worker

Members list

Packages

Type members

Classlikes

trait CustomHandler[In <: Product, Out <: Product](using evidence$1: Codec[In], evidence$2: Codec[Out]) extends RunWorkHandler[In, Out]

Attributes

Companion
object
Supertypes
trait RunWorkHandler[In, Out]
class Object
trait Matchable
class Any
object CustomHandler

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class CustomWorker[In <: Product, Out <: Product](inOutExample: CustomTask[In, Out], validationHandler: ValidationHandler[In], runWorkHandler: Option[RunWorkHandler[In, Out]])(using evidence$1: Codec[In], evidence$2: Codec[Out]) extends Worker[In, Out, CustomWorker[In, Out]]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Worker[In, Out, CustomWorker[In, Out]]
class Object
trait Matchable
class Any
Show all
trait CustomWorkerDsl[In <: Product, Out <: Product](using evidence$1: Codec[In], evidence$2: Codec[Out]) extends WorkerDsl[In, Out]

Attributes

Supertypes
trait WorkerDsl[In, Out]
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
final case class EngineRunContext(engineContext: EngineContext, generalVariables: GeneralVariables)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait ErrorWithOutput extends WorkerError

Attributes

Supertypes
trait WorkerError
trait OrchescalaError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait InitProcessHandler[In <: Product](using evidence$1: Codec[In])

handler for Custom Process Initialisation. All the variables in the Result Map will be put on the process.

handler for Custom Process Initialisation. All the variables in the Result Map will be put on the process.

For example if you want to init process Variables to a certain value.

Usage:

.withValidation(
  InitProcessHandler(
    (in: In) => {
     Right(
       Map("isCompany" -> true)
     ) // success
    }
  )
)

or (with implicit conversion)

.withValidation(
    (in: In) => {
     Right(
       Map("isCompany" -> true)
     ) // success
    }
)

Default is no Initialization.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class InitWorker[In <: Product, Out <: Product, InitIn <: Product](inOutExample: InOut[In, Out, _], validationHandler: ValidationHandler[In], initProcessHandler: Option[InitProcessHandler[In]])(using evidence$1: Codec[In], evidence$2: Codec[Out], evidence$3: Codec[InitIn]) extends Worker[In, Out, InitWorker[In, Out, InitIn]]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Worker[In, Out, InitWorker[In, Out, InitIn]]
class Object
trait Matchable
class Any
Show all
trait InitWorkerDsl[In <: Product, Out <: Product, InitIn <: Product, InConfig <: Product](using evidence$1: Codec[In], evidence$2: Codec[Out], evidence$3: Codec[InitIn], evidence$4: Codec[InConfig]) extends WorkerDsl[In, Out]

Attributes

Supertypes
trait WorkerDsl[In, Out]
class Object
trait Matchable
class Any
object MemoryMonitor

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final class OutMocker[In <: Product, Out <: Product, T <: Worker[In, Out, _]](worker: T)(using evidence$1: Codec[In], evidence$2: Codec[Out], context: EngineRunContext)

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait RunWorkHandler[In <: Product, Out <: Product](using evidence$1: Codec[In], evidence$2: Codec[Out])

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait CustomHandler[In, Out]
class ServiceHandler[In, Out, ServiceIn, ServiceOut]
case class RunnableRequest[ServiceIn](httpMethod: Method, apiUri: Uri, qSegments: Seq[QuerySegment], requestBodyOpt: Option[ServiceIn], headers: Map[String, String])(using evidence$1: Encoder[ServiceIn])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
case class ServiceHandler[In <: Product, Out <: Product, ServiceIn, ServiceOut](httpMethod: Method, apiUri: In => Uri, querySegments: In => Seq[QuerySegmentOrParam], inputMapper: In => Option[ServiceIn], inputHeaders: In => Map[String, String], outputMapper: (ServiceResponse[ServiceOut], In) => Either[ServiceMappingError, Out], defaultServiceOutMock: MockedServiceResponse[ServiceOut], dynamicServiceOutMock: Option[In => MockedServiceResponse[ServiceOut]], serviceInExample: ServiceIn)(using evidence$1: Codec[In], evidence$2: Codec[Out], evidence$3: Encoder[ServiceIn], evidence$4: Decoder[ServiceOut], evidence$5: ClassTag[ServiceOut]) extends RunWorkHandler[In, Out]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait RunWorkHandler[In, Out]
class Object
trait Matchable
class Any
Show all
case class ServiceResponse[ServiceOut](outputBody: ServiceOut, headers: Map[String, String])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ServiceWorker[In <: Product, Out <: Product, ServiceIn, ServiceOut](inOutExample: ServiceTask[In, Out, ServiceIn, ServiceOut], validationHandler: ValidationHandler[In], runWorkHandler: Option[ServiceHandler[In, Out, ServiceIn, ServiceOut]])(using evidence$1: Codec[In], evidence$2: Codec[Out], evidence$3: Encoder[ServiceIn], evidence$4: Decoder[ServiceOut]) extends Worker[In, Out, ServiceWorker[In, Out, ServiceIn, ServiceOut]]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Worker[In, Out, ServiceWorker[In, Out, ServiceIn, ServiceOut]]
class Object
trait Matchable
class Any
Show all
trait ServiceWorkerDsl[In <: Product, Out <: Product, ServiceIn, ServiceOut](using evidence$1: Codec[In], evidence$2: Codec[Out], evidence$3: Encoder[ServiceIn], evidence$4: Decoder[ServiceOut], evidence$5: ClassTag[ServiceOut]) extends WorkerDsl[In, Out]

Attributes

Supertypes
trait WorkerDsl[In, Out]
class Object
trait Matchable
class Any
object ThreadMonitor

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait ValidationHandler[In <: Product]

handler for Custom Validation (next to the automatic Validation of the In Object.

handler for Custom Validation (next to the automatic Validation of the In Object.

For example if one of two optional variables must exist.

Usage:

.withValidation(
  ValidationHandler(
    (in: In) => Right(in)
  )
)

or (with implicit conversion)

.withValidation(
    (in: In) => Right(in)
)

Default is no extra Validation.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ValidationWorkerDsl[In <: Product](using evidence$1: Codec[In]) extends WorkerDsl[In, NoOutput]

Attributes

Supertypes
trait WorkerDsl[In, NoOutput]
class Object
trait Matchable
class Any
final class WorkRunner[In <: Product, Out <: Product, T <: Worker[In, Out, _]](worker: T)(using evidence$1: Codec[In], evidence$2: Codec[Out])

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait Worker[In <: Product, Out <: Product, T <: Worker[In, Out, _]](using evidence$1: Codec[In], evidence$2: Codec[Out])

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CustomWorker[In, Out]
class InitWorker[In, Out, InitIn]
class ServiceWorker[In, Out, ServiceIn, ServiceOut]
trait WorkerApp extends ZIOAppDefault

Attributes

Supertypes
trait ZIOAppDefault
trait ZIOApp
class Object
trait Matchable
class Any
trait WorkerDsl[In <: Product, Out <: Product]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait CustomWorkerDsl[In, Out]
trait InitWorkerDsl[In, Out, InitIn, InConfig]
trait ServiceWorkerDsl[In, Out, ServiceIn, ServiceOut]
sealed trait WorkerError extends OrchescalaError

Attributes

Companion
object
Supertypes
trait OrchescalaError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object WorkerError

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class WorkerExecutor[In <: Product, Out <: Product, T <: Worker[In, Out, _]](worker: T)(using evidence$1: Codec[In], evidence$2: Codec[Out], context: EngineRunContext)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait WorkerHandler[In <: Product, Out <: Product]

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
case class Workers(workers: Seq[Worker[_, _, _]])

Attributes

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

Types

type HandledErrorCodes = Seq[ErrorCodeType]
type InitProcessFunction = EngineRunContext ?=> IO[InitProcessError, Map[String, Any]]
type RunWorkZIOOutput[Out] = EngineRunContext ?=> IO[CustomError, Out]
type SttpClientBackend = SttpBackend[Task, ZioWebSocketsStreams]

Value members

Concrete methods

def decodeTo[A : Decoder](jsonStr: String): IO[UnexpectedError, A]
def niceClassName(clazz: Class[_]): String
def printTimeOnConsole(start: Date): String

Extensions

Extensions

extension [ServiceOut](mocked: MockedServiceResponse[ServiceOut])

Simplifies testing, as there is already a successful service mock example.

Simplifies testing, as there is already a successful service mock example.

Attributes

Exports

Defined exports

final type IO = IO
Exported from package$
final val Method: Method
Exported from model
final type Method = Method
Exported from model
final val Uri: Uri
Exported from model
final type Uri = Uri
Exported from model
final type UriContext = UriContext
Exported from UriInterpolator
final val ZIO: ZIO
Exported from zio
final type ZIO = ZIO
Exported from zio