@@ -13,7 +13,7 @@ import (
1313)
1414
1515type GlobalInsightService interface {
16- GetGlobalInsight (ctx context.Context ) (* api_types.GlobalInsight , error )
16+ GetGlobalInsight (ctx context.Context ) (* api_types.GlobalInsightBase , error )
1717}
1818
1919type defaultGlobalInsightService struct {
@@ -26,8 +26,8 @@ func NewDefaultGlobalInsightService(resourceStore core_store.ResourceStore) Glob
2626 return & defaultGlobalInsightService {resourceStore : resourceStore }
2727}
2828
29- func (gis * defaultGlobalInsightService ) GetGlobalInsight (ctx context.Context ) (* api_types.GlobalInsight , error ) {
30- globalInsights := & api_types.GlobalInsight {CreatedAt : core .Now ()}
29+ func (gis * defaultGlobalInsightService ) GetGlobalInsight (ctx context.Context ) (* api_types.GlobalInsightBase , error ) {
30+ globalInsights := & api_types.GlobalInsightBase {CreatedAt : core .Now ()}
3131
3232 meshInsights := & mesh.MeshInsightResourceList {}
3333 if err := gis .resourceStore .List (ctx , meshInsights ); err != nil {
@@ -61,7 +61,7 @@ func (gis *defaultGlobalInsightService) GetGlobalInsight(ctx context.Context) (*
6161
6262func (gis * defaultGlobalInsightService ) aggregateDataplanes (
6363 meshInsights * mesh.MeshInsightResourceList ,
64- globalInsight * api_types.GlobalInsight ,
64+ globalInsight * api_types.GlobalInsightBase ,
6565) {
6666 for _ , meshInsight := range meshInsights .GetItems () {
6767 dataplanesByType := meshInsight .GetSpec ().(* mesh_proto.MeshInsight ).GetDataplanesByType ()
@@ -88,7 +88,7 @@ func (gis *defaultGlobalInsightService) aggregateDataplanes(
8888
8989func (gis * defaultGlobalInsightService ) aggregatePolicies (
9090 meshInsights * mesh.MeshInsightResourceList ,
91- globalInsight * api_types.GlobalInsight ,
91+ globalInsight * api_types.GlobalInsightBase ,
9292) {
9393 for _ , meshInsight := range meshInsights .GetItems () {
9494 policies := meshInsight .GetSpec ().(* mesh_proto.MeshInsight ).GetPolicies ()
@@ -101,7 +101,7 @@ func (gis *defaultGlobalInsightService) aggregatePolicies(
101101
102102func (gis * defaultGlobalInsightService ) aggregateResources (
103103 meshInsights * mesh.MeshInsightResourceList ,
104- globalInsight * api_types.GlobalInsight ,
104+ globalInsight * api_types.GlobalInsightBase ,
105105) {
106106 globalInsight .Resources = map [string ]api_types.ResourceStats {}
107107 for _ , meshInsight := range meshInsights .GetItems () {
@@ -118,7 +118,7 @@ func (gis *defaultGlobalInsightService) aggregateResources(
118118
119119func (gis * defaultGlobalInsightService ) aggregateServices (
120120 ctx context.Context ,
121- globalInsight * api_types.GlobalInsight ,
121+ globalInsight * api_types.GlobalInsightBase ,
122122) error {
123123 serviceInsights := & mesh.ServiceInsightResourceList {}
124124 if err := gis .resourceStore .List (ctx , serviceInsights ); err != nil {
@@ -161,7 +161,7 @@ func updateServiceStatus(serviceStatus mesh_proto.ServiceInsight_Service_Status,
161161
162162func (gis * defaultGlobalInsightService ) aggregateZoneControlPlanes (
163163 ctx context.Context ,
164- globalInsight * api_types.GlobalInsight ,
164+ globalInsight * api_types.GlobalInsightBase ,
165165) error {
166166 zoneInsights := & system.ZoneInsightResourceList {}
167167 if err := gis .resourceStore .List (ctx , zoneInsights ); err != nil {
@@ -180,7 +180,7 @@ func (gis *defaultGlobalInsightService) aggregateZoneControlPlanes(
180180
181181func (gis * defaultGlobalInsightService ) aggregateZoneIngresses (
182182 ctx context.Context ,
183- globalInsight * api_types.GlobalInsight ,
183+ globalInsight * api_types.GlobalInsightBase ,
184184) error {
185185 zoneIngressInsights := & mesh.ZoneIngressInsightResourceList {}
186186 if err := gis .resourceStore .List (ctx , zoneIngressInsights ); err != nil {
@@ -199,7 +199,7 @@ func (gis *defaultGlobalInsightService) aggregateZoneIngresses(
199199
200200func (gis * defaultGlobalInsightService ) aggregateZoneEgresses (
201201 ctx context.Context ,
202- globalInsight * api_types.GlobalInsight ,
202+ globalInsight * api_types.GlobalInsightBase ,
203203) error {
204204 zoneEgressInsights := & mesh.ZoneEgressInsightResourceList {}
205205 if err := gis .resourceStore .List (ctx , zoneEgressInsights ); err != nil {
0 commit comments