Versions in this module Expand all Collapse all v0 v0.9.0 Sep 7, 2023 Changes in this version type ErrorCode + const ErrorCode_INVALID_HEARTBEAT + const ErrorCode_NOT_READY v0.8.0 Apr 17, 2023 Changes in this version + var ErrAESDecrypt = New("aes decrypt").WithGRPCCode(ErrorCode_AES_DECRYPT) + var ErrAESEncrypt = New("aes encrypt").WithGRPCCode(ErrorCode_AES_ENCRYPT) + var ErrBlockNotFound = New("block not found").WithGRPCCode(ErrorCode_BLOCK_NOT_FOUND) + var ErrBlockNotSupported = New("block not supported").WithGRPCCode(ErrorCode_BLOCK_NOT_SUPPORTED) + var ErrCeSQLExpression = New("ce sql expression invalid").WithGRPCCode(ErrorCode_CESQL_EXPRESSION) + var ErrCelExpression = New("cel expression invalid").WithGRPCCode(ErrorCode_CEL_EXPRESSION) + var ErrClosed = New("closed").WithGRPCCode(ErrorCode_CLOSED) + var ErrCorruptedEvent = New("corrupted event").WithGRPCCode(ErrorCode_CORRUPTED_EVENT) + var ErrEventlogNotFound = New("eventlog not found").WithGRPCCode(ErrorCode_EVENTLOG_NOT_FOUND) + var ErrFilterAttributeIsEmpty = New("filter dialect attribute is empty").WithGRPCCode(ErrorCode_FILTER_ATTRIBUTE_IS_EMPTY) + var ErrFilterMultiple = New("filter multiple dialects found").WithGRPCCode(ErrorCode_FILTER_MULTIPLE) + var ErrInternal = New("internal error").WithGRPCCode(ErrorCode_INTERNAL) + var ErrInvalidArgument = New("invalid argument").WithGRPCCode(ErrorCode_INVALID_ARGUMENT) + var ErrInvalidHeartBeat = New("invalid heartbeat").WithGRPCCode(ErrorCode_INVAILD_HEAETBEAT) + var ErrInvalidHeartBeatRequest = New("invalid heartbeat request").WithGRPCCode(ErrorCode_INVALID_HEARTBEAT_REQUEST) + var ErrInvalidJSONPath = New("invalid JSON path").WithGRPCCode(ErrorCode_INVALID_JSON_PATH) + var ErrInvalidRequest = New("invalid request").WithGRPCCode(ErrorCode_INVALID_REQUEST) + var ErrInvalidSegment = New("invalid segment").WithGRPCCode(ErrorCode_INVALID_SEGMENT) + var ErrJSONMarshal = New("json marshal").WithGRPCCode(ErrorCode_JSON_MARSHAL) + var ErrJSONPathNotExist = New("JSON path not exist").WithGRPCCode(ErrorCode_JSON_PATH_NOT_EXIST) + var ErrJSONUnMarshal = New("json unmarshal").WithGRPCCode(ErrorCode_JSON_UNMARSHAL) + var ErrLambdaInvoke = New("lambda invoke error").WithGRPCCode(ErrorCode_LAMBDA_INVOKE) + var ErrLambdaInvokeResponse = New("lambda invoke response fail").WithGRPCCode(ErrorCode_LAMBDA_INVOKE_RESPONSE) + var ErrNoAvailableEventlog = New("no eventlog available").WithGRPCCode(ErrorCode_RESOURCE_EXHAUSTED) + var ErrNoControllerLeader = New("no leader controller found").WithGRPCCode(ErrorCode_NO_CONTROLLER_LEADER) + var ErrNoEndpoint = New("no endpoint").WithGRPCCode(ErrorCode_NO_ENDPOINT) + var ErrNotLeader = New("not leader").WithGRPCCode(ErrorCode_NOT_LEADER) + var ErrNotRaftLeader = New("the node is not raft leader").WithGRPCCode(ErrorCode_NOT_RAFT_LEADER) + var ErrNotReadable = New("not readable").WithGRPCCode(ErrorCode_NOT_READABLE) + var ErrNotReady = New("not ready").WithGRPCCode(ErrorCodeNotReady) + var ErrNotWritable = New("not writable").WithGRPCCode(ErrorCode_NOT_WRITABLE) + var ErrOffsetOnEnd = New("the offset on end").WithGRPCCode(ErrorCode_OFFSET_ON_END) + var ErrOffsetOverflow = New("the offset overflow").WithGRPCCode(ErrorCode_OFFSET_OVERFLOW) + var ErrOffsetUnderflow = New("the offset underflow").WithGRPCCode(ErrorCode_OFFSET_UNDERFLOW) + var ErrPermissionDenied = New("permissionDenied").WithGRPCCode(ErrorCode_PermissionDenied) + var ErrResourceAlreadyExist = New("resource already exist").WithGRPCCode(ErrorCode_RESOURCE_EXIST) + var ErrResourceCanNotOp = New("resource can not operation").WithGRPCCode(ErrorCode_RESOURCE_CAN_NOT_OP) + var ErrResourceNotFound = New("resource not found").WithGRPCCode(ErrorCode_RESOURCE_NOT_FOUND) + var ErrSegmentFull = New("segment full").WithGRPCCode(ErrorCode_SEGMENT_FULL) + var ErrSegmentNotEnoughSpace = New("not enough space").WithGRPCCode(ErrorCode_SEGMENT_NO_ENOUGH_SPACE) + var ErrSegmentNotFound = New("segment not found").WithGRPCCode(ErrorCode_SEGMENT_NOT_FOUND) + var ErrSegmentServerHasBeenAdded = New("the segment server has been added").WithGRPCCode(ErrorCode_SEGMENT_SERVER_HAS_BEEN_ADDED) + var ErrServerNotStart = New("server not start").WithGRPCCode(ErrorCode_SERVICE_NOT_RUNNING) + var ErrServiceState = New("service state error").WithGRPCCode(ErrorCode_SERVICE_STATE_ERROR) + var ErrTransformInputParse = New("transform input invalid").WithGRPCCode(ErrorCode_TRANSFORM_INPUT_PARSE) + var ErrTriggerWorker = New("trigger worker error").WithGRPCCode(ErrorCode_TRIGGER_WORKER) + var ErrTryAgain = New("try again").WithGRPCCode(ErrorCode_TRY_AGAIN) + var ErrUnauthenticated = New("unauthenticated").WithGRPCCode(ErrorCode_Unauthenticated) + var ErrUnknown = New("unknown").WithGRPCCode(ErrorCode_UNKNOWN) + var ErrUnmarshall = New("unmarshall data failed").WithGRPCCode(ErrorCode_UNMARSHAL) + var ErrVanusJSONParse = New("invalid json").WithGRPCCode(ErrorCode_JSON_PARSE) + var ErrVolumeInstanceNoServer = New("no segment server was bound to volume instance").WithGRPCCode(ErrorCode_VOLUME_NO_SERVER) + var ErrVolumeInstanceNotFound = New("volume instance not found").WithGRPCCode(ErrorCode_VOLUME_NOT_FOUND) + var ErrWorkerNotStart = New("worker not start").WithGRPCCode(ErrorCode_WORKER_NOT_RUNNING) + func Chain(errs ...error) error + func ConvertToGRPCError(err error) error + func Is(err error, target error) bool + func UnwrapOrUnknown(err error) error + type ErrorCode int32 + const ErrorCodeNotReady + const ErrorCode_AES_DECRYPT + const ErrorCode_AES_ENCRYPT + const ErrorCode_BLOCK_NOT_FOUND + const ErrorCode_BLOCK_NOT_SUPPORTED + const ErrorCode_CEL_EXPRESSION + const ErrorCode_CESQL_EXPRESSION + const ErrorCode_CLOSED + const ErrorCode_CORRUPTED_EVENT + const ErrorCode_EVENTBUS_NOT_FOUND + const ErrorCode_EVENTLOG_NOT_FOUND + const ErrorCode_FILTER_ATTRIBUTE_IS_EMPTY + const ErrorCode_FILTER_MULTIPLE + const ErrorCode_INTERNAL + const ErrorCode_INVAILD_HEAETBEAT + const ErrorCode_INVALID_ARGUMENT + const ErrorCode_INVALID_HEARTBEAT_REQUEST + const ErrorCode_INVALID_JSON_PATH + const ErrorCode_INVALID_REQUEST + const ErrorCode_INVALID_SEGMENT + const ErrorCode_JSON_MARSHAL + const ErrorCode_JSON_PARSE + const ErrorCode_JSON_PATH_NOT_EXIST + const ErrorCode_JSON_UNMARSHAL + const ErrorCode_LAMBDA_INVOKE + const ErrorCode_LAMBDA_INVOKE_RESPONSE + const ErrorCode_NOT_LEADER + const ErrorCode_NOT_RAFT_LEADER + const ErrorCode_NOT_READABLE + const ErrorCode_NOT_WRITABLE + const ErrorCode_NO_CONTROLLER_LEADER + const ErrorCode_NO_ENDPOINT + const ErrorCode_OFFSET_ON_END + const ErrorCode_OFFSET_OVERFLOW + const ErrorCode_OFFSET_UNDERFLOW + const ErrorCode_PermissionDenied + const ErrorCode_RESOURCE_CAN_NOT_OP + const ErrorCode_RESOURCE_EXHAUSTED + const ErrorCode_RESOURCE_EXIST + const ErrorCode_RESOURCE_NOT_FOUND + const ErrorCode_SEGMENT_FULL + const ErrorCode_SEGMENT_NOT_FOUND + const ErrorCode_SEGMENT_NO_ENOUGH_SPACE + const ErrorCode_SEGMENT_SERVER_HAS_BEEN_ADDED + const ErrorCode_SERVICE_NOT_RUNNING + const ErrorCode_SERVICE_STATE_ERROR + const ErrorCode_TRANSFORM_INPUT_PARSE + const ErrorCode_TRIGGER_WORKER + const ErrorCode_TRY_AGAIN + const ErrorCode_UNKNOWN + const ErrorCode_UNMARSHAL + const ErrorCode_Unauthenticated + const ErrorCode_VOLUME_NOT_FOUND + const ErrorCode_VOLUME_NO_SERVER + const ErrorCode_WORKER_NOT_RUNNING + type ErrorType struct + Code ErrorCode + Description string + Message string + func Convert(str string) (*ErrorType, bool) + func FromError(err error) (*ErrorType, bool) + func New(desc string) *ErrorType + func (e *ErrorType) JSON() string + func (e *ErrorType) WithGRPCCode(c ErrorCode) *ErrorType + func (e *ErrorType) WithMessage(str string) *ErrorType + func (e *ErrorType) Wrap(err error) *ErrorType + func (e ErrorType) Error() string