Documentation
¶
Overview ¶
Package insight is the console-facing InsightService handler: it serves every insight lens (the four VCS-history lenses from one cached git-log scan, plus the run-outcome volatility lens folded in fresh) as the magus.insight.v1alpha1 wire type. It is READ-only and maps types.InsightView to the wire at the boundary - the console service owns assembly and caching, this owns the wire, and types/ stays free of protobuf.
It is the typed replacement for the hand-marshaled JSON GET /api/v1/insight route, which remains mounted for now: that route is documented, so retiring it is its own breaking change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler serves GET /api/v1/insight: every insight lens as JSON (types.InsightView) - the four VCS-history lenses (hotspots, affinity, ownership, trend) from one bounded git-log scan cached by the service, plus the run-outcome volatility lens folded in fresh. A service with no workspace yields 503, not 500.
func NewHandler ¶
NewHandler returns the GET /api/v1/insight handler reading from src.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements insightv1alpha1connect.InsightServiceHandler over src.
func NewService ¶
func NewService(src insightSource) *Service
NewService builds the InsightService Connect handler reading from src.
func (*Service) GetInsight ¶
func (s *Service) GetInsight(ctx context.Context, _ *connect.Request[insightv1.GetInsightRequest]) (*connect.Response[insightv1.Insight], error)
GetInsight returns every lens in one message. A daemon with no workspace cannot scan anything, which is a transient condition of THIS daemon rather than a bad request or a bug, so it maps to CodeUnavailable (the Connect twin of the JSON route's 503) and the client keeps whatever it last rendered.