Argus.Pipeline.Writer (Panoptes v0.13.0)

Copy Markdown View Source

Appends one module's facts at a time to per-relation .facts files, opening each file on first use. Rows land in the order extraction yields them, which Argus.Pipeline keeps deterministic.

Summary

Types

t()

@type t() :: %Argus.Pipeline.Writer{
  dir: Path.t(),
  files: %{required(atom()) => File.io_device()},
  written: MapSet.t(atom()) | nil
}

Functions

append(writer, module_facts)

@spec append(t(), Argus.Pipeline.Emit.facts()) :: {:ok, t()} | {:error, term()}

close(writer)

@spec close(t()) :: :ok

new(dir, written)

@spec new(Path.t(), MapSet.t(atom()) | nil) :: t()