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

Method Offline

gateway/apinto/service.go:33–45  ·  view source on GitHub ↗
(ctx context.Context, resources ...*gateway.ServiceRelease)

Source from the content-addressed store, hash-verified

31}
32
33func (s *ServiceClient) Offline(ctx context.Context, resources ...*gateway.ServiceRelease) error {
34 s.client.Begin(ctx)
35 for _, r := range resources {
36 for _, api := range r.Apis {
37 err := s.client.HDel(ctx, fmt.Sprintf("%s:%s", KeyServiceOfApi, api), r.ID)
38 if err != nil {
39 s.client.Rollback(ctx)
40 return err
41 }
42 }
43 }
44 return s.client.Commit(ctx)
45}
46
47func NewServiceClient(client admin_client.Client) *ServiceClient {
48 return &ServiceClient{client: client}

Callers

nothing calls this directly

Calls 3

BeginMethod · 0.65
RollbackMethod · 0.65
CommitMethod · 0.65

Tested by

no test coverage detected