initial commit

This commit is contained in:
Peter Harpending 2026-04-20 12:46:53 -07:00
commit f71826357b
6 changed files with 105 additions and 0 deletions

20
.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
.rebar3
_build
_checkouts
_vendor
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
.erlang.cookie
ebin
log
erl_crash.dump
.rebar
logs
.idea
*.iml
rebar3.crashdump
*~

9
README.md Normal file
View File

@ -0,0 +1,9 @@
gmplugin_hello
=====
An OTP application
Build
-----
$ rebar3 compile

7
rebar.config Normal file
View File

@ -0,0 +1,7 @@
{erl_opts, [debug_info]}.
{deps, []}.
{shell, [
%% {config, "config/sys.config"},
{apps, [gmplugin_hello]}
]}.

View File

@ -0,0 +1,14 @@
{application, gmplugin_hello, [
{description, "An OTP application"},
{vsn, "0.1.0"},
{registered, []},
{mod, {gmplugin_hello_app, []}},
{applications, [
kernel,
stdlib
]},
{env, []},
{modules, []},
{licenses, ["Apache-2.0"]},
{links, []}
]}.

View File

@ -0,0 +1,18 @@
%%%-------------------------------------------------------------------
%% @doc gmplugin_hello public API
%% @end
%%%-------------------------------------------------------------------
-module(gmplugin_hello_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
gmplugin_hello_sup:start_link().
stop(_State) ->
ok.
%% internal functions

View File

@ -0,0 +1,37 @@
%%%-------------------------------------------------------------------
%% @doc gmplugin_hello top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(gmplugin_hello_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
%% sup_flags() = #{strategy => strategy(), % optional
%% intensity => non_neg_integer(), % optional
%% period => pos_integer()} % optional
%% child_spec() = #{id => child_id(), % mandatory
%% start => mfargs(), % mandatory
%% restart => restart(), % optional
%% shutdown => shutdown(), % optional
%% type => worker(), % optional
%% modules => modules()} % optional
init([]) ->
SupFlags = #{
strategy => one_for_all,
intensity => 0,
period => 1
},
ChildSpecs = [],
{ok, {SupFlags, ChildSpecs}}.
%% internal functions