Rill v0.10.4 Rill.Messaging.Message.Metadata View Source

Link to this section Summary

Link to this section Types

Link to this type

t() View Source
t() :: %Rill.Messaging.Message.Metadata{
  causation_message_global_position: pos_integer() | nil,
  causation_message_position: non_neg_integer() | nil,
  causation_message_stream_name: Rill.MessageStore.StreamName.t() | nil,
  correlation_stream_name: Rill.MessageStore.StreamName.t() | nil,
  global_position: pos_integer(),
  position: non_neg_integer(),
  reply_stream_name: Rill.MessageStore.StreamName.t() | nil,
  schema_version: String.t() | nil,
  stream_name: Rill.MessageStore.StreamName.t(),
  time: NaiveDateTime.t()
}

Link to this section Functions

Link to this function

build(data \\ %{}) View Source
build(data :: map() | struct()) :: %Rill.Messaging.Message.Metadata{
  causation_message_global_position: term(),
  causation_message_position: term(),
  causation_message_stream_name: term(),
  correlation_stream_name: term(),
  global_position: term(),
  position: term(),
  reply_stream_name: term(),
  schema_version: term(),
  stream_name: term(),
  time: term()
}

Builds metadata instance and sets existing fields based on data

Link to this function

clear_reply_stream_name(metadata) View Source
clear_reply_stream_name(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  }
) :: %Rill.Messaging.Message.Metadata{
  causation_message_global_position: term(),
  causation_message_position: term(),
  causation_message_stream_name: term(),
  correlation_stream_name: term(),
  global_position: term(),
  position: term(),
  reply_stream_name: term(),
  schema_version: term(),
  stream_name: term(),
  time: term()
}

Link to this function

correlate(metadata, stream_name) View Source
correlate(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  },
  stream_name :: Rill.MessageStore.StreamName.t()
) :: %Rill.Messaging.Message.Metadata{
  causation_message_global_position: term(),
  causation_message_position: term(),
  causation_message_stream_name: term(),
  correlation_stream_name: term(),
  global_position: term(),
  position: term(),
  reply_stream_name: term(),
  schema_version: term(),
  stream_name: term(),
  time: term()
}

Link to this function

correlated?(metadata, stream_name) View Source
correlated?(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  },
  stream_name :: Rill.MessageStore.StreamName.t()
) :: boolean()

Link to this function

follow(metadata, preceding_metadata) View Source
follow(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  },
  preceding_metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  }
) :: %Rill.Messaging.Message.Metadata{
  causation_message_global_position: term(),
  causation_message_position: term(),
  causation_message_stream_name: term(),
  correlation_stream_name: term(),
  global_position: term(),
  position: term(),
  reply_stream_name: term(),
  schema_version: term(),
  stream_name: term(),
  time: term()
}

Link to this function

follows?(metadata, preceding) View Source
follows?(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  },
  preceding :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  }
) :: boolean()

Link to this function

get_causation_message_identifier(metadata) View Source
get_causation_message_identifier(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  }
) :: String.t() | nil

Link to this function

get_identifier(metadata) View Source
get_identifier(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  }
) :: String.t() | nil

Link to this function

reply?(metadata) View Source
reply?(
  metadata :: %Rill.Messaging.Message.Metadata{
    causation_message_global_position: term(),
    causation_message_position: term(),
    causation_message_stream_name: term(),
    correlation_stream_name: term(),
    global_position: term(),
    position: term(),
    reply_stream_name: term(),
    schema_version: term(),
    stream_name: term(),
    time: term()
  }
) :: boolean()

Link to this function

transient_attributes() View Source
transient_attributes() :: [atom()]