Sprites.Stream (Sprites v0.1.0)
View SourceProvides an Elixir Stream-based interface for command output.
This allows processing command output lazily and composing with other Stream operations.
Example
sprite
|> Sprites.stream("tail", ["-f", "/var/log/app.log"])
|> Stream.filter(&String.contains?(&1, "ERROR"))
|> Stream.each(&Logger.error/1)
|> Stream.run()
Summary
Functions
Creates a new stream that emits command output chunks.
Functions
@spec new(Sprites.Sprite.t(), String.t(), [String.t()], keyword()) :: Enumerable.t()
Creates a new stream that emits command output chunks.
The stream will emit stdout data as binary chunks.
Stderr is not included in the stream (use Sprites.spawn/4 for full control).
Options
Same as Sprites.spawn/4.