Avrora.Codec.extract_schema

You're seeing just the callback extract_schema, go back to Avrora.Codec module for more information.

Specs

extract_schema(payload :: binary()) ::
  {:ok, result :: Avrora.Schema.t()} | {:error, reason :: term()}

Extract schema from the binary Avro message.

Examples

...> payload = <<0, 0, 0, 0, 42, 72, 48, 48, 48, 48, 48, 48, 48, 48, 45, 48,
48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 123, 20, 174, 71, 225, 250, 47, 64>>
...> {:ok, schema} = Avrora.Codec.SchemaRegistry.extract_schema(payload)
...> schema.id
42
...> schema.full_name
"io.confluent.Payment"