ProxZStream

trait ProxZStream extends Prox
trait Prox
trait SyntaxModule
trait ProcessRunnerModule
trait RedirectionModule
trait ProcessGroupModule
trait ProcessModule
trait CommonModule
trait ProxRuntime
class Object
trait Matchable
class Any
object zstream.type

Type members

Classlikes

case class TransformAndSink[A, B](transform: ZStream[Blocking, ProxError, A] => ZStream[Blocking, ProxError, B], sink: ZSink[Blocking, ProxError, B, Any, Unit])
Companion:
object
Companion:
class

Inherited classlikes

case class AllCapturedThroughPipe[O, OR](pipeFn: Process[_, _] => ProxPipe[Byte, O], runner: ProxStream[O] => ProxIO[OR], chunkSize: Int) extends GroupErrorRedirection
Inherited from:
RedirectionModule
case class AllCapturedToSink(sinkFn: Process[_, _] => ProxSink[Byte], chunkSize: Int) extends GroupErrorRedirection
Inherited from:
RedirectionModule
case class AllToFile(pathFn: Process[_, _] => Path, append: Boolean) extends GroupErrorRedirection
Inherited from:
RedirectionModule
case class AllToStdErr() extends GroupErrorRedirection
Inherited from:
RedirectionModule
implicit implicit protected class FiberOps[A](f: ProxFiber[A])
Inherited from:
ProxRuntime

Supported process group error redirection types. Should not be used directly, see the redirection traits instead.

Supported process group error redirection types. Should not be used directly, see the redirection traits instead.

Inherited from:
RedirectionModule

Helper type class for process group error redirection dependent typing

Helper type class for process group error redirection dependent typing

Inherited from:
RedirectionModule
implicit implicit protected class IOOps[A](io: ProxIO[A])
Inherited from:
ProxRuntime
case class InputFile(path: Path) extends InputRedirection
Inherited from:
RedirectionModule
sealed trait InputRedirection

Supported input redirection types. Should not be used directly, see the redirection traits instead.

Supported input redirection types. Should not be used directly, see the redirection traits instead.

Inherited from:
RedirectionModule
case class InputStream(stream: ProxStream[Byte], flushChunks: Boolean) extends InputRedirection
Inherited from:
RedirectionModule
Inherited from:
ProcessRunnerModule
abstract class JVMProcessRunnerBase[Info <: JVMProcessInfo] extends ProcessRunner[Info]

Default implementation of ProcessRunner using the Java process API

Default implementation of ProcessRunner using the Java process API

Inherited from:
ProcessRunnerModule
class JVMRunningProcess[O, E, +Info <: JVMProcessInfo](val nativeProcess: Process, val runningInput: ProxFiber[Unit], val runningOutput: ProxFiber[O], val runningError: ProxFiber[E], val info: Info) extends RunningProcess[O, E, Info]

Default implementation of RunningProcess using the Java process API

Default implementation of RunningProcess using the Java process API

Inherited from:
ProcessRunnerModule
class JVMRunningProcessGroup[O, E, +Info <: JVMProcessInfo](runningProcesses: Map[Process[Unit, Unit], RunningProcess[_, E, Info]], val runningOutput: ProxFiber[O]) extends RunningProcessGroup[O, E, Info]

Default implementation of RunningProcessGroup using the Java process API

Default implementation of RunningProcessGroup using the Java process API

Inherited from:
ProcessRunnerModule
implicit implicit protected class ListProxErrorOps(list: List[ProxError])
Inherited from:
ProxRuntime
implicit implicit protected class MonoidStreamOps[A](s: ProxStream[A])(implicit evidence$2: ProxMonoid[A])
Inherited from:
ProxRuntime
case class OutputFile(path: Path, append: Boolean) extends OutputRedirection
Inherited from:
RedirectionModule
sealed trait OutputRedirection

Supported output redirection types. Should not be used directly, see the redirection traits instead.

Supported output redirection types. Should not be used directly, see the redirection traits instead.

Inherited from:
RedirectionModule

Helper type class for output and error redirection dependent typing

Helper type class for output and error redirection dependent typing

Inherited from:
RedirectionModule
case class OutputStreamThroughPipe[O, OR](pipe: ProxPipe[Byte, O], runner: ProxStream[O] => ProxIO[OR], chunkSize: Int) extends OutputRedirection
Inherited from:
RedirectionModule
case class OutputStreamToSink(sink: ProxSink[Byte], chunkSize: Int) extends OutputRedirection
Inherited from:
RedirectionModule
trait PipeBuilder[P]
Inherited from:
SyntaxModule
class PipeBuilderSyntax[P](builder: PipeBuilder[P], channel: ProxPipe[Byte, Byte])
Inherited from:
SyntaxModule
object Process
Inherited from:
ProcessModule
trait Process[O, E] extends ProcessLike with ProcessConfiguration

Describes a system process to be executed

Describes a system process to be executed

This base trait is always extended with redirection and configuration capabilities represented by the traits ProcessConfiguration, RedirectableInput, RedirectableOutput and RedirectableError.

To create a process use the constructor in the companion object Process.apply.

The process specification not only encodes the process to be started but also how its input, output and error streams are redirected and executed. For this reason the effect type is also bound by the process, not just at execution time.

Type parameters:
E

Error output type

O

Output type

Inherited from:
ProcessModule

The capability to configure process execution details

The capability to configure process execution details

Inherited from:
ProcessModule
Inherited from:
ProcessGroupModule
trait ProcessGroup[O, E] extends ProcessLike with ProcessGroupConfiguration[O, E]

Process group is two or more processes attached to each other

Process group is two or more processes attached to each other

This implements a pipeline of processes. The input of the first process and the output of the last process is redirectable with the RedirectableInput and RedirectableOutput traits. The processes are attached to each other's input/output streams, the pipe between them is customizable.

The error streams are also redirectable with the RedirectableErrors trait.

Type parameters:
E

Error output type

O

Output type

Inherited from:
ProcessGroupModule
trait ProcessGroupResult[+O, +E]

Result of an executed process group

Result of an executed process group

Type parameters:
E

Error output type

O

Output type

Inherited from:
ProcessGroupModule
implicit implicit class ProcessPiping(process: UnboundProcess)

Extension methods for unbound processes enabling the creation of process groups

Extension methods for unbound processes enabling the creation of process groups

Inherited from:
SyntaxModule
trait ProcessResult[+O, +E]

Result of a finished process

Result of a finished process

Type parameters:
E

Error output type

O

Output type

Inherited from:
ProcessModule
trait ProcessRunner[Info]

Interface for running processes and process groups

Interface for running processes and process groups

The default implementation is JVMProcessRunner

Type parameters:
Info

The type of information provided for a started process

Inherited from:
ProcessRunnerModule
implicit implicit class ProcessStringContextIO(ctx: StringContext)

String interpolator for an alternative of Process.apply

String interpolator for an alternative of Process.apply

val process = proc"ls -hal $dir"
Inherited from:
SyntaxModule
trait RedirectableError[+P <: (Process)]

The capability to redirect the error output of a process

The capability to redirect the error output of a process

Type parameters:
P

Self type without the RedirectableError capability

Inherited from:
RedirectionModule

The capability to redirect all the error outputs simultaneously of a process group

The capability to redirect all the error outputs simultaneously of a process group

Type parameters:
P

Self type without the RedirectableErrors capability

Inherited from:
RedirectionModule
trait RedirectableInput[+P <: ProcessLike]

The capability to redirect the input of a process or process group

The capability to redirect the input of a process or process group

Inherited from:
RedirectionModule
trait RedirectableOutput[+P <: ([_] =>> ProcessLike)]

The capability to redirect the output of a process or a process group

The capability to redirect the output of a process or a process group

Type parameters:
P

Self type without the RedirectableOutput capability

Inherited from:
RedirectionModule
implicit implicit protected class ResourceOps[A](r: ProxResource[A])
Inherited from:
ProxRuntime
trait RunningProcess[O, E, +Info]

Representation of a running process

Representation of a running process

Type parameters:
E

Error output type

Info

Runner-specific process information

O

Output type

Inherited from:
ProcessModule
trait RunningProcessGroup[O, E, +Info]

Representation of a running process group

Representation of a running process group

Type parameters:
E

Error output type

Info

Runner-specific per-process information type

O

Output type

Inherited from:
ProcessGroupModule
case class SimpleProcessGroupResult[+O, +E](exitCodes: Map[Process[Unit, Unit], ProxExitCode], output: O, errors: Map[Process[Unit, Unit], E]) extends ProcessGroupResult[O, E]

Default implementation of ProcessGroupResult

Default implementation of ProcessGroupResult

Inherited from:
ProcessGroupModule
case class SimpleProcessResult[+O, +E](exitCode: ProxExitCode, output: O, error: E) extends ProcessResult[O, E]

Default implementation of ProcessResult

Default implementation of ProcessResult

Inherited from:
ProcessModule
case class StdIn() extends InputRedirection
Inherited from:
RedirectionModule
case class StdOut() extends OutputRedirection
Inherited from:
RedirectionModule
implicit implicit protected class StreamOps[A](s: ProxStream[A])
Inherited from:
ProxRuntime

Types

override type ProxExitCode = ExitCode
override type ProxFiber[A] = Fiber[ProxError, A]
override type ProxIO[A] = ZIO[Blocking, ProxError, A]
override type ProxMonoid[A] = Identity[A]
override type ProxPipe[A, B] = ProxStream[A] => ProxStream[B]
override type ProxResource[A] = ZManaged[Blocking, ProxError, A]
override type ProxSink[A] = TransformAndSink[A, _]
override type ProxStream[A] = ZStream[Blocking, ProxError, A]

Value members

Concrete methods

final override protected def blockingEffect[A](f: => A, wrapError: Throwable => ProxError): ProxIO[A]
Definition Classes
ProxRuntime
final override protected def bracket[A, B](acquire: ProxIO[A])(use: A => ProxIO[B])(fin: (A, IOResult) => ProxIO[Unit]): ProxIO[B]
Definition Classes
ProxRuntime
final override protected def cancelFiber[A](f: ProxFiber[A]): ProxIO[Unit]
Definition Classes
ProxRuntime
final override protected def drainStream[A](s: ProxStream[A]): ProxIO[Unit]
Definition Classes
ProxRuntime
final override protected def drainToJavaOutputStream(stream: ProxStream[Byte], output: OutputStream, flushChunks: Boolean): ProxIO[Unit]
Definition Classes
ProxRuntime
final override protected def effect[A](f: => A, wrapError: Throwable => ProxError): ProxIO[A]
Definition Classes
ProxRuntime
final override protected def exitCodeFromInt(value: Int): ProxExitCode
Definition Classes
ProxRuntime
final override protected def foldMonoidStream[A : Identity](s: ProxStream[A]): ProxIO[A]
Definition Classes
ProxRuntime
final override protected def foldStream[A, B](s: ProxStream[A], init: B, f: (B, A) => B): ProxIO[B]
Definition Classes
ProxRuntime
final override protected def fromJavaInputStream(input: InputStream, chunkSize: Int): ProxStream[Byte]
Definition Classes
ProxRuntime
final override protected def identityPipe[A]: A => A
Definition Classes
ProxRuntime
final override protected def ioFlatMap[A, B](io: ProxIO[A], f: A => ProxIO[B]): ProxIO[B]
Definition Classes
ProxRuntime
final override protected def ioMap[A, B](io: ProxIO[A], f: A => B): ProxIO[B]
Definition Classes
ProxRuntime
final override protected def joinFiber[A](f: ProxFiber[A]): ProxIO[A]
Definition Classes
ProxRuntime
final override protected def makeResource[A](acquire: ProxIO[A], release: A => ProxIO[Unit]): ProxResource[A]
Definition Classes
ProxRuntime
final override protected def pure[A](value: A): ProxIO[A]
Definition Classes
ProxRuntime
final override protected def raiseError(error: ProxError): ProxIO[Unit]
Definition Classes
ProxRuntime
final override protected def runStreamTo[A](s: ProxStream[A], sink: ProxSink[A]): ProxIO[Unit]
Definition Classes
ProxRuntime
final override protected def startFiber[A](f: ProxIO[A]): ProxIO[ProxFiber[A]]
Definition Classes
ProxRuntime
final override protected def streamThrough[A, B](s: ProxStream[A], pipe: A => B): ProxStream[B]
Definition Classes
ProxRuntime
final override protected def streamToVector[A](s: ProxStream[A]): ProxIO[Vector[A]]
Definition Classes
ProxRuntime
final override protected def traverse[A, B](list: List[A])(f: A => ProxIO[B]): ProxIO[List[B]]
Definition Classes
ProxRuntime
final override protected def unit: ProxIO[Unit]
Definition Classes
ProxRuntime
final override protected def useResource[A, B](r: ProxResource[A], f: A => ProxIO[B]): ProxIO[B]
Definition Classes
ProxRuntime

Implicits

Implicits

implicit def sinkAsTransformAndSink[A](sink: ZSink[Blocking, ProxError, A, Any, Unit]): TransformAndSink[A, A]
implicit def transducerAsPipe[A, B](transducer: ZTransducer[Blocking, ProxError, A, B]): A => B

Inherited implicits

final implicit protected def FiberOps[A](f: ProxFiber[A]): FiberOps[A]
Inherited from:
ProxRuntime
final implicit protected def IOOps[A](io: ProxIO[A]): IOOps[A]
Inherited from:
ProxRuntime
final implicit protected def ListProxErrorOps(list: List[ProxError]): ListProxErrorOps
Inherited from:
ProxRuntime
final implicit protected def MonoidStreamOps[A : Identity](s: ProxStream[A]): MonoidStreamOps[A]
Inherited from:
ProxRuntime
final implicit def ProcessPiping(process: UnboundProcess): ProcessPiping

Extension methods for unbound processes enabling the creation of process groups

Extension methods for unbound processes enabling the creation of process groups

Inherited from:
SyntaxModule
final implicit def ProcessStringContextIO(ctx: StringContext): ProcessStringContextIO

String interpolator for an alternative of Process.apply

String interpolator for an alternative of Process.apply

val process = proc"ls -hal $dir"
Inherited from:
SyntaxModule
final implicit protected def ResourceOps[A](r: ProxResource[A]): ResourceOps[A]
Inherited from:
ProxRuntime
final implicit protected def StreamOps[A](s: ProxStream[A]): StreamOps[A]
Inherited from:
ProxRuntime