[WIP] lint a bit, update deps
This commit is contained in:
19
vendor/github.com/cockroachdb/pebble/objstorage/noop_readahead.go
generated
vendored
19
vendor/github.com/cockroachdb/pebble/objstorage/noop_readahead.go
generated
vendored
@@ -4,26 +4,31 @@
|
||||
|
||||
package objstorage
|
||||
|
||||
import "io"
|
||||
import "context"
|
||||
|
||||
// NoopReadHandle can be used by Readable implementations that don't
|
||||
// support read-ahead.
|
||||
type NoopReadHandle struct {
|
||||
io.ReaderAt
|
||||
readable Readable
|
||||
}
|
||||
|
||||
// MakeNoopReadHandle initializes a NoopReadHandle.
|
||||
func MakeNoopReadHandle(r io.ReaderAt) NoopReadHandle {
|
||||
return NoopReadHandle{ReaderAt: r}
|
||||
func MakeNoopReadHandle(r Readable) NoopReadHandle {
|
||||
return NoopReadHandle{readable: r}
|
||||
}
|
||||
|
||||
var _ ReadHandle = (*NoopReadHandle)(nil)
|
||||
|
||||
// ReadAt is part of the ReadHandle interface.
|
||||
func (h *NoopReadHandle) ReadAt(ctx context.Context, p []byte, off int64) error {
|
||||
return h.readable.ReadAt(ctx, p, off)
|
||||
}
|
||||
|
||||
// Close is part of the ReadHandle interface.
|
||||
func (*NoopReadHandle) Close() error { return nil }
|
||||
|
||||
// MaxReadahead is part of the ReadHandle interface.
|
||||
func (*NoopReadHandle) MaxReadahead() {}
|
||||
// SetupForCompaction is part of the ReadHandle interface.
|
||||
func (*NoopReadHandle) SetupForCompaction() {}
|
||||
|
||||
// RecordCacheHit is part of the ReadHandle interface.
|
||||
func (*NoopReadHandle) RecordCacheHit(offset, size int64) {}
|
||||
func (*NoopReadHandle) RecordCacheHit(_ context.Context, offset, size int64) {}
|
||||
|
||||
Reference in New Issue
Block a user