github.com/petermattis/pebble@v0.0.0-20190905164901-ab51a2166067/error_iter.go (about) 1 // Copyright 2018 The LevelDB-Go and Pebble Authors. All rights reserved. Use 2 // of this source code is governed by a BSD-style license that can be found in 3 // the LICENSE file. 4 5 package pebble 6 7 type errorIter struct { 8 err error 9 } 10 11 var _ internalIterator = (*errorIter)(nil) 12 13 func newErrorIter(err error) *errorIter { 14 return &errorIter{err: err} 15 } 16 17 func (c *errorIter) SeekGE(key []byte) (*InternalKey, []byte) { 18 return nil, nil 19 } 20 21 func (c *errorIter) SeekPrefixGE(prefix, key []byte) (*InternalKey, []byte) { 22 return nil, nil 23 } 24 25 func (c *errorIter) SeekLT(key []byte) (*InternalKey, []byte) { 26 return nil, nil 27 } 28 29 func (c *errorIter) First() (*InternalKey, []byte) { 30 return nil, nil 31 } 32 33 func (c *errorIter) Last() (*InternalKey, []byte) { 34 return nil, nil 35 } 36 37 func (c *errorIter) Next() (*InternalKey, []byte) { 38 return nil, nil 39 } 40 41 func (c *errorIter) Prev() (*InternalKey, []byte) { 42 return nil, nil 43 } 44 45 func (c *errorIter) Key() *InternalKey { 46 return nil 47 } 48 49 func (c *errorIter) Value() []byte { 50 return nil 51 } 52 53 func (c *errorIter) Valid() bool { 54 return false 55 } 56 57 func (c *errorIter) Error() error { 58 return c.err 59 } 60 61 func (c *errorIter) Close() error { 62 return c.err 63 } 64 65 func (c *errorIter) SetBounds(lower, upper []byte) {}