(ctx context.Context, id string)
| 212 | } |
| 213 | |
| 214 | func (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 | |
| 232 | func (i *imlBalanceModule) syncGateway(ctx context.Context, clusterId string, releases []*gateway.DynamicRelease, online bool) error { |
| 233 | client, err := i.clusterService.GatewayClient(ctx, clusterId) |
nothing calls this directly
no test coverage detected