Versions in this module Expand all Collapse all v3 v3.0.0 Nov 2, 2023 Changes in this version + const RoutineStateDone + const RoutineStateFailed + const RoutineStateRun + const RoutineStateStandby + const RoutineStateUnknown + var ErrNotFound = errors.New("not found") + func DefaultLogInit(logfile *os.File, loglevel logrus.Level, formatter logrus.Formatter) (*logrus.Logger, error) + type App struct + func (a *App) RoutineShutdown(name string) + func (a *App) RoutineStart(name string) error + func (a *App) RoutineState(name string) routineState + func (a *App) SelfCtx() context.Context + func (a *App) SelfCtxDone() <-chan struct{} + func (a *App) SelfNameGet() string + func (a *App) Shutdown(e error) + func (a *App) ValueC() <-chan any + func (a *App) ValueGet() any + func (a *App) ValueSet(v any) + type AppCtx struct + func Init(ctx context.Context) *AppCtx + func (appctx *AppCtx) ValueInitHandlerSet(vh ValueInitHandler) *AppCtx + func (ax *AppCtx) RoutinesSet(routines map[string]RoutineParam) *AppCtx + func (ax *AppCtx) Run() error + func (ax *AppCtx) SignalsSet(sigs []SignalsParam) *AppCtx + type RoutineHandler func(App) error + type RoutineParam struct + Handler RoutineHandler + type SigHandler func(Signal) + type Signal struct + func (s *Signal) Ctx() context.Context + func (s *Signal) CtxDone() <-chan struct{} + func (s *Signal) RoutineShutdown(name string) + func (s *Signal) RoutineStart(name string) error + func (s *Signal) RoutineState(name string) routineState + func (s *Signal) Shutdown(e error) + func (s *Signal) SignalGet() os.Signal + func (s *Signal) ValueGet() any + func (s *Signal) ValueSet(v any) + type SignalsParam struct + Handler SigHandler + Signals []os.Signal + type ValueInitHandler func() (any, error) Other modules containing this package github.com/nixys/nxs-go-appctx/v2