Module: Avromatic
- Defined in:
- lib/avromatic.rb,
lib/avromatic/model.rb,
lib/avromatic/railtie.rb,
lib/avromatic/version.rb,
lib/avromatic/model/builder.rb,
lib/avromatic/model/attributes.rb,
lib/avromatic/model/custom_type.rb,
lib/avromatic/model/configurable.rb,
lib/avromatic/model/value_object.rb,
lib/avromatic/model/configuration.rb,
lib/avromatic/model/type_registry.rb,
lib/avromatic/model/message_decoder.rb,
lib/avromatic/model/null_custom_type.rb,
lib/avromatic/model/raw_serialization.rb,
lib/avromatic/model/passthrough_serializer.rb,
lib/avromatic/model/messaging_serialization.rb
Defined Under Namespace
Modules: Model Classes: Railtie
Constant Summary collapse
- VERSION =
'0.6.0'.freeze
Class Attribute Summary collapse
-
.logger ⇒ Object
Returns the value of attribute logger.
-
.messaging ⇒ Object
Returns the value of attribute messaging.
-
.registry_url ⇒ Object
Returns the value of attribute registry_url.
-
.schema_registry ⇒ Object
Returns the value of attribute schema_registry.
-
.schema_store ⇒ Object
Returns the value of attribute schema_store.
-
.type_registry ⇒ Object
Returns the value of attribute type_registry.
Class Method Summary collapse
- .build_messaging ⇒ Object
- .build_messaging! ⇒ Object
- .build_schema_registry ⇒ Object
- .configure {|_self| ... } ⇒ Object
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/avromatic.rb', line 8 def logger @logger end |
.messaging ⇒ Object
Returns the value of attribute messaging.
8 9 10 |
# File 'lib/avromatic.rb', line 8 def messaging @messaging end |
.registry_url ⇒ Object
Returns the value of attribute registry_url.
8 9 10 |
# File 'lib/avromatic.rb', line 8 def registry_url @registry_url end |
.schema_registry ⇒ Object
Returns the value of attribute schema_registry.
8 9 10 |
# File 'lib/avromatic.rb', line 8 def schema_registry @schema_registry end |
.schema_store ⇒ Object
Returns the value of attribute schema_store.
8 9 10 |
# File 'lib/avromatic.rb', line 8 def schema_store @schema_store end |
.type_registry ⇒ Object
Returns the value of attribute type_registry.
8 9 10 |
# File 'lib/avromatic.rb', line 8 def type_registry @type_registry end |
Class Method Details
.build_messaging ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/avromatic.rb', line 28 def self.build_messaging raise 'Avromatic must be configured with a schema_store' unless schema_store AvroTurf::Messaging.new( registry: schema_registry || build_schema_registry, schema_store: schema_store, logger: logger ) end |
.build_messaging! ⇒ Object
37 38 39 |
# File 'lib/avromatic.rb', line 37 def self.build_messaging! self.messaging = build_messaging end |
.build_schema_registry ⇒ Object
21 22 23 24 25 26 |
# File 'lib/avromatic.rb', line 21 def self.build_schema_registry raise 'Avromatic must be configured with a registry_url' unless registry_url AvroTurf::CachedSchemaRegistry.new( AvroTurf::SchemaRegistry.new(registry_url, logger: logger) ) end |
.configure {|_self| ... } ⇒ Object
17 18 19 |
# File 'lib/avromatic.rb', line 17 def self.configure yield self end |