macula_cluster_controller (macula v0.20.5)

View Source

Macula Cluster Controller

Application lifecycle management: - Deploy applications from registry - Upgrade to newer versions - Stop running applications - Auto-update policy enforcement

Summary

Functions

Deploy an application (latest version)

Deploy a specific version of an application

Get status of a specific application

Get auto-update policy for an application

List all deployed applications

Remove an application completely

Set auto-update policy for an application

Start the cluster controller

Stop a running application

Upgrade an application to a new version

Types

auto_update_policy/0

-type auto_update_policy() :: always | major | minor | never.

Functions

deploy_app(PackageName)

-spec deploy_app(PackageName :: binary()) -> {ok, pid()} | {error, term()}.

Deploy an application (latest version)

deploy_app(PackageName, Version)

-spec deploy_app(PackageName :: binary(), Version :: binary()) -> {ok, pid()} | {error, term()}.

Deploy a specific version of an application

get_app_status(PackageName)

-spec get_app_status(PackageName :: binary()) -> {ok, map()} | {error, not_found}.

Get status of a specific application

get_auto_update_policy(PackageName)

-spec get_auto_update_policy(PackageName :: binary()) -> auto_update_policy().

Get auto-update policy for an application

list_deployed_apps()

-spec list_deployed_apps() -> [map()].

List all deployed applications

remove_app(PackageName)

-spec remove_app(PackageName :: binary()) -> ok | {error, not_found}.

Remove an application completely

set_auto_update_policy(PackageName, Policy)

-spec set_auto_update_policy(PackageName :: binary(), Policy :: auto_update_policy()) -> ok.

Set auto-update policy for an application

start_link(Config)

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

Start the cluster controller

stop_app(PackageName)

-spec stop_app(PackageName :: binary()) -> ok | {error, not_running}.

Stop a running application

upgrade_app(PackageName, NewVersion)

-spec upgrade_app(PackageName :: binary(), NewVersion :: binary()) -> ok | {error, term()}.

Upgrade an application to a new version