Tungsten v0.1.0 Tungsten.CDP.IO View Source

IO

Input/Output operations for streams produced by DevTools.

Link to this section Summary

Link to this section Types

Link to this type

cdp_stream_handle_type() View Source
cdp_stream_handle_type() :: String.t()

IO.StreamHandle

This is either obtained from another method or specifed as blob:<uuid> where <uuid&gt is an UUID of a Blob.

Link to this section Functions

Link to this function

close(session, parameters, options \\ []) View Source
close(
  GenServer.server(),
  %{handle: cdp_stream_handle_type()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

IO.close

Close the stream, discard any temporary backing storage.

Link to this function

read(session, parameters, options \\ []) View Source
read(
  GenServer.server(),
  %{
    :handle => cdp_stream_handle_type(),
    optional(:offset) => integer(),
    optional(:size) => integer()
  },
  Tungsten.Connection.exec_options()
) ::
  {:ok,
   %{
     optional(:base64_encoded) => boolean(),
     :data => String.t(),
     :eof => boolean()
   }}
  | {:error, term()}

IO.read

Read a chunk of the stream

Link to this function

resolve_blob(session, parameters, options \\ []) View Source
resolve_blob(
  GenServer.server(),
  %{object_id: Tungsten.CDP.Runtime.cdp_remote_object_id_type()},
  Tungsten.Connection.exec_options()
) :: {:ok, %{uuid: String.t()}} | {:error, term()}

IO.resolveBlob

Return UUID of Blob object specified by a remote object id.