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

Method Offline

gateway/apinto/strategy.go:34–44  ·  view source on GitHub ↗
(ctx context.Context, resources ...*eosc.Base[gateway.StrategyRelease])

Source from the content-addressed store, hash-verified

32}
33
34func (s *StrategyClient) Offline(ctx context.Context, resources ...*eosc.Base[gateway.StrategyRelease]) error {
35 s.client.Begin(ctx)
36 for _, r := range resources {
37 err := s.client.Del(ctx, genWorkerID(r.Config.Name, gateway.ProfessionStrategy))
38 if err != nil {
39 s.client.Rollback(ctx)
40 return err
41 }
42 }
43 return s.client.Commit(ctx)
44}
45
46func NewStrategyClient(client admin_client.Client) *StrategyClient {
47 return &StrategyClient{client: client}

Callers

nothing calls this directly

Calls 5

genWorkerIDFunction · 0.85
BeginMethod · 0.65
RollbackMethod · 0.65
CommitMethod · 0.65
DelMethod · 0.45

Tested by

no test coverage detected