Added filters to snapshots API

Signed-off-by: bpopovschi <zyqsempai@mail.ru>
This commit is contained in:
bpopovschi
2019-10-02 12:24:29 +03:00
committed by Derek McGowan
parent c59561a08e
commit e8c14c07c6
12 changed files with 162 additions and 74 deletions

View File

@@ -283,7 +283,7 @@ func (o *snapshotter) Remove(ctx context.Context, key string) (err error) {
}
// Walk the committed snapshots.
func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error {
func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error {
ctx, t, err := o.ms.TransactionContext(ctx, false)
if err != nil {
return err