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

Method Offline

gateway/apinto/subscribe.go:33–44  ·  view source on GitHub ↗
(ctx context.Context, resources ...*gateway.SubscribeRelease)

Source from the content-addressed store, hash-verified

31}
32
33func (s *SubscribeClient) Offline(ctx context.Context, resources ...*gateway.SubscribeRelease) error {
34 s.client.Begin(ctx)
35 var err error
36 for _, r := range resources {
37 err = s.client.HDel(ctx, fmt.Sprintf("%s:%s", KeySubscribeService, r.Application), r.Service)
38 if err != nil {
39 s.client.Rollback(ctx)
40 return err
41 }
42 }
43 return s.client.Commit(ctx)
44}
45
46func NewSubscribeClient(client admin_client.Client) *SubscribeClient {
47 return &SubscribeClient{client: client}

Callers

nothing calls this directly

Calls 3

BeginMethod · 0.65
RollbackMethod · 0.65
CommitMethod · 0.65

Tested by

no test coverage detected