errors

package
v1.7.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package errors provides error types and function

Package errors provides error types and function

Package errors provides benchmark error

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides benchmark error

Package errors provides error types and function

Package errors provides error types and function

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Package errors provides error types and function

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCreateIndexingIsInProgress represents an error that the indexing is in progress but search request received.
	ErrCreateIndexingIsInProgress = New("create indexing is in progress")

	// ErrCreateProperty represents a function to generate an error that the property creation failed.
	ErrCreateProperty = func(err error) error {
		return Wrap(err, "failed to create property")
	}

	// ErrIndexFileNotFound represents an error that the index file is not found.
	ErrIndexFileNotFound = New("index file not found")

	// ErrIndicesAreTooFewComparedToMetadata represents an error that the index count is not enough to be compared by metadata.
	ErrIndicesAreTooFewComparedToMetadata = New("indices are too few compared to Metadata")

	// ErrIndexLoadTimeout represents an error that the index loading timeout.
	ErrIndexLoadTimeout = New("index load timeout")

	// ErrInvalidDimensionSize represents a function to generate an error that the dimension size is invalid.
	ErrInvalidDimensionSize = func(current, limit int) error {
		if limit == 0 {
			return Errorf("dimension size %d is invalid, the supporting dimension size must be bigger than 2", current)
		}
		return Errorf("dimension size %d is invalid, the supporting dimension size must be between 2 ~ %d", current, limit)
	}

	// ErrInvalidUUID represents a function to generate an error that the uuid is invalid.
	ErrInvalidUUID = func(uuid string) error {
		return Errorf("uuid \"%s\" is invalid", uuid)
	}

	// ErrDimensionLimitExceed represents a function to generate an error that the supported dimension limit exceeded.
	ErrDimensionLimitExceed = func(current, limit int) error {
		return Errorf("supported dimension limit exceed:\trequired = %d,\tlimit = %d", current, limit)
	}

	// ErrIncompatibleDimensionSize represents a function to generate an error that the incompatible dimension size detected.
	ErrIncompatibleDimensionSize = func(current, expected int) error {
		return Errorf("incompatible dimension size detected\trequested: %d,\tconfigured: %d", current, expected)
	}

	// ErrUnsupportedObjectType represents an error that the object type is unsupported.
	ErrUnsupportedObjectType = New("unsupported ObjectType")

	// ErrUnsupportedDistanceType represents an error that the distance type is unsupported.
	ErrUnsupportedDistanceType = New("unsupported DistanceType")

	// ErrFailedToSetDistanceType represents a function to generate an error that the set of distance type failed.
	ErrFailedToSetDistanceType = func(err error, distance string) error {
		return Wrap(err, "failed to set distance type "+distance)
	}

	// ErrFailedToSetObjectType represents a function to generate an error that the set of object type failed.
	ErrFailedToSetObjectType = func(err error, t string) error {
		return Wrap(err, "failed to set object type "+t)
	}

	// ErrFailedToSetDimension represents a function to generate an error that the set of dimension failed.
	ErrFailedToSetDimension = func(err error) error {
		return Wrap(err, "failed to set dimension")
	}

	// ErrFailedToSetCreationEdgeSize represents a function to generate an error that the set of creation edge size failed.
	ErrFailedToSetCreationEdgeSize = func(err error) error {
		return Wrap(err, "failed to set creation edge size")
	}

	// ErrFailedToSetSearchEdgeSize represents a function to generate an error that the set of search edge size failed.
	ErrFailedToSetSearchEdgeSize = func(err error) error {
		return Wrap(err, "failed to set search edge size")
	}

	// ErrUncommittedIndexExists represents a function to generate an error that the uncommitted indexes exist.
	ErrUncommittedIndexExists = func(num uint64) error {
		return Errorf("%d indexes are not committed", num)
	}

	// ErrUncommittedIndexNotFound represents an error that the uncommitted indexes are not found.
	ErrUncommittedIndexNotFound = New("uncommitted indexes are not found")

	// ErrCAPINotImplemented represents an error that the function is not implemented in C API.
	ErrCAPINotImplemented = New("not implemented in C API")

	// ErrObjectNotFound represents a function to generate an error that the object is not found.
	ErrObjectNotFound = func(err error, uuid string) error {
		return Wrapf(err, "uuid %s's object not found", uuid)
	}

	// ErrAgentMigrationFailed represents a function to generate an error that agent migration failed.
	ErrAgentMigrationFailed = func(err error) error {
		return Wrap(err, "index_path migration failed")
	}

	// ErrAgentIndexDirectoryRecreationFailed represents an error that the index directory recreation failed during the process of broken index backup.
	ErrIndexDirectoryRecreationFailed = New("failed to recreate the index directory")

	// ErrWriteOperationToReadReplica represents an error that when a write operation is made to read replica.
	ErrWriteOperationToReadReplica = New("write operation to read replica is not possible")
)
View Source
var (
	ErrInvalidCoreMode = New("invalid core mode")

	// ErrFailedToCreateBenchmarkJob represents a function to generate an error that failed to create benchmark job crd.
	ErrFailedToCreateBenchmarkJob = func(err error, jn string) error {
		return Wrapf(err, "could not create benchmark job resource: %s ", jn)
	}

	// ErrFailedToCreateJob represents a function to generate an error that failed to create job resource.
	ErrFailedToCreateJob = func(err error, jn string) error {
		return Wrapf(err, "could not create job: %s ", jn)
	}

	// ErrMismatchBenchmarkAtomics represents a function to generate an error that mismatch each atomic.Pointer stored corresponding to benchmark tasks.
	ErrMismatchBenchmarkAtomics = func(job, benchjob, benchscenario interface{}) error {
		return Errorf("mismatch atomics: job=%v\tbenchjob=%v\tbenchscenario=%v", job, benchjob, benchscenario)
	}
)
View Source
var (
	// NewErrBlobNoSuchBucket represents a function to create no such bucket error.
	NewErrBlobNoSuchBucket = func(err error, name string) error {
		return &ErrBlobNoSuchBucket{
			err: Wrap(err, Errorf("bucket %s not found", name).Error()),
		}
	}

	// NewErrBlobNoSuchKey represents a function to create no such key error.
	NewErrBlobNoSuchKey = func(err error, key string) error {
		return &ErrBlobNoSuchKey{
			err: Wrap(err, Errorf("key %s not found", key).Error()),
		}
	}

	// NewErrBlobInvalidChunkRange represents a function to create invalid chunk range error.
	NewErrBlobInvalidChunkRange = func(err error, rng string) error {
		return &ErrBlobInvalidChunkRange{
			err: Wrap(err, Errorf("chunk range %s is invalid", rng).Error()),
		}
	}
)
View Source
var (
	// ErrCassandraInvalidConsistencyType represents a function to generate an error of consistency type not defined.
	ErrCassandraInvalidConsistencyType = func(consistency string) error {
		return Errorf("consistetncy type %q is not defined", consistency)
	}

	// ErrCassandraNotFoundIdentity generates an error of cassandra entry not found.
	ErrCassandraNotFoundIdentity = &CassandraNotFoundIdentityError{
		err: New("cassandra entry not found"),
	}

	// ErrCassandraUnavailableIdentity generates an error of cassandra unavailable.
	ErrCassandraUnavailableIdentity = &CassandraUnavailableIdentityError{
		err: New("cassandra unavailable"),
	}

	// ErrCassandraUnavailable represents NewErrCassandraUnavailableIdentity.
	ErrCassandraUnavailable = ErrCassandraUnavailableIdentity

	// ErrCassandraNotFound represents a function to generate an error of cassandra keys not found.
	ErrCassandraNotFound = func(keys ...string) error {
		switch {
		case len(keys) == 1:
			return Wrapf(ErrCassandraNotFoundIdentity, "cassandra key '%s' not found", keys[0])
		case len(keys) > 1:
			return Wrapf(ErrCassandraNotFoundIdentity, "cassandra keys '%v' not found", keys)
		default:
			return nil
		}
	}

	// ErrCassandraGetOperationFailed represents a function to generate an error of fetch key failed.
	ErrCassandraGetOperationFailed = func(key string, err error) error {
		return Wrapf(err, "error failed to fetch key (%s)", key)
	}

	// ErrCassandraSetOperationFailed represents a function to generate an error of set key failed.
	ErrCassandraSetOperationFailed = func(key string, err error) error {
		return Wrapf(err, "error failed to set key (%s)", key)
	}

	// ErrCassandraDeleteOperationFailed represents a function to generate an error of delete key failed.
	ErrCassandraDeleteOperationFailed = func(key string, err error) error {
		return Wrapf(err, "error failed to delete key (%s)", key)
	}

	// ErrCassandraHostDownDetected represents a function to generate an error of cassandra host down detected.
	ErrCassandraHostDownDetected = func(err error, nodeInfo string) error {
		return Wrapf(err, "error cassandra host down detected\t%s", nodeInfo)
	}
	ErrCassandraFailedToCreateSession = func(err error, hosts []string, port int, cqlVersion string) error {
		return Wrapf(err, "error cassandra client failed to create session to hosts: %v\tport: %d\tcql_version: %s ", hosts, port, cqlVersion)
	}
)
View Source
var (
	// ErrCircuitBreakerHalfOpenFlowLimitation is returned in case of flow limitation in half-open state.
	ErrCircuitBreakerHalfOpenFlowLimitation = New("circuitbreaker breaker half-open flow limitation")
	// ErrCircuitBreakerOpenState is returned when the CB state is open.
	ErrCircuitBreakerOpenState = New("circuit breaker is open")
)
View Source
var (
	// ErrInvalidCompressionLevel represents a function to generate an error of invalid compression level.
	ErrInvalidCompressionLevel = func(level int) error {
		return Errorf("invalid compression level: %d", level)
	}

	// ErrCompressorNameNotFound represents a function to generate an error of compressor not found.
	ErrCompressorNameNotFound = func(name string) error {
		return Errorf("compressor %s not found", name)
	}

	// ErrCompressedDataNotFound returns an error of compressed data is not found.
	ErrCompressedDataNotFound = New("compressed data not found")

	// ErrDecompressedDataNotFound returns an error of decompressed data is not found.
	ErrDecompressedDataNotFound = New("decompressed data not found")

	// ErrCompressFailed returns an error of compress failed.
	ErrCompressFailed = New("compress failed")

	// ErrDecompressFailed returns an error of decompressing failed.
	ErrDecompressFailed = New("decompress failed")

	// ErrCompressorRegistererIsNotRunning generates an error of compressor registerers is not running.
	ErrCompressorRegistererIsNotRunning = New("compressor registerers is not running")

	// ErrCompressorRegistererChannelIsFull generates an error that compressor registerer channel is full.
	ErrCompressorRegistererChannelIsFull = New("compressor registerer channel is full")
)
View Source
var (
	ErrInvalidConfig = New("component config is invalid")

	ErrUnsupportedConfigFileType = func(ext string) error {
		return Errorf("unsupported file type: %s", ext)
	}

	ErrNotMatchFieldType = func(path string, dType, sType reflect.Type) error {
		return Errorf("types do not match at %s: %v vs %v", path, dType, sType)
	}

	ErrNotMatchFieldNum = func(path string, dNum, sNum int) error {
		return Errorf("number of fields do not match at %s, dst: %d, src: %d", path, dNum, sNum)
	}

	ErrNotMatchArrayLength = func(path string, dLen, sLen int) error {
		return Errorf("array length do not match at %s, dst: %d, src: %d", path, dLen, sLen)
	}

	ErrDeepMergeKind = func(kind string, nf string, err error) error {
		return Errorf("error in %s at %s: %w", kind, nf, err)
	}
)
View Source
var (
	// ErrAddrCouldNotDiscover represents a function to generate an error that address couldn't discover.
	ErrAddrCouldNotDiscover = func(err error, record string) error {
		return Wrapf(err, "addr %s ip couldn't discover", record)
	}

	// ErrNodeNotFound represents a function to generate an error of discover node not found.
	ErrNodeNotFound = func(node string) error {
		return Errorf("discover node %s not found", node)
	}

	// ErrNamespaceNotFound represents a function to generate an error of discover namespace not found.
	ErrNamespaceNotFound = func(ns string) error {
		return Errorf("discover namespace %s not found", ns)
	}

	// ErrPodNameNotFound represents a function to generate an error of discover pod not found.
	ErrPodNameNotFound = func(name string) error {
		return Errorf("discover pod %s not found", name)
	}

	// ErrSvcNameNotFound represents a function to generate an error of discover svc not found.
	ErrSvcNameNotFound = func(name string) error {
		return Errorf("discover svc %s not found", name)
	}

	// ErrInvalidDiscoveryCache represents an error that type conversion of discovery cache failed.
	ErrInvalidDiscoveryCache = New("cache type cast failed")
)
View Source
var (
	// ErrTimeoutParseFailed represents a function to generate an error that the timeout value is invalid.
	ErrTimeoutParseFailed = func(timeout string) error {
		return Errorf("invalid timeout value: %s\t:timeout parse error out put failed", timeout)
	}

	// ErrServerNotFound represents a function to generate an error that the server not found.
	ErrServerNotFound = func(name string) error {
		return Errorf("server %s not found", name)
	}

	// ErrOptionFailed represents a function to generate an error that the option setup failed.
	// When ref is zero value, it will return an error with ref is invalid.
	ErrOptionFailed = func(err error, ref reflect.Value) error {
		var str string
		if ref.IsValid() {
			str = runtime.FuncForPC(ref.Pointer()).Name()
		}
		return Wrapf(err, "failed to setup option :\t%s", str)
	}

	// ErrArgumentParseFailed represents a function to generate an error that argument parse failed.
	ErrArgumentParseFailed = func(err error) error {
		return Wrap(err, "argument parse failed")
	}

	// ErrBackoffTimeout represents a function to generate an error that backoff is timeout by limitation.
	ErrBackoffTimeout = func(err error) error {
		return Wrap(err, "backoff timeout by limitation")
	}

	// ErrInvalidTypeConversion represents a function to generate an error that type conversion fails due to an invalid input type.
	ErrInvalidTypeConversion = func(i interface{}, tgt interface{}) error {
		return Errorf("invalid type conversion %v to %v", reflect.TypeOf(i), reflect.TypeOf(tgt))
	}

	// ErrLoggingRetry represents a function to generate an error that failing to output logs and retrying to output.
	ErrLoggingRetry = func(err error, ref reflect.Value) error {
		var str string
		if ref.IsValid() {
			str = runtime.FuncForPC(ref.Pointer()).Name()
		}
		return Wrapf(err, "failed to output %s logs, retrying...", str)
	}

	// ErrLoggingFailed represents a function to generate an error that failing to output logs.
	ErrLoggingFailed = func(err error, ref reflect.Value) error {
		var str string
		if ref.IsValid() {
			str = runtime.FuncForPC(ref.Pointer()).Name()
		}
		return Wrapf(err, "failed to output %s logs", str)
	}

	// New represents a function to generate the new error with a message.
	// When the message is nil, it will return nil instead of an error.
	New = func(msg string) error {
		if msg == "" {
			return nil
		}
		return errors.New(msg)
	}

	// Wrap represents a function to generate an error that is used by input error and message.
	// When both of the input are nil, it will return an error when the error message is not empty.
	// When the input error is not nil, it will return the error based on the input error.
	Wrap = func(err error, msg string) error {
		if err != nil {
			if msg != "" && err.Error() != msg {
				return fmt.Errorf("%s: %w", msg, err)
			}
			return err
		}
		return New(msg)
	}

	// Wrapf represents a function to generate an error that is used by input error, format, and args.
	// When all of the input is nil, it will return a new error based on format and args even these are nil.
	// When the input error is not nil, it will return an error based on the input error.
	Wrapf = func(err error, format string, args ...interface{}) error {
		if err != nil {
			if format != "" && len(args) != 0 {
				return Wrap(err, fmt.Sprintf(format, args...))
			}
			return err
		}
		return Errorf(format, args...)
	}

	// Cause represents a function to generate an error when the input error is not nil.
	// When the input is nil, it will return nil.
	Cause = func(err error) error {
		if err != nil {
			return Unwrap(err)
		}
		return nil
	}

	// Errorf represents a function to generate an error based on format and args.
	// When format and args do not satisfy the condition, it will return nil.
	Errorf = func(format string, args ...interface{}) error {
		const delim = " "
		if format == "" && len(args) == 0 {
			return nil
		}
		if len(args) != 0 {
			if format == "" {
				for range args {
					format += "%v" + delim
				}
				format = strings.TrimSuffix(format, delim)
			}
			return fmt.Errorf(format, args...)
		}
		return New(format)
	}

	// As represents errors.As.
	As = errors.As
)
View Source
var (
	// ErrWatchDirNotFound represents an error that the watch directory is not found.
	ErrWatchDirNotFound = New("fs watcher watch dir not found")

	// ErrFileAlreadyExists represents a function to generate an error that the file already exists.
	ErrFileAlreadyExists = func(path string) error {
		return Errorf("file already exists: %s", path)
	}

	// ErrFileNotFound represents a function to generate an error that the file not found.
	ErrFileNotFound = func(path string) error {
		return Errorf("file not found: %s", path)
	}

	// ErrPathNotSpecified represents an error that the path is not specified.
	ErrPathNotSpecified = New("the path is not specified")

	// ErrPathNotAllowed represents a function to generate an error indicates that the specified path is not allowed.
	ErrPathNotAllowed = func(path string) error {
		return Errorf("the specified file path is not allowed: %s", path)
	}

	ErrDirectoryNotFound = func(err error, dir string, fi os.FileInfo) error {
		return Wrapf(err, "directory not found %s\tdir info: %s", dir, fitos(dir, fi))
	}

	ErrFailedToGetAbsPath = func(err error, path string) error {
		return Wrapf(err, "failed to get Absolute path %s using filepath.Abs operation \tfile info: %s", path, fitos(path, nil))
	}

	ErrFailedToMkdir = func(err error, dir string, fi os.FileInfo) error {
		return Wrapf(err, "failed to make directory %s using os.MkdirAll operation\tdir info: %s", dir, fitos(dir, fi))
	}

	ErrFailedToMkTmpDir = func(err error, tmpDir string, fi os.FileInfo) error {
		return Wrapf(err, "failed to make temporary directory %s\tdir info: %s", tmpDir, fitos(tmpDir, fi))
	}

	ErrFailedToCreateFile = func(err error, path string, fi os.FileInfo) error {
		return Wrapf(err, "failed to create file %s using os.Create operation\tfile info: %s", path, fitos(path, fi))
	}

	ErrFailedToRemoveFile = func(err error, path string, fi os.FileInfo) error {
		return Wrapf(err, "failed to remove file %s using os.RemoveAll operation\tfile info: %s", path, fitos(path, fi))
	}

	ErrFailedToRemoveDir = func(err error, path string, fi os.FileInfo) error {
		return Wrapf(err, "failed to remove directory %s using os.RemoveAll operation\tfile info: %s", path, fitos(path, fi))
	}

	ErrFailedToOpenFile = func(err error, path string, flg int, perm os.FileMode) error {
		return Wrapf(err, "failed to open file %s using os.OpenFile operation with configuration, flg: %d, perm: %s\tfile info: %s", path, flg, perm.String(), fitos(path, nil))
	}

	ErrFailedToCloseFile = func(err error, path string, fi os.FileInfo) error {
		return Wrapf(err, "failed to close file %s\tfile info: %s", path, fitos(path, fi))
	}

	ErrFailedToRenameDir = func(err error, src, dst string, sfi, dfi os.FileInfo) error {
		return Wrapf(err, "failed to rename directory %s to %s using os.Rename operation,\tfile info: {source: %s, destination: %s}", src, dst, fitos(src, sfi), fitos(dst, dfi))
	}

	ErrFailedToCopyFile = func(err error, src, dst string, sfi, dfi os.FileInfo) error {
		return Wrapf(err, "failed to copy file %s to %s using os.Rename operation,\tfile info: {source: %s, destination: %s}", src, dst, fitos(src, sfi), fitos(dst, dfi))
	}

	ErrFailedToCopyDir = func(err error, src, dst string, sfi, dfi os.FileInfo) error {
		return Wrapf(err, "failed to copy directory %s to %s using os.Rename operation,\tfile info: {source: %s, destination: %s}", src, dst, fitos(src, sfi), fitos(dst, dfi))
	}

	ErrFailedToWalkDir = func(err error, root, dir string, rfi, cfi os.FileInfo) error {
		return Wrapf(err, "failed to walk directory %s in %s using filepath.WalkDir operation,\tfile info: {root: %s, current: %s}", dir, root, fitos(root, rfi), fitos(dir, cfi))
	}

	ErrNonRegularFile = func(path string, fi os.FileInfo) error {
		return Errorf("error file is not a regular file %s", fitos(path, fi))
	}
)
View Source
var (
	ErrFilterNotFound       = New("filter not found")
	ErrTargetNotFound       = New("target not found")
	ErrTargetFilterNotFound = func(addr string) error {
		return Errorf("target filter not found addr: %s", addr)
	}
)
View Source
var (

	// ErrGRPCClientConnectionClose represents a function to generate an error that the gRPC connection couldn't close.
	ErrGRPCClientConnectionClose = func(name string, err error) error {
		return Wrapf(err, "%s's gRPC connection close error", name)
	}

	// ErrInvalidGRPCPort represents a function to generate an error that the gRPC port is invalid.
	ErrInvalidGRPCPort = func(addr, host string, port uint16) error {
		return Errorf("invalid gRPC client connection port to addr: %s,\thost: %s\t port: %d", addr, host, port)
	}

	// ErrInvalidGRPCClientConn represents a function to generate an error that the vald internal gRPC connection is invalid.
	ErrInvalidGRPCClientConn = func(addr string) error {
		return Errorf("invalid gRPC client connection to %s", addr)
	}

	// ErrGRPCLookupIPAddrNotFound represents a function to generate an error that the vald internal gRPC client couldn't find IP address.
	ErrGRPCLookupIPAddrNotFound = func(host string) error {
		return Errorf("vald internal gRPC client could not find ip addrs for %s", host)
	}

	// ErrGRPCClientNotFound represents an error that the vald internal gRPC client couldn't find.
	ErrGRPCClientNotFound = New("vald internal gRPC client not found")

	// ErrGRPCPoolConnectionNotFound represents an error that the vald internal gRPC client pool connection couldn't find.
	ErrGRPCPoolConnectionNotFound = New("vald internal gRPC pool connection not found")

	// ErrGRPCClientConnNotFound represents a function to generate an error that the gRPC client connection couldn't find.
	ErrGRPCClientConnNotFound = func(addr string) error {
		return Errorf("gRPC client connection not found in %s", addr)
	}

	// ErrGRPCClientStreamNotFound represents an error that the vald internal gRPC client couldn't find any gRPC client stream connection.
	ErrGRPCClientStreamNotFound = New("vald internal gRPC client gRPC client stream not found")

	// ErrRPCCallFailed represents a function to generate an error that the RPC call failed.
	ErrRPCCallFailed = func(addr string, err error) error {
		return Wrapf(err, "addr: %s", addr)
	}

	// ErrGRPCTargetAddrNotFound represents an error that the gRPC target address couldn't find.
	ErrGRPCTargetAddrNotFound = New("gRPC connection target not found")

	// ErrGRPCUnexpectedStatusError represents an error that the gRPC status code is undefined.
	ErrGRPCUnexpectedStatusError = func(code string, err error) error {
		return Wrapf(err, "unexcepted error detected: code %s", code)
	}

	// ErrInvalidProtoMessageType represents an error that the gRPC protocol buffers message type is invalid.
	ErrInvalidProtoMessageType = func(v interface{}) error {
		return Errorf("failed to marshal/unmarshal proto message, message type is %T (missing vtprotobuf/protobuf helpers)", v)
	}

	// ErrServerStreamClientRecv represents a function to generate an error that the gRPC client couldn't receive from stream.
	ErrServerStreamClientRecv = func(err error) error {
		return Wrap(err, "gRPC client failed to receive from stream")
	}

	// ErrServerStreamClientSend represents a function to generate an error that the gRPC server couldn't send to stream.
	ErrServerStreamServerSend = func(err error) error {
		return Wrap(err, "gRPC server failed to send to stream")
	}
)
View Source
var (
	// ErrInvalidAPIConfig represents an error that the API configuration is invalid.
	ErrInvalidAPIConfig = New("invalid api config")

	// ErrInvalidRequest represents an error that the API request is invalid.
	ErrInvalidRequest = New("invalid request")

	// ErrHandler represents a function to generate an error that the handler returned an error.
	ErrHandler = func(err error) error {
		return Wrap(err, "handler returned error")
	}

	// ErrHandlerTimeout represents a function to generate an error that the handler was time out.
	ErrHandlerTimeout = func(err error, dur time.Duration) error {
		return Wrapf(err, "handler timeout %s", dur.String())
	}

	// ErrRequestBodyCloseAndFlush represents a function to generate an error that the flush of the request body and the close failed.
	ErrRequestBodyCloseAndFlush = func(err error) error {
		return Wrap(err, "request body flush & close failed")
	}

	// ErrRequestBodyClose represents a function to generate an error that the close of the request body failed.
	ErrRequestBodyClose = func(err error) error {
		return Wrap(err, "request body close failed")
	}

	// ErrRequestBodyFlush represents a function to generate an error that the flush of the request body failed.
	ErrRequestBodyFlush = func(err error) error {
		return Wrap(err, "request body flush failed")
	}

	// ErrTransportRetryable represents an error that the transport is retryable.
	ErrTransportRetryable = New("transport is retryable")

	// ErrInvalidStatusCode represents a function to generate an error that the http status code is invalid.
	ErrInvalidStatusCode = func(code int) error {
		return Errorf("invalid status code: %d", code)
	}
)
View Source
var (
	// ErrFailedToInitInfo represents an error to initialize info.
	ErrFailedToInitInfo = func(err error) error {
		return Wrap(err, "failed to init info")
	}

	// ErrRuntimeFuncNil represents an error that the runtime function is nil.
	ErrRuntimeFuncNil = New("runtime function is nil")
)
View Source
var (
	// NewErrContextNotProvided represents a function to generate an error that the context is not provided.
	NewErrContextNotProvided = New("context not provided")

	// NewErrReaderNotProvided represents a function to generate an error that the io.Reader is not provided.
	NewErrReaderNotProvided = New("io.Reader not provided")

	// NewErrWriterNotProvided represents an error that the io.Writer is not provided.
	NewErrWriterNotProvided = New("io.Writer not provided")
)
View Source
var (
	ErrEmptySearchResult = New("search result is empty")

	// ErrInsuffcientSearchResult represents an error that the search result is insufficient.
	ErrInsuffcientSearchResult = New("search result is less than required")

	// ErrIndexNotFound represents an error that the index not found.
	ErrIndexNotFound = New("index not found")
)
View Source
var (
	ErrInvalidMetaDataConfig = New("invalid metadata config")
	ErrMetadataFileEmpty     = New("metadata file empty")
	ErrMetadataFileNotFound  = New("metadata file not found")
)
View Source
var (
	// ErrMySQLConnectionPingFailed represents an error that the ping failed.
	ErrMySQLConnectionPingFailed = New("error MySQL connection ping failed")

	// ErrMySQLNotFoundIdentity generates an error that the element is not found.
	ErrMySQLNotFoundIdentity = &MySQLNotFoundIdentityError{
		err: New("error mysql element not found"),
	}

	// ErrMySQLConnectionClosed represents a function to generate an error that the connection closed.
	ErrMySQLConnectionClosed = New("error MySQL connection closed")

	// ErrMySQLTransactionNotCreated represents an error that the transaction is not closed.
	ErrMySQLTransactionNotCreated = New("error MySQL transaction not created")

	// ErrRequiredElementNotFoundByUUID represents a function to generate an error that the required element is not found.
	ErrRequiredElementNotFoundByUUID = func(uuid string) error {
		return Wrapf(ErrMySQLNotFoundIdentity, "error required element not found, uuid: %s", uuid)
	}

	// ErrMySQLInvalidArgumentIdentity generates an error that the argument is invalid.
	ErrMySQLInvalidArgumentIdentity = &MySQLInvalidArgumentIdentityError{
		err: New("error mysql invalid argument"),
	}

	// ErrRequiredMemberNotFilled represents a function to generate an error that the required member is not filled.
	ErrRequiredMemberNotFilled = func(member string) error {
		return Wrapf(ErrMySQLInvalidArgumentIdentity, "error required member not filled (member: %s)", member)
	}

	// ErrMySQLSessionNil represents a function to generate an error that the MySQL session is nil.
	ErrMySQLSessionNil = New("error MySQL session is nil")
)
View Source
var (

	// ErrFailedInitDialer represents an error that the initialization of the dialer failed.
	ErrFailedInitDialer = New("failed to init dialer")

	// ErrInvalidDNSConfig represents a function to generate an error that the configuration of the DNS is invalid.
	ErrInvalidDNSConfig = func(dnsRefreshDur, dnsCacheExp time.Duration) error {
		return Errorf("dnsRefreshDuration  > dnsCacheExp, %s, %s", dnsRefreshDur, dnsCacheExp)
	}

	// ErrNoPortAvailable represents a function to generate an error that the port of the host is unavailable.
	ErrNoPortAvailable = func(host string, start, end uint16) error {
		return Errorf("no port available for Host: %s\tbetween %d ~ %d", host, start, end)
	}

	// ErrLookupIPAddrNotFound represents a function to generate an error that the host's ip address could not discovererd from DNS.
	ErrLookupIPAddrNotFound = func(host string) error {
		return Errorf("failed to lookup ip addrs for host: %s", host)
	}
)
View Source
var (
	// ErrUUIDAlreadyExists represents a function to generate an error that the uuid already exists.
	ErrUUIDAlreadyExists = func(uuid string) error {
		return Errorf("ngt uuid %s index already exists", uuid)
	}

	// ErrUUIDNotFound represents a function to generate an error that the uuid is not found.
	ErrUUIDNotFound = func(id uint32) error {
		if id == 0 {
			return New("ngt object uuid not found")
		}
		return Errorf("ngt object uuid %d's metadata not found", id)
	}

	// ErrObjectIDNotFound represents a function to generate an error that the object id is not found.
	ErrObjectIDNotFound = func(uuid string) error {
		return Errorf("ngt uuid %s's object id not found", uuid)
	}

	// ErrRemoveRequestedBeforeIndexing represents a function to generate an error that the object is not indexed so can not remove it.
	ErrRemoveRequestedBeforeIndexing = func(oid uint) error {
		return Errorf("object id %d is not indexed we cannot remove it", oid)
	}

	ErrSearchResultEmptyButNoDataStored = New("empty search result from cgo but no index data stored in ngt, this error can be ignored.")
)
View Source
var (

	// ErrRedisInvalidKVVKPrefix represents a function to generate an error that kv index and vk prefix are invalid.
	ErrRedisInvalidKVVKPrefix = func(kv, vk string) error {
		return Errorf("kv index and vk prefix must be defferent.\t(kv: %s,\tvk: %s)", kv, vk)
	}

	// ErrRedisNotFoundIdentity generates an RedisNotFoundIdentityError error.
	ErrRedisNotFoundIdentity = &RedisNotFoundIdentityError{
		err: New("error redis entry not found"),
	}

	// ErrRedisNotFound represents a function to wrap Redis key not found error and err.
	ErrRedisNotFound = func(key string) error {
		return Wrapf(ErrRedisNotFoundIdentity, "error redis key '%s' not found", key)
	}

	// ErrRedisInvalidOption generates a new error of Redis invalid option.
	ErrRedisInvalidOption = New("error redis invalid option")

	// ErrRedisGetOperationFailed represents a function to wrap failed to fetch key error and err.
	ErrRedisGetOperationFailed = func(key string, err error) error {
		return Wrapf(err, "Failed to fetch key (%s)", key)
	}

	// ErrRedisSetOperationFailed represents a function to wrap failed to set key error and err.
	ErrRedisSetOperationFailed = func(key string, err error) error {
		return Wrapf(err, "Failed to set key (%s)", key)
	}

	// ErrRedisSetOperationFailed represents a function to wrap failed to delete key error and err.
	ErrRedisDeleteOperationFailed = func(key string, err error) error {
		return Wrapf(err, "Failed to delete key (%s)", key)
	}

	// ErrRedisSetOperationFailed represents a function to generate an error that invalid configuration version.
	ErrInvalidConfigVersion = func(cur, con string) error {
		return Errorf("invalid config version %s not satisfies version constraints %s", cur, con)
	}

	// ErrRedisAddrsNotFound generates a new error of address not found.
	ErrRedisAddrsNotFound = New("error redis addrs not found")

	// ErrRedisConnectionPingFailed generates a new error of Redis connection ping failed.
	ErrRedisConnectionPingFailed = New("error redis connection ping failed")
)
View Source
var (
	// ErrDaemonStartFailed represents a function to generate an error that failed to start daemon.
	ErrDaemonStartFailed = func(err error) error {
		return Wrap(err, "failed to start daemon")
	}

	// ErrDaemonStopFailed represents a function to generate an error that failed to stop daemon.
	ErrDaemonStopFailed = func(err error) error {
		return Wrap(err, "failed to stop daemon")
	}

	// ErrStartFunc represents a function to generate an error that occurred in the start function.
	ErrStartFunc = func(name string, err error) error {
		return Wrapf(err, "error occurred in runner.Start at %s", name)
	}

	// ErrPreStopFunc represents a function to generate an error that occurred in the pre-stop function.
	ErrPreStopFunc = func(name string, err error) error {
		return Wrapf(err, "error occurred in runner.PreStop at %s", name)
	}

	// ErrStopFunc represents a function to generate an error that occurred in the stop function.
	ErrStopFunc = func(name string, err error) error {
		return Wrapf(err, "error occurred in runner.Stop at %s", name)
	}

	// ErrPostStopFunc represents a function to generate an error that occurred in the post-stop function.
	ErrPostStopFunc = func(name string, err error) error {
		return Wrapf(err, "error occurred in runner.PostStop at %s", name)
	}

	// ErrRunnerWait represents a function to generate an error during runner.Wait.
	ErrRunnerWait = func(name string, err error) error {
		return Wrapf(err, "error occurred in runner.Wait at %s", name)
	}
)
View Source
var (
	// ErrPanicRecovered represents a function to generate an error that the panic recovered.
	ErrPanicRecovered = func(err error, rec interface{}) error {
		return Wrap(err, Errorf("panic recovered: %v", rec).Error())
	}

	// ErrPanicString represents a function to generate an error that the panic recovered with a string message.
	ErrPanicString = func(err error, msg string) error {
		return Wrap(err, Errorf("panic recovered: %v", msg).Error())
	}

	// ErrRuntimeError represents a function to generate an error that the panic caused by runtime error.
	ErrRuntimeError = func(err error, r runtime.Error) error {
		return Wrap(err, Errorf("system panicked caused by runtime error: %v", r).Error())
	}
)
View Source
var (
	ErrInvalidStorageType = New("invalid storage type")

	ErrStorageReaderNotOpened = New("reader not opened")
	ErrStorageWriterNotOpened = New("writer not opened")

	ErrBucketNotOpened = New("bucket not opened")
)
View Source
var (

	// ErrTLSDisabled is error variable, it's replesents config error that tls is disabled by config.
	ErrTLSDisabled = New("tls feature is disabled")

	// ErrTLSCertOrKeyNotFound is error variable, it's replesents tls cert or key not found error.
	ErrTLSCertOrKeyNotFound = New("cert or key file path not found")

	ErrCertificationFailed = New("certification failed")

	ErrFailedToHandshakeTLSConnection = func(network, addr string) error {
		return Errorf("failed to handshake connection to %s:%s", network, addr)
	}
)
View Source
var (
	// ErrMetaDataAlreadyExists represents an error that vald metadata is already exists.
	ErrMetaDataAlreadyExists = func(meta string) error {
		return Errorf("vald metadata:\t%s\talready exists ", meta)
	}

	// ErrSameVectorAlreadyExists represents an error that vald already has same features vector data.
	ErrSameVectorAlreadyExists = func(meta string, n, o []float32) error {
		return Errorf("vald metadata:\t%s\talready exists reqested: %v, stored: %v", meta, n, o)
	}

	// ErrMetaDataCannotFetch represents an error that vald metadata cannot fetch.
	ErrMetaDataCannotFetch = Errorf("vald metadata cannot fetch")
)
View Source
var (

	// ErrWorkerIsNotRunning represents a function to generate worker is not running error.
	ErrWorkerIsNotRunning = func(name string) error {
		return Errorf("worker %s is not running", name)
	}

	// ErrWorkerIsAlreadyRunning represents a function to generate worker is already running error.
	ErrWorkerIsAlreadyRunning = func(name string) error {
		return Errorf("worker %s is already running", name)
	}

	// ErrQueueIsNotRunning represents an error that the queue is not running.
	ErrQueueIsNotRunning = New("queue is not running")

	// ErrQueueIsAlreadyRunning represents an error that the queue is already running.
	ErrQueueIsAlreadyRunning = New("queue is already running")

	// ErrJobFuncIsNil represents an error that job function is nil.
	ErrJobFuncIsNil = New("JobFunc is nil")

	// ErrJobFuncNotFound represents an error that job function is not found.
	ErrJobFuncNotFound = New("JobFunc is not found")
)
View Source
var ErrAgentReplicaOne = New("nothing to correct when agent replica is 1")

ErrAgentReplicaOne represents an error that nothing to correct when agent replica is 1.

View Source
var (
	ErrCollectorNotFound = New("observability.collector not found")
)

ErrCollectorNotFound represents an error that the observability collector is not found.

View Source
var ErrFailedToCheckConsistency = func(err error) error {
	return Wrap(err, "failed to check consistency while index correctioin process")
}

ErrFailedToCheckConsistency represents an error that failed to check consistency process while index correction process.

View Source
var ErrFailedToCorrectReplicaNum = New("failed to correct replica number after correction process")

ErrFailedToCorrectReplicaNum represents an error that failed to correct replica number after correction process.

View Source
var ErrFailedToReceiveVectorFromStream = New("failed to receive vector from stream")

ErrFailedToReceiveVectorFromStream represents an error that failed to receive vector from stream while index correction process.

View Source
var ErrGoNGTNotSupportedMethod = New("not supported method")
View Source
var ErrIndexReplicaOne = New("nothing to correct when index replica is 1")

ErrIndexReplicaOne represents an error that nothing to correct when index replica is 1.

View Source
var ErrInvalidBackupConfig = New("invalid backup config")
View Source
var ErrInvalidCacherType = New("invalid cacher type")
View Source
var ErrInvalidReconcilerConfig = New("invalid reconciler config")
View Source
var ErrNoAvailableAgentToInsert = New("no available agent to insert replica")

ErrNoAvailableAgentToInsert represents an error that no available agent to insert replica.

View Source
var ErrParseUnitFailed = func(s string) error {
	return Errorf("failed to parse: '%s'", s)
}

ErrParseUnitFailed represents a function to generate an error that failed to parse unit.

View Source
var ErrReadReplicaIDEmpty = New("readreplica id is empty. it should be set via MY_TARGET_REPLICA_ID env var")

ErrReadReplicaIDEmpty represents error when trying to rotate agents with empty replicaID.

View Source
var ErrStreamListObjectStreamFinishedUnexpectedly = func(err error) error {
	return Wrap(err, "stream list object stream finished unexpectedly")
}

ErrStreamListObjectStreamFinishedUnexpectedly represents an error that StreamListObject finished not because of io.EOF.

View Source
var ErrUnsupportedClientMethod = New("unsupported method")

ErrUnsupportedClientMethod is unsupported method error for gRPC/REST client.

View Source
var ErrVQueueFinalizing = New("error vector queue is now finalizing...")

Functions

func Is

func Is(err, target error) bool

Is represents a function to check whether err and the target is the same or not.

func IsCassandraNotFoundError added in v1.7.0

func IsCassandraNotFoundError(err error) bool

IsCassandraNotFoundError reports whether any error in err's chain matches CassandraNotFoundError.

func IsCassandraUnavailableError added in v1.7.0

func IsCassandraUnavailableError(err error) bool

IsCassandraUnavailableError reports whether any error in err's chain matches CassandraUnavailableIdentityError.

func IsErrBlobNoSuchBucket added in v0.0.41

func IsErrBlobNoSuchBucket(err error) bool

IsErrBlobNoSuchBucket returns if the error is ErrBlobNoSuchBucket.

func IsErrBlobNoSuchKey added in v0.0.41

func IsErrBlobNoSuchKey(err error) bool

IsErrBlobNoSuchKey returns if the error is ErrBlobNoSuchKey.

func IsMySQLInvalidArgumentError added in v1.7.0

func IsMySQLInvalidArgumentError(err error) bool

IsMySQLInvalidArgumentError returns true when the err type is MySQLInvalidArgumentIdentityError.

func IsMySQLNotFoundError added in v1.7.0

func IsMySQLNotFoundError(err error) bool

IsMySQLNotFoundError returns true when the err type is MySQLNotFoundIdentityError.

func IsRedisNotFoundError added in v1.7.0

func IsRedisNotFoundError(err error) bool

IsRedisNotFoundError compares the input error and RedisNotFoundIdentityError.error and returns true or false that is the result of errors.As.

func Join added in v1.7.4

func Join(errs ...error) error

Join represents a function to generate multiple error when the input errors is not nil.

func NewErrCircuitBreakerIgnorable added in v1.6.0

func NewErrCircuitBreakerIgnorable(err error) error

func NewErrCircuitBreakerMarkWithSuccess added in v1.6.0

func NewErrCircuitBreakerMarkWithSuccess(err error) error

func NewErrCriticalOption added in v0.0.56

func NewErrCriticalOption(name string, val interface{}, errs ...error) error

NewErrCriticalOption represents a function to generate a new error of ErrCriticalOption that invalid option.

func NewErrIgnoredOption added in v1.1.2

func NewErrIgnoredOption(name string, errs ...error) error

NewErrIgnoredOption represents a function to generate a new error of ErrIgnoredOption that option is ignored.

func NewErrInvalidOption added in v0.0.56

func NewErrInvalidOption(name string, val interface{}, errs ...error) error

NewErrInvalidOption represents a function to generate a new error of ErrInvalidOption that invalid option.

func NewFaissError added in v1.7.11

func NewFaissError(msg string) error

func NewNGTError added in v1.2.4

func NewNGTError(msg string) error

func RemoveDuplicates added in v1.7.9

func RemoveDuplicates(errs []error) []error

func Unwrap added in v0.0.53

func Unwrap(err error) error

Unwrap represents errors.Unwrap.

Types

type CassandraNotFoundIdentityError added in v1.7.0

type CassandraNotFoundIdentityError struct {
	// contains filtered or unexported fields
}

CassandraNotFoundIdentityError represents custom error for cassandra not found.

func (*CassandraNotFoundIdentityError) Error added in v1.7.0

Error returns string of internal error.

func (*CassandraNotFoundIdentityError) Unwrap added in v1.7.0

Unwrap returns an internal error.

type CassandraUnavailableIdentityError added in v1.7.0

type CassandraUnavailableIdentityError struct {
	// contains filtered or unexported fields
}

CassandraUnavailableIdentityError represents custom error for cassandra unavailable.

func (*CassandraUnavailableIdentityError) Error added in v1.7.0

Error returns string of internal error.

func (*CassandraUnavailableIdentityError) Unwrap added in v1.7.0

Unwrap returns internal error.

type ErrBlobInvalidChunkRange added in v1.2.4

type ErrBlobInvalidChunkRange struct {
	// contains filtered or unexported fields
}

ErrBlobInvalidChunkRange represents no invalid chunk range error of S3.

func (*ErrBlobInvalidChunkRange) Error added in v1.2.4

func (e *ErrBlobInvalidChunkRange) Error() string

Error returns the string representation of the internal error.

func (*ErrBlobInvalidChunkRange) Unwrap added in v1.2.4

func (e *ErrBlobInvalidChunkRange) Unwrap() error

Unwrap unwraps and returns the internal error.

type ErrBlobNoSuchBucket added in v0.0.41

type ErrBlobNoSuchBucket struct {
	// contains filtered or unexported fields
}

ErrBlobNoSuchBucket represents no such bucket error of S3.

func (*ErrBlobNoSuchBucket) Error added in v0.0.41

func (e *ErrBlobNoSuchBucket) Error() string

Error returns the string representation of the internal error.

func (*ErrBlobNoSuchBucket) Unwrap added in v0.0.53

func (e *ErrBlobNoSuchBucket) Unwrap() error

Unwrap unwraps and returns the internal error.

type ErrBlobNoSuchKey added in v0.0.41

type ErrBlobNoSuchKey struct {
	// contains filtered or unexported fields
}

ErrBlobNoSuchKey represents no such key error of S3.

func (*ErrBlobNoSuchKey) Error added in v0.0.41

func (e *ErrBlobNoSuchKey) Error() string

Error returns the string representation of the internal error.

func (*ErrBlobNoSuchKey) Unwrap added in v0.0.53

func (e *ErrBlobNoSuchKey) Unwrap() error

Unwrap unwraps and returns the internal error.

type ErrCircuitBreakerIgnorable added in v1.6.0

type ErrCircuitBreakerIgnorable struct {
	// contains filtered or unexported fields
}

func (*ErrCircuitBreakerIgnorable) Error added in v1.6.0

func (*ErrCircuitBreakerIgnorable) Unwrap added in v1.6.0

func (e *ErrCircuitBreakerIgnorable) Unwrap() error

type ErrCircuitBreakerMarkWithSuccess added in v1.6.0

type ErrCircuitBreakerMarkWithSuccess struct {
	// contains filtered or unexported fields
}

func (*ErrCircuitBreakerMarkWithSuccess) Error added in v1.6.0

func (*ErrCircuitBreakerMarkWithSuccess) Unwrap added in v1.6.0

type ErrCriticalOption added in v0.0.56

type ErrCriticalOption struct {
	// contains filtered or unexported fields
}

ErrCriticalOption represents the critical option error.

func (*ErrCriticalOption) Error added in v0.0.56

func (e *ErrCriticalOption) Error() string

Error returns a string of ErrCriticalOption.err.

func (*ErrCriticalOption) Unwrap added in v0.0.56

func (e *ErrCriticalOption) Unwrap() error

Unwrap returns an origin error of ErrCriticalOption.

type ErrIgnoredOption added in v1.1.2

type ErrIgnoredOption struct {
	// contains filtered or unexported fields
}

ErrIgnoredOption represents the ignored option error.

func (*ErrIgnoredOption) Error added in v1.1.2

func (e *ErrIgnoredOption) Error() string

Error returns a string of ErrIgnoredOption.err.

func (*ErrIgnoredOption) Unwrap added in v1.1.2

func (e *ErrIgnoredOption) Unwrap() error

Unwrap returns an origin error of ErrIgnoredOption.

type ErrInvalidOption added in v0.0.53

type ErrInvalidOption struct {
	// contains filtered or unexported fields
}

ErrInvalidOption represents the invalid option error.

func (*ErrInvalidOption) Error added in v0.0.56

func (e *ErrInvalidOption) Error() string

Error returns a string of ErrInvalidOption.err.

func (*ErrInvalidOption) Unwrap added in v0.0.56

func (e *ErrInvalidOption) Unwrap() error

Unwrap returns an origin error of ErrInvalidOption.

type FaissError added in v1.7.11

type FaissError struct {
	Msg string
}

func (FaissError) Error added in v1.7.11

func (f FaissError) Error() string

type MySQLInvalidArgumentIdentityError added in v1.7.0

type MySQLInvalidArgumentIdentityError struct {
	// contains filtered or unexported fields
}

MySQLInvalidArgumentIdentityError represents a custom error type that the argument is not found.

func (*MySQLInvalidArgumentIdentityError) Error added in v1.7.0

Error returns the string of internal error.

func (*MySQLInvalidArgumentIdentityError) Unwrap added in v1.7.0

Unwrap returns the internal error.

type MySQLNotFoundIdentityError added in v1.7.0

type MySQLNotFoundIdentityError struct {
	// contains filtered or unexported fields
}

MySQLNotFoundIdentityError represents a custom error type that the element is not found.

func (*MySQLNotFoundIdentityError) Error added in v1.7.0

Error returns the string of internal error.

func (*MySQLNotFoundIdentityError) Unwrap added in v1.7.0

func (e *MySQLNotFoundIdentityError) Unwrap() error

Unwrap returns the internal error.

type NGTError added in v1.2.4

type NGTError struct {
	Msg string
}

func (NGTError) Error added in v1.2.4

func (n NGTError) Error() string

type RedisNotFoundIdentityError added in v1.7.0

type RedisNotFoundIdentityError struct {
	// contains filtered or unexported fields
}

RedisNotFoundIdentityError represents a struct that includes err and has a method for Redis error handling.

func (*RedisNotFoundIdentityError) Error added in v1.7.0

Error returns the string of ErrRedisNotFoundIdentity.error.

func (*RedisNotFoundIdentityError) Unwrap added in v1.7.0

func (e *RedisNotFoundIdentityError) Unwrap() error

Unwrap returns the error value of RedisNotFoundIdentityError.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL