Search documentation of macula

# macula_cluster_controller (macula v0.44.2)

View Source

Macula Cluster Controller

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

# Summary

## Types

auto_update_policy/0

## Functions

deploy_app(PackageName)

Deploy an application (latest version)

deploy_app(PackageName, Version)

Deploy a specific version of an application

get_app_status(PackageName)

Get status of a specific application

get_auto_update_policy(PackageName)

Get auto-update policy for an application

list_deployed_apps()

List all deployed applications

remove_app(PackageName)

Remove an application completely

set_auto_update_policy(PackageName, Policy)

Set auto-update policy for an application

start_link(Config)

Start the cluster controller

stop_app(PackageName)

Stop a running application

upgrade_app(PackageName, NewVersion)

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