28 lines
545 B
Go
28 lines
545 B
Go
package app
|
|
|
|
import (
|
|
"context"
|
|
"log/slog"
|
|
|
|
"ai-operator/internal/config"
|
|
)
|
|
|
|
type App struct {
|
|
logger *slog.Logger
|
|
cfg config.Config
|
|
}
|
|
|
|
func New(logger *slog.Logger, cfg config.Config) *App {
|
|
return &App{logger: logger, cfg: cfg}
|
|
}
|
|
|
|
func (a *App) Start(ctx context.Context) error {
|
|
a.logger.InfoContext(ctx, "skeleton app started", "ari_app", a.cfg.Asterisk.ARIApp, "media_mode", a.cfg.Asterisk.MediaMode)
|
|
return nil
|
|
}
|
|
|
|
func (a *App) Stop(ctx context.Context) error {
|
|
a.logger.InfoContext(ctx, "skeleton app stopping")
|
|
return nil
|
|
}
|