qerr

package
v0.0.0-...-09eeadd Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHandshakeTimeout = &HandshakeTimeoutError{}
	ErrIdleTimeout      = &IdleTimeoutError{}
)

Functions

This section is empty.

Types

type ApplicationError

type ApplicationError struct {
	Remote       bool
	ErrorCode    ApplicationErrorCode
	ErrorMessage string
}

func (*ApplicationError) Error

func (e *ApplicationError) Error() string

func (*ApplicationError) Is

func (e *ApplicationError) Is(target error) bool

type ApplicationErrorCode

type ApplicationErrorCode uint64

An ApplicationErrorCode is an application-defined error code.

type HandshakeTimeoutError

type HandshakeTimeoutError struct{}

func (*HandshakeTimeoutError) Error

func (e *HandshakeTimeoutError) Error() string

func (*HandshakeTimeoutError) Is

func (e *HandshakeTimeoutError) Is(target error) bool

func (*HandshakeTimeoutError) Temporary

func (e *HandshakeTimeoutError) Temporary() bool

func (*HandshakeTimeoutError) Timeout

func (e *HandshakeTimeoutError) Timeout() bool

type IdleTimeoutError

type IdleTimeoutError struct{}

func (*IdleTimeoutError) Error

func (e *IdleTimeoutError) Error() string

func (*IdleTimeoutError) Is

func (e *IdleTimeoutError) Is(target error) bool

func (*IdleTimeoutError) Temporary

func (e *IdleTimeoutError) Temporary() bool

func (*IdleTimeoutError) Timeout

func (e *IdleTimeoutError) Timeout() bool

type StatelessResetError

type StatelessResetError struct {
	Token protocol.StatelessResetToken
}

A StatelessResetError occurs when we receive a stateless reset.

func (*StatelessResetError) Error

func (e *StatelessResetError) Error() string

func (*StatelessResetError) Is

func (e *StatelessResetError) Is(target error) bool

func (*StatelessResetError) Temporary

func (e *StatelessResetError) Temporary() bool

func (*StatelessResetError) Timeout

func (e *StatelessResetError) Timeout() bool

type StreamErrorCode

type StreamErrorCode uint64

A StreamErrorCode is an error code used to cancel streams.

type TransportError

type TransportError struct {
	Remote       bool
	FrameType    uint64
	ErrorCode    TransportErrorCode
	ErrorMessage string
}

func NewCryptoError

func NewCryptoError(tlsAlert uint8, errorMessage string) *TransportError

NewCryptoError create a new TransportError instance for a crypto error

func (*TransportError) Error

func (e *TransportError) Error() string

func (*TransportError) Is

func (e *TransportError) Is(target error) bool

type TransportErrorCode

type TransportErrorCode uint64

TransportErrorCode is a QUIC transport error.

const (
	NoError                   TransportErrorCode = 0x0
	InternalError             TransportErrorCode = 0x1
	ConnectionRefused         TransportErrorCode = 0x2
	FlowControlError          TransportErrorCode = 0x3
	StreamLimitError          TransportErrorCode = 0x4
	StreamStateError          TransportErrorCode = 0x5
	FinalSizeError            TransportErrorCode = 0x6
	FrameEncodingError        TransportErrorCode = 0x7
	TransportParameterError   TransportErrorCode = 0x8
	ConnectionIDLimitError    TransportErrorCode = 0x9
	ProtocolViolation         TransportErrorCode = 0xa
	InvalidToken              TransportErrorCode = 0xb
	ApplicationErrorErrorCode TransportErrorCode = 0xc
	CryptoBufferExceeded      TransportErrorCode = 0xd
	KeyUpdateError            TransportErrorCode = 0xe
	AEADLimitReached          TransportErrorCode = 0xf
	NoViablePathError         TransportErrorCode = 0x10
)

The error codes defined by QUIC

func (TransportErrorCode) IsCryptoError

func (e TransportErrorCode) IsCryptoError() bool

func (TransportErrorCode) Message

func (e TransportErrorCode) Message() string

Message is a description of the error. It only returns a non-empty string for crypto errors.

func (TransportErrorCode) String

func (e TransportErrorCode) String() string

type VersionNegotiationError

type VersionNegotiationError struct {
	Ours   []protocol.VersionNumber
	Theirs []protocol.VersionNumber
}

A VersionNegotiationError occurs when the client and the server can't agree on a QUIC version.

func (*VersionNegotiationError) Error

func (e *VersionNegotiationError) Error() string

func (*VersionNegotiationError) Is

func (e *VersionNegotiationError) Is(target error) bool

Jump to

Keyboard shortcuts

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