feat(platform): expose vehicle service runtime health
This commit is contained in:
@@ -36,13 +36,18 @@ type RawFrameQuery struct {
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
store Store
|
||||
store Store
|
||||
runtime RuntimeInfo
|
||||
}
|
||||
|
||||
func NewService(store Store) *Service {
|
||||
return &Service{store: store}
|
||||
}
|
||||
|
||||
func NewServiceWithRuntime(store Store, runtime RuntimeInfo) *Service {
|
||||
return &Service{store: store, runtime: runtime}
|
||||
}
|
||||
|
||||
func (s *Service) DashboardSummary(ctx context.Context) (DashboardSummary, error) {
|
||||
return s.store.DashboardSummary(ctx)
|
||||
}
|
||||
@@ -282,7 +287,12 @@ func (s *Service) QualityIssues(ctx context.Context, query url.Values) (Page[Qua
|
||||
}
|
||||
|
||||
func (s *Service) OpsHealth(ctx context.Context) (OpsHealth, error) {
|
||||
return s.store.OpsHealth(ctx)
|
||||
health, err := s.store.OpsHealth(ctx)
|
||||
if err != nil {
|
||||
return OpsHealth{}, err
|
||||
}
|
||||
health.Runtime = s.runtime
|
||||
return health, nil
|
||||
}
|
||||
|
||||
func (s *Service) resolveVehicleQuery(ctx context.Context, query url.Values) (url.Values, error) {
|
||||
|
||||
Reference in New Issue
Block a user