Versions in this module Expand all Collapse all v1 v1.3.5 Jul 23, 2026 v1.3.4 Jul 21, 2026 v1.3.3 Jul 20, 2026 v1.3.2 Jul 20, 2026 v1.3.1 May 25, 2026 v1.3.0 May 21, 2026 v1.2.5 May 9, 2026 v1.2.4 May 9, 2026 v1.2.3 May 9, 2026 v1.2.2 May 8, 2026 v1.2.1 May 8, 2026 v1.2.0 May 8, 2026 Changes in this version + var ErrServerExists = errors.New("server already exists") + var ErrServerNotFound = errors.New("server not found") + var ErrServerNotRunning = errors.New("server is not running") + var ErrServerRunning = errors.New("server is running") + type ManagedServer struct + Config *config.ServerConfig + CreatedAt time.Time + LastError error + Name string + Process *supervisor.ManagedProcess + RestartCount int + StartedAt time.Time + State State + StoppedAt time.Time + func (s *ManagedServer) IsRunning() bool + func (s *ManagedServer) IsStopped() bool + func (s *ManagedServer) PID() int + func (s *ManagedServer) Port() int + func (s *ManagedServer) Status() ServerStatus + func (s *ManagedServer) Transport() config.TransportType + func (s *ManagedServer) Uptime() time.Duration + type Registry struct + func NewRegistry(sup *supervisor.Supervisor, logger *slog.Logger) *Registry + func (r *Registry) Add(name string, cfg *config.ServerConfig) error + func (r *Registry) Count() int + func (r *Registry) Get(name string) *ManagedServer + func (r *Registry) List() []*ManagedServer + func (r *Registry) LoadFromConfig(cfg *config.Config) error + func (r *Registry) Names() []string + func (r *Registry) Remove(name string) error + func (r *Registry) Restart(name string) error + func (r *Registry) SetEventHandler(handler ServerEventHandler) + func (r *Registry) Start(name string) error + func (r *Registry) StartAll(ctx context.Context) error + func (r *Registry) Status() RegistryStatus + func (r *Registry) Stop(name string) error + func (r *Registry) StopAll(ctx context.Context) error + type RegistryStatus struct + FailedServers int + RunningServers int + Servers []ServerStatus + StoppedServers int + TotalServers int + type RequiredStartupError struct + Failures []string + Joined error + func (e *RequiredStartupError) Error() string + func (e *RequiredStartupError) Unwrap() error + type ServerEvent struct + Name string + Server *ManagedServer + Type ServerEventType + type ServerEventHandler func(event ServerEvent) + type ServerEventType int + const EventServerStarted + const EventServerStopped + type ServerStatus struct + Autostart bool + LastError string + Name string + PID int + Port int + Required bool + RestartCount int + State State + Transport config.TransportType + Uptime time.Duration + type State string + const StateCrashed + const StateFailed + const StateRunning + const StateStarting + const StateStopped + const StateStopping