(ctx context.Context, filters ...string)
| 828 | } |
| 829 | |
| 830 | func (mm *mountManager) List(ctx context.Context, filters ...string) ([]mount.ActivationInfo, error) { |
| 831 | namespace, err := namespaces.NamespaceRequired(ctx) |
| 832 | if err != nil { |
| 833 | return nil, err |
| 834 | } |
| 835 | |
| 836 | var infos []mount.ActivationInfo |
| 837 | if err := mm.db.View(func(tx *bolt.Tx) error { |
| 838 | mbkt := getBucket(tx, []byte("v1"), []byte(namespace), bucketKeyMounts) |
| 839 | if mbkt == nil { |
| 840 | return nil |
| 841 | } |
| 842 | |
| 843 | return mbkt.ForEachBucket(func(k []byte) error { |
| 844 | info, err := readActivationInfo(string(k), mbkt.Bucket(k)) |
| 845 | if err != nil { |
| 846 | return err |
| 847 | } |
| 848 | infos = append(infos, info) |
| 849 | return nil |
| 850 | }) |
| 851 | }); err != nil { |
| 852 | return nil, err |
| 853 | } |
| 854 | return infos, nil |
| 855 | } |
| 856 | |
| 857 | func (mm *mountManager) StartCollection(ctx context.Context) (metadata.CollectionContext, error) { |
| 858 | // lock now and collection will unlock on cancel or finish |
nothing calls this directly
no test coverage detected