Skip to content

Instantly share code, notes, and snippets.

@bethesque
Last active August 14, 2019 04:23
Show Gist options
  • Save bethesque/9ad8e50be72aba6c98afde63f2a3d440 to your computer and use it in GitHub Desktop.
Save bethesque/9ad8e50be72aba6c98afde63f2a3d440 to your computer and use it in GitHub Desktop.
synchronous message
some_provider.given("a thing", "foo" => "bar")
.and("another thing", "blah" => "blah")
.upon_receiving("some message")
.with(
contents: {"the" => "contents"},
metadata: {"some" => "info"})
.will_respond_with(
contents: {"the" => "response"},
metadata: {"some" => "other info"}
)
lambda_client = AWS::Lamda::Client.new
client = SomeProviderClient.new(lambda_client)
response_message = client.send_request_message(
contents: {"the" => "contents"},
metadata: {"some" => "info"}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment