Function pact_mock_server::create_mock_server
[−]
[src]
pub extern fn create_mock_server(pact_str: *const c_char, port: int32_t) -> int32_t
External interface to create a mock server. A pointer to the pact JSON as a C string is passed in, as well as the port for the mock server to run on. A value of 0 for the port will result in a port being allocated by the operating system. The port of the mock server is returned.
Errors
Errors are returned as negative values.
Error | Description |
---|---|
-1 | A null pointer was received |
-2 | The pact JSON could not be parsed |
-3 | The mock server could not be started |
-4 | The method paniced |