package errors
import "github.com/syndtr/goleveldb/leveldb/errors"
Package errors provides common error types used throughout leveldb.
Index ¶
- Variables
- func IsCorrupted(err error) bool
- func New(text string) error
- func NewErrCorrupted(fd storage.FileDesc, err error) error
- func SetFd(err error, fd storage.FileDesc) error
- type ErrCorrupted
- type ErrMissingFiles
Variables ¶
var ( ErrNotFound = New("leveldb: not found") ErrReleased = util.ErrReleased ErrHasReleaser = util.ErrHasReleaser )
Common errors.
Functions ¶
func IsCorrupted ¶
IsCorrupted returns a boolean indicating whether the error is indicating a corruption.
func New ¶
New returns an error that formats as the given text.
func NewErrCorrupted ¶
NewErrCorrupted creates new ErrCorrupted error.
func SetFd ¶
SetFd sets 'file info' of the given error with the given file. Currently only ErrCorrupted is supported, otherwise will do nothing.
Types ¶
type ErrCorrupted ¶
ErrCorrupted is the type that wraps errors that indicate corruption in the database.
func (*ErrCorrupted) Error ¶
func (e *ErrCorrupted) Error() string
type ErrMissingFiles ¶
ErrMissingFiles is the type that indicating a corruption due to missing files. ErrMissingFiles always wrapped with ErrCorrupted.
func (*ErrMissingFiles) Error ¶
func (e *ErrMissingFiles) Error() string
Source Files ¶
- Version
- v1.0.0 (latest)
- Published
- Feb 22, 2019
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 months ago –
Tools for package owners.