MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / initGateway

Method initGateway

module/subscribe/iml.go:80–95  ·  view source on GitHub ↗
(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver)

Source from the content-addressed store, hash-verified

78}
79
80func (i *imlSubscribeModule) initGateway(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver) error {
81
82 projects, err := i.serviceService.List(ctx)
83 if err != nil {
84 return err
85 }
86 serviceIds := utils.SliceToSlice(projects, func(p *service.Service) string {
87 return p.Id
88 })
89 releases, err := i.getSubscribers(ctx, serviceIds)
90 if err != nil {
91 return err
92 }
93
94 return clientDriver.Subscribe().Online(ctx, releases...)
95}
96
97func (i *imlSubscribeModule) SearchSubscriptions(ctx context.Context, appId string, keyword string) ([]*subscribe_dto.SubscriptionItem, error) {
98 info, err := i.serviceService.Get(ctx, appId)

Callers

nothing calls this directly

Calls 4

getSubscribersMethod · 0.95
ListMethod · 0.65
OnlineMethod · 0.65
SubscribeMethod · 0.65

Tested by

no test coverage detected