Current section

Files

Jump to
cmdc lib cmdc application.ex
Raw

lib/cmdc/application.ex

defmodule CMDC.Application do
@moduledoc "CMDC OTP 应用入口。"
use Application
@impl true
def start(_type, _args) do
CMDC.EventBus.init_buffer_tables()
children = [
{Registry, keys: :duplicate, name: CMDC.EventBus.Registry},
{Registry, keys: :unique, name: CMDC.MCP.Registry},
{Registry, keys: :unique, name: CMDC.SessionRegistry}
]
opts = [strategy: :one_for_one, name: CMDC.Supervisor]
Supervisor.start_link(children, opts)
end
end