module Karafka::Parsers::Avro

Constants

VERSION

Public Class Methods

from_path(schema_name, codec: nil) click to toggle source
# File lib/karafka/parsers/avro.rb, line 26
def self.from_path(schema_name, codec: nil)
  raise ArgumentError, 'You have to specify schemas_path first' if @schemas_path.nil?

  Parser.new(AvroTurf.new(schemas_path: @schemas_path, codec: codec), schema_name)
end
from_registry(schema_name = nil) click to toggle source
# File lib/karafka/parsers/avro.rb, line 20
def self.from_registry(schema_name = nil)
  raise ArgumentError, 'You have to specify registry_path first' if @registry_url.nil?

  Parser.new(AvroTurf::Messaging.new(registry_url: @registry_url), schema_name)
end
registry_url=(registry_url) click to toggle source
# File lib/karafka/parsers/avro.rb, line 12
def self.registry_url=(registry_url)
  @registry_url = registry_url
end
schemas_path=(schemas_path) click to toggle source
# File lib/karafka/parsers/avro.rb, line 16
def self.schemas_path=(schemas_path)
  @schemas_path = schemas_path
end