hivent v3.0.0 Hivent.Memory

In-memory implementation of a Hivent emitter. Includes utility methods to query the cache. Use this in your tests to assert your events are properly published.

Summary

Functions

Gets all events currently in the memory store

Clears the memory store

Emits an event to the memory store

Checks if the memory store is empty

Checks if an event with a given payload and/or metadata exists in the store. Supports partial matching for both payload and metadata

Gets the last event emitted to the memory store

Starts the Hivent.Memory server

Functions

all()

Gets all events currently in the memory store.

clear()

Clears the memory store.

emit(name, payload, options)

Emits an event to the memory store.

empty?()

Checks if the memory store is empty.

include?(payload, meta \\ %{})

Checks if an event with a given payload and/or metadata exists in the store. Supports partial matching for both payload and metadata.

last()

Gets the last event emitted to the memory store.

start(type \\ nil, args \\ nil)

Starts the Hivent.Memory server