Avrora.Storage.File (avrora v0.30.2)

View Source

Avora.Storage behavior implementation which uses the filesystem.

Schema name <namespace>.<namespace>.<name> will be stored to path namespace/namespace/name.avsc.

Summary

Functions

Read schema from disk by full name, including namespace.

Functions

get(key)

Read schema from disk by full name, including namespace.

Files are stored with each namespace component as a folder name. For example io.acme.Payment should be stored as follows:

.
├── lib/
├── priv/
│   ├── ...
│   └── schemas/
│       └── io/
│           └── acme/
│               └── Payment.avsc
└── ...

Examples

iex> {:ok, schema} = Avrora.Storage.File.get("io.acme.Payment")
iex> schema.full_name
"io.acme.Payment"