RemovePool deletes a pool from the configuration journal and deletes all data associated with the pool.
(ctx context.Context, id ksuid.KSUID)
| 345 | // RemovePool deletes a pool from the configuration journal and deletes all |
| 346 | // data associated with the pool. |
| 347 | func (r *Root) RemovePool(ctx context.Context, id ksuid.KSUID) error { |
| 348 | config, err := r.pools.LookupByID(ctx, id) |
| 349 | if err != nil { |
| 350 | return err |
| 351 | } |
| 352 | if err := r.pools.Remove(ctx, *config); err != nil { |
| 353 | return err |
| 354 | } |
| 355 | // This pool might be cached on other cluster nodes, but that's fine. |
| 356 | // With no entry in the pool store, it will be inaccessible and |
| 357 | // eventually evicted by the cache's LRU algorithm. |
| 358 | r.poolCache.Remove(config.ID) |
| 359 | return RemovePool(ctx, r.engine, r.path, config) |
| 360 | } |
| 361 | |
| 362 | func (r *Root) CreateBranch(ctx context.Context, poolID ksuid.KSUID, name string, parent ksuid.KSUID) (*branches.Config, error) { |
| 363 | config, err := r.pools.LookupByID(ctx, poolID) |
nothing calls this directly
no test coverage detected