Sha256: 0fbb4d03cb72de746d55e44425f2a988dae33c0bd834c67f474241f69376ea23
Contents?: true
Size: 719 Bytes
Versions: 118
Compression:
Stored size: 719 Bytes
Contents
# frozen_string_literal: true require_relative 'avro_base' module Deimos module SchemaBackends # Encode / decode using local Avro encoding. class AvroLocal < AvroBase # @override def decode_payload(payload, schema:) avro_turf.decode(payload, schema_name: schema, namespace: @namespace) end # @override def encode_payload(payload, schema: nil, topic: nil) avro_turf.encode(payload, schema_name: schema, namespace: @namespace) end private # @return [AvroTurf] def avro_turf @avro_turf ||= AvroTurf.new( schemas_path: Deimos.config.schema.path, schema_store: @schema_store ) end end end end
Version data entries
118 entries across 118 versions & 2 rubygems