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

Method Online

gateway/apinto/application.go:25–38  ·  view source on GitHub ↗
(ctx context.Context, applications ...*gateway.ApplicationRelease)

Source from the content-addressed store, hash-verified

23}
24
25func (a *ApplicationClient) Online(ctx context.Context, applications ...*gateway.ApplicationRelease) error {
26 err := a.client.Begin(ctx)
27 if err != nil {
28 return err
29 }
30 for _, app := range applications {
31 err = a.client.Set(ctx, genWorkerID(app.ID, gateway.ProfessionApplication), a.toApinto(app))
32 if err != nil {
33 a.client.Rollback(ctx)
34 return err
35 }
36 }
37 return a.client.Commit(ctx)
38}
39
40func (a *ApplicationClient) Offline(ctx context.Context, applications ...*gateway.ApplicationRelease) error {
41 err := a.client.Begin(ctx)

Callers

nothing calls this directly

Calls 6

toApintoMethod · 0.95
genWorkerIDFunction · 0.85
BeginMethod · 0.65
SetMethod · 0.65
RollbackMethod · 0.65
CommitMethod · 0.65

Tested by

no test coverage detected