View Source pact_ref_server (pact_erlang v0.2.0)

Summary

Functions

Public API to create an interaction
Gets consumer and producer for a pact ref
Public API to set the mock server port when the server is started
Gets pact ref generated (when a new pact was created/re-created) by pact ffi
Public API to set the mock server port when the server is started
Sets pact_ref in pact_handler's state
Starts pact server
Stops the pact_handler gen_server for final cleanups

Types

-type consumer() :: binary().
Link to this type

pact_interaction_details/0

View Source
-type pact_interaction_details() :: map().
Link to this type

pact_interaction_ref/0

View Source
-type pact_interaction_ref() :: integer().
Link to this type

pact_mock_server_port/0

View Source
-type pact_mock_server_port() :: integer().
-type pact_ref() :: integer().
-type provider() :: binary().

Functions

Link to this function

create_interaction(PactPid, InteractionRef, Interaction)

View Source
-spec create_interaction(pid(), pact_interaction_ref(), pact_interaction_details()) -> ok.
Public API to create an interaction
Link to this function

get_consumer_producer(PactPid)

View Source
-spec get_consumer_producer(pid()) -> {consumer(), provider()}.
Gets consumer and producer for a pact ref
Link to this function

get_mock_server_port(PactPid)

View Source
-spec get_mock_server_port(pid()) -> pact_mock_server_port().
Public API to set the mock server port when the server is started
-spec get_pact_ref(pid()) -> pact_ref().
Gets pact ref generated (when a new pact was created/re-created) by pact ffi
Link to this function

handle_call(_, From, State)

View Source
Link to this function

handle_info(Info, State)

View Source
Link to this function

set_mock_server_port(PactPid, Port)

View Source
-spec set_mock_server_port(pid(), pact_mock_server_port()) -> ok.
Public API to set the mock server port when the server is started
Link to this function

set_pact_ref(PactPid, PactRef)

View Source
-spec set_pact_ref(pid(), pact_ref()) -> ok.
Sets pact_ref in pact_handler's state
Link to this function

start(Consumer, Producer)

View Source
-spec start(consumer(), provider()) -> gen_server:start_ret().
Starts pact server
-spec stop(pid()) -> ok.
Stops the pact_handler gen_server for final cleanups
Link to this function

terminate(Reason, State)

View Source