ferrotunnel-common
Shared types and error handling for FerroTunnel.
Overview
This crate provides common utilities shared across all FerroTunnel crates:
- Error handling:
TunnelError,Result<T> - Configuration:
TlsConfig,LimitsConfig,RateLimitConfig(serializable for config files) - Default constants:
DEFAULT_TUNNEL_PORT(7835),DEFAULT_HTTP_PORT(8080),DEFAULT_METRICS_PORT(9090),DEFAULT_DASHBOARD_PORT(4040),DEFAULT_TUNNEL_BIND,DEFAULT_HTTP_BIND,DEFAULT_LOCAL_ADDR
Usage
use ;
use ;
// Use default ports when building bind addresses
let tunnel_bind = format!;
let _tls = default;
Error Types
Io- I/O errorsProtocol- Protocol violationsAuthentication- Auth failuresSessionNotFound- Invalid sessionStreamNotFound- Invalid streamTimeout- Operation timeoutConfig- Configuration errorsConnection- Connection failuresTls- TLS handshake or certificate errors
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.