pub enum ServiceError {
    DialerError {
        address: Multiaddr,
        error: DialerErrorKind,
    },
    ListenError {
        address: Multiaddr,
        error: ListenErrorKind,
    },
    ProtocolSelectError {
        proto_name: Option<String>,
        session_context: Arc<SessionContext>,
    },
    ProtocolError {
        id: SessionId,
        proto_id: ProtocolId,
        error: Error,
    },
    SessionTimeout {
        session_context: Arc<SessionContext>,
    },
    MuxerError {
        session_context: Arc<SessionContext>,
        error: Error,
    },
    ProtocolHandleError {
        proto_id: ProtocolId,
        error: ProtocolHandleErrorKind,
    },
    SessionBlocked {
        session_context: Arc<SessionContext>,
    },
}
Expand description

Error generated by the Service

Variants

DialerError

Fields

address: Multiaddr

Remote address

error: DialerErrorKind

error

When dial remote error

ListenError

Fields

address: Multiaddr

Listen address

error: ListenErrorKind

error

When listen error

ProtocolSelectError

Fields

proto_name: Option<String>

Protocol name, if none, timeout or other net problem, if Some, don’t support this proto

session_context: Arc<SessionContext>

Session context

Protocol select fail

ProtocolError

Fields

id: SessionId

Session id

proto_id: ProtocolId

Protocol id

error: Error

Codec error

Protocol error during interaction

SessionTimeout

Fields

session_context: Arc<SessionContext>

Session context

After initializing the connection, the session does not open any protocol, suspected fd attack

MuxerError

Fields

session_context: Arc<SessionContext>

Session context

error: Error

error, such as InvalidData

Multiplex protocol error

ProtocolHandleError

Fields

proto_id: ProtocolId

Protocol id

Protocol handle error, will cause memory leaks/abnormal CPU usage tentacle will close after this error output

SessionBlocked

Fields

session_context: Arc<SessionContext>

Session context

Session blocked, can’t send message, if the task is too heavy in a short time. such as too many data cache on this session and can’t send to remote, it may cause oom, so this session will be kill by tentacle

Judging condition: unsent message size > send buffer size set by the user, default 24m

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more