services

package
v0.0.4-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager orchestrates multiple services with proper startup/shutdown order

func NewManager

func NewManager() *Manager

NewManager creates a new service manager

func (*Manager) AddService

func (m *Manager) AddService(service Service)

AddService registers a service with the manager

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

Start starts all services in order

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

Stop stops all services in reverse order

type Service

type Service interface {
	// Start initializes and starts the service
	Start(ctx context.Context) error

	// Stop gracefully shuts down the service
	Stop(ctx context.Context) error

	// Name returns the service name for logging
	Name() string

	// HealthCheck returns the health status of the service
	HealthCheck() error
}

Service defines the common interface for all services

Directories

Path Synopsis
web
templates
templ: version: v0.3.960
templ: version: v0.3.960

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL