(ctx context.Context, fn snapshots.WalkFunc, fs ...string)
| 155 | } |
| 156 | |
| 157 | func (p *proxySnapshotter) Walk(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error { |
| 158 | sc, err := p.client.List(ctx, &snapshotsapi.ListSnapshotsRequest{ |
| 159 | Snapshotter: p.snapshotterName, |
| 160 | Filters: fs, |
| 161 | }) |
| 162 | if err != nil { |
| 163 | return errgrpc.ToNative(err) |
| 164 | } |
| 165 | for { |
| 166 | resp, err := sc.Recv() |
| 167 | if err != nil { |
| 168 | if err == io.EOF { |
| 169 | return nil |
| 170 | } |
| 171 | return errgrpc.ToNative(err) |
| 172 | } |
| 173 | if resp == nil { |
| 174 | return nil |
| 175 | } |
| 176 | for _, info := range resp.Info { |
| 177 | if err := fn(ctx, InfoFromProto(info)); err != nil { |
| 178 | return err |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | func (p *proxySnapshotter) Close() error { |
| 185 | return nil |
nothing calls this directly
no test coverage detected