Expand description
A useful set of types for getting started
Modules§
- fast_
timeout - The fast and more complicated version of pingora-timeout
- timer
- Lightweight timer for systems with high rate of operations with timeout associated with them
Structs§
- Elapsed
- The error type returned when the timeout is reached.
- Error
- The struct that represents an error
- Http
Peer - A peer representing the remote HTTP server to connect to
- Opt
- Command-line options
- Request
Header - The HTTP request header type.
- Server
- The server object
- Session
- The established HTTP session
- Timeout
- The timeout future returned by the timeout functions
- Tokio
Timeout - The timeout generated by tokio_timeout().
Enums§
- Error
Source - The source of the error
- Error
Type - Predefined type of errors
- Immut
Str - A data struct that holds either immutable string or reference to static str.
Compared to String or
Box<str>, it avoids memory allocation on static str. - Retry
Type - Whether the request can be retried after encountering this error
Traits§
- Context
- Helper trait to add more context to a given error
- Error
Trait Erroris a trait representing the basic expectations for error values, i.e., values of typeEinResult<T, E>.- OkOrErr
- Helper trait to convert an Option to an Error with context.
- OrErr
- Helper trait to chain errors with context
- Proxy
Http - The interface to control the HTTP proxy
- ToTimeout
- The interface to start a timeout
Functions§
- background_
service - http_
proxy_ service - Create a Service from the user implemented ProxyHttp.
- sleep
- Similar to tokio::time::sleep but more efficient.
- timeout
- Similar to tokio::time::timeout but more efficient.
- tokio_
timeout - The tokio::time::timeout with just lazy timer initialization.