macula_registry_store (macula v0.20.5)

View Source

Macula Registry Store

Handles local package storage with ETS index and disk persistence: - Package metadata stored in ETS for fast lookups - BEAM archives stored on disk - TTL-based cleanup for stale entries - DHT integration for distributed discovery

Summary

Functions

Get the latest version of a package

Get a package by name (latest version)

Get a package by name and version

Get all versions of a package

List all packages

Check if a package version exists

Remove expired packages

Search packages by pattern

Start the registry store

Store a package in the registry

Functions

delete_package(Pid, PackageName, Version)

-spec delete_package(pid(), binary(), binary()) -> ok | {error, not_found}.

Delete a package version

get_latest_version(Pid, PackageName)

-spec get_latest_version(pid(), binary()) -> {ok, binary()} | {error, not_found}.

Get the latest version of a package

get_package(Pid, PackageName)

-spec get_package(pid(), binary()) -> {ok, map()} | {error, not_found}.

Get a package by name (latest version)

get_package(Pid, PackageName, Version)

-spec get_package(pid(), binary(), binary()) -> {ok, map()} | {error, not_found}.

Get a package by name and version

get_versions(Pid, PackageName)

-spec get_versions(pid(), binary()) -> [binary()].

Get all versions of a package

list_packages(Pid)

-spec list_packages(pid()) -> [map()].

List all packages

package_exists(Pid, PackageName, Version)

-spec package_exists(pid(), binary(), binary()) -> boolean().

Check if a package version exists

prune_expired(Pid)

-spec prune_expired(pid()) -> {ok, non_neg_integer()}.

Remove expired packages

search_packages(Pid, Pattern)

-spec search_packages(pid(), binary()) -> [map()].

Search packages by pattern

start_link(Config)

-spec start_link(Config :: map()) -> {ok, pid()} | {error, term()}.

Start the registry store

store_package(Pid, PackageData)

-spec store_package(pid(), map()) -> {ok, binary()} | {error, term()}.

Store a package in the registry