Spear.set_stream_metadata

You're seeing just the function set_stream_metadata, go back to Spear module for more information.
Link to this function

set_stream_metadata(conn, stream, metadata, opts \\ [])

View Source (since 0.1.3)

Specs

set_stream_metadata(
  connection :: Spear.Connection.t(),
  stream :: String.t(),
  metadata :: Spear.StreamMetadata.t(),
  opts :: Keyword.t()
) :: :ok | {:error, any()}

Sets a stream's metadata

Note that the stream argument is passed through meta_stream/1 before being read. It is not necessary to call that function on the stream name before passing it as stream.

Options

This function uses append/4 under the hood. All options are passed to the opts argument of append/4.

Examples

# only allow admins to read, write, and delete the stream (or stream metadata)
iex> metadata = %Spear.StreamMetadata{acl: Spear.Acl.admins_only()}
iex> Spear.set_stream_metadata(conn, stream, metadata)
:ok