package component

import (
	"context"
)

// Component is the interface that all long-running services or modules
// must implement. It provides a standardized way to manage their lifecycle.
type Component interface {
	// Start begins the execution of the component.
	// It should be a blocking call, typically by launching one or more
	// goroutines to perform its work. The provided context should be used
	// to handle cancellation and graceful shutdown signals.
	Start(ctx context.Context) error

	// Name returns the unique, human-readable name of the component.
	// This name is used for logging, metrics, and identification purposes.
	Name() string
}
