railway-ipc 0.1.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -3
- data/CHANGELOG.md +61 -0
- data/Gemfile +2 -2
- data/README.md +2 -2
- data/Rakefile +10 -4
- data/bin/console +3 -3
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/lib/railway_ipc.rb +9 -11
- data/lib/railway_ipc/Rakefile +2 -0
- data/lib/railway_ipc/consumer/consumer.rb +33 -73
- data/lib/railway_ipc/consumer/process_incoming_message.rb +111 -0
- data/lib/railway_ipc/errors.rb +9 -1
- data/lib/railway_ipc/handler.rb +17 -3
- data/lib/railway_ipc/handler_store.rb +5 -2
- data/lib/railway_ipc/incoming_message.rb +51 -0
- data/lib/railway_ipc/logger.rb +32 -26
- data/lib/railway_ipc/models/consumed_message.rb +40 -35
- data/lib/railway_ipc/models/published_message.rb +11 -9
- data/lib/railway_ipc/publisher.rb +77 -3
- data/lib/railway_ipc/rabbitmq/adapter.rb +23 -15
- data/lib/railway_ipc/rabbitmq/payload.rb +9 -4
- data/lib/railway_ipc/railtie.rb +2 -0
- data/lib/railway_ipc/responder.rb +10 -3
- data/lib/railway_ipc/response.rb +4 -1
- data/lib/railway_ipc/rpc/client/client.rb +43 -18
- data/lib/railway_ipc/rpc/client/client_response_handlers.rb +2 -0
- data/lib/railway_ipc/rpc/client/errors/timeout_error.rb +2 -0
- data/lib/railway_ipc/rpc/concerns/error_adapter_configurable.rb +2 -0
- data/lib/railway_ipc/rpc/concerns/message_observation_configurable.rb +2 -0
- data/lib/railway_ipc/rpc/concerns/publish_location_configurable.rb +2 -0
- data/lib/railway_ipc/rpc/rpc.rb +2 -0
- data/lib/railway_ipc/rpc/server/server.rb +25 -7
- data/lib/railway_ipc/rpc/server/server_response_handlers.rb +2 -0
- data/lib/railway_ipc/tasks/generate_migrations.rake +16 -16
- data/lib/railway_ipc/tasks/start_consumers.rake +3 -1
- data/lib/railway_ipc/tasks/start_servers.rake +3 -1
- data/lib/railway_ipc/unhandled_message_error.rb +2 -0
- data/lib/railway_ipc/unknown_message.pb.rb +18 -0
- data/lib/railway_ipc/version.rb +3 -1
- data/priv/migrations/add_railway_ipc_consumed_messages.rb +5 -3
- data/priv/migrations/add_railway_ipc_published_messages.rb +3 -1
- data/railway_ipc.gemspec +34 -30
- metadata +65 -66
- data/.rspec +0 -3
- data/.travis.yml +0 -7
- data/Gemfile.lock +0 -186
- data/lib/railway_ipc/base_message.pb.rb +0 -21
- data/lib/railway_ipc/consumer/consumer_response_handlers.rb +0 -14
- data/lib/railway_ipc/handler_manifest.rb +0 -10
- data/lib/railway_ipc/null_handler.rb +0 -7
- data/lib/railway_ipc/null_message.rb +0 -7
@@ -1,21 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: lib/src/events/base_message.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message "railway_ipc.BaseMessage" do
|
8
|
-
optional :user_uuid, :string, 1
|
9
|
-
optional :correlation_id, :string, 2
|
10
|
-
optional :uuid, :string, 3
|
11
|
-
map :context, :string, :string, 4
|
12
|
-
optional :data, :message, 5, "railway_ipc.BaseMessage.Data"
|
13
|
-
end
|
14
|
-
add_message "railway_ipc.BaseMessage.Data" do
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
module RailwayIpc
|
19
|
-
BaseMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("railway_ipc.BaseMessage").msgclass
|
20
|
-
BaseMessage::Data = Google::Protobuf::DescriptorPool.generated_pool.lookup("railway_ipc.BaseMessage.Data").msgclass
|
21
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'railway_ipc/handler_store'
|
2
|
-
module RailwayIpc
|
3
|
-
class ConsumerResponseHandlers
|
4
|
-
include Singleton
|
5
|
-
extend Forwardable
|
6
|
-
def_delegators :handler_store, :registered, :register, :get
|
7
|
-
|
8
|
-
private
|
9
|
-
|
10
|
-
def handler_store
|
11
|
-
@handler_store ||= RailwayIpc::HandlerStore.new
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|