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

Method Delete

module/ai-balance/iml.go:214–230  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

212}
213
214func (i *imlBalanceModule) Delete(ctx context.Context, id string) error {
215 return i.transaction.Transaction(ctx, func(ctx context.Context) error {
216 err := i.balanceService.Delete(ctx, id)
217 if err != nil {
218 return err
219 }
220 return i.syncGateway(ctx, cluster.DefaultClusterID, []*gateway.DynamicRelease{
221 {
222 BasicItem: &gateway.BasicItem{
223 ID: id,
224 Resource: "ai-provider",
225 },
226 },
227 }, false)
228 })
229
230}
231
232func (i *imlBalanceModule) syncGateway(ctx context.Context, clusterId string, releases []*gateway.DynamicRelease, online bool) error {
233 client, err := i.clusterService.GatewayClient(ctx, clusterId)

Callers

nothing calls this directly

Calls 2

syncGatewayMethod · 0.95
DeleteMethod · 0.65

Tested by

no test coverage detected