MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / Top10

Method Top10

controller/monitor/iml.go:175–186  ·  view source on GitHub ↗
(ctx *gin.Context, input *monitor_dto.Top10Input)

Source from the content-addressed store, hash-verified

173}
174
175func (i *imlMonitorStatisticController) Top10(ctx *gin.Context, input *monitor_dto.Top10Input) (interface{}, error) {
176 switch input.DataType {
177 case monitor_dto.DataTypeApi:
178 return i.module.TopAPIStatistics(ctx, 10, input.CommonInput)
179 case monitor_dto.DataTypeProvider:
180 return i.module.TopProviderStatistics(ctx, 10, input.CommonInput)
181 case monitor_dto.DataTypeSubscriber:
182 return i.module.TopSubscriberStatistics(ctx, 10, input.CommonInput)
183 default:
184 return nil, fmt.Errorf("unsupported data type: %s", input.DataType)
185 }
186}
187
188var (
189 _ IMonitorConfigController = (*imlMonitorConfig)(nil)

Callers

nothing calls this directly

Calls 3

TopAPIStatisticsMethod · 0.65
TopProviderStatisticsMethod · 0.65

Tested by

no test coverage detected