blob: 12f139d2af601c9f4f83c6b2bc8fe1e1aa0a49cf [file]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#[cfg(feature = "vsr")]
pub mod consumer_group_client_state;
mod error;
pub mod http;
mod macros;
mod traits;
mod types;
mod utils;
pub mod wire_conversions;
pub use error::client_error::ClientError;
pub use error::eviction::eviction_reason_to_error;
pub use error::iggy_error::{IggyError, IggyErrorDiscriminants};
// Locking is feature gated, thus only mod level re-export.
pub mod locking;
pub use chrono::{DateTime, Duration as ChronoDuration, Utc};
#[cfg(feature = "vsr")]
pub use consumer_group_client_state::ConsumerGroupClientState;
/// Sentinel `partition_id` in an otherwise-empty poll reply that tells the
/// client its cached consumer-group assignment is stale (a generation fence
/// rejected the partition it polled) and it must re-sync before retrying. The
/// VSR reply header carries no status field yet, so this rides the empty-poll
/// body -- an application payload, not a wire-format header. Never a real
/// partition id (those are small, dense, zero-based), so it can't collide with
/// a genuine end-of-partition empty poll, which echoes the real partition id.
pub const RESYNC_REQUIRED_PARTITION_SENTINEL: u32 = u32::MAX;
pub use http::consumer_groups::*;
pub use http::consumer_offsets::*;
pub use http::messages::*;
pub use http::partitions::*;
pub use http::personal_access_tokens::*;
pub use http::segments::*;
pub use http::streams::*;
pub use http::system::*;
pub use http::topics::*;
pub use http::users::*;
pub use traits::binary_client::BinaryClient;
pub use traits::binary_transport::BinaryTransport;
#[cfg(feature = "vsr")]
pub use traits::binary_transport::{VsrSessionControl, VsrSessionSealed};
pub use traits::client::Client;
pub use traits::cluster_client::ClusterClient;
pub use traits::consumer_group_client::ConsumerGroupClient;
pub use traits::consumer_offset_client::ConsumerOffsetClient;
pub use traits::message_client::MessageClient;
pub use traits::partition_client::PartitionClient;
pub use traits::partitioner::Partitioner;
pub use traits::personal_access_token_client::PersonalAccessTokenClient;
pub use traits::segment_client::SegmentClient;
pub use traits::sizeable::Sizeable;
pub use traits::stream_client::StreamClient;
pub use traits::system_client::SystemClient;
pub use traits::topic_client::TopicClient;
pub use traits::user_client::UserClient;
pub use traits::validatable::Validatable;
pub use types::args::*;
pub use types::client::client_info::*;
pub use types::client_state::ClientState;
pub use types::cluster::*;
pub use types::compression::compression_algorithm::*;
pub use types::configuration::auth_config::auto_login::*;
pub use types::configuration::auth_config::connection_string::*;
pub use types::configuration::auth_config::connection_string_options::*;
pub use types::configuration::auth_config::credentials::*;
pub use types::configuration::http_config::http_client_config::*;
pub use types::configuration::http_config::http_client_config_builder::*;
pub use types::configuration::http_config::http_connection_string_options::*;
pub use types::configuration::quic_config::quic_client_config::*;
pub use types::configuration::quic_config::quic_client_config_builder::*;
pub use types::configuration::quic_config::quic_client_reconnection_config::*;
pub use types::configuration::quic_config::quic_connection_string_options::*;
pub use types::configuration::tcp_config::tcp_client_config::*;
pub use types::configuration::tcp_config::tcp_client_config_builder::*;
pub use types::configuration::tcp_config::tcp_client_reconnection_config::*;
pub use types::configuration::tcp_config::tcp_connection_string_options::*;
pub use types::configuration::transport::TransportProtocol;
pub use types::configuration::websocket_config::websocket_client_config::*;
pub use types::configuration::websocket_config::websocket_client_config_builder::*;
pub use types::configuration::websocket_config::websocket_client_reconnection_config::*;
pub use types::configuration::websocket_config::websocket_connection_string_options::*;
pub use types::consumer::consumer_group::*;
pub use types::consumer::consumer_group_id::*;
pub use types::consumer::consumer_group_offsets::*;
pub use types::consumer::consumer_kind::*;
pub use types::consumer::consumer_offset::*;
pub use types::consumer::consumer_offset_info::*;
pub use types::consumer::consumer_offsets::*;
pub use types::diagnostic::diagnostic_event::DiagnosticEvent;
pub use types::either::Either;
pub use types::http::HttpMethod;
pub use types::identifier::*;
pub use types::message::*;
pub use types::partition::*;
pub use types::permissions::permissions_global::*;
pub use types::permissions::personal_access_token::*;
pub use types::personal_access_tokens::*;
pub use types::segment::Segment;
pub use types::snapshot::*;
pub use types::stats::*;
pub use types::stream::*;
pub use types::streaming_stats::*;
pub use types::topic::*;
pub use types::user::user_identity_info::*;
pub use types::user::user_info::*;
pub use types::user::user_status::*;
pub use utils::byte_size::IggyByteSize;
pub use utils::checksum::*;
pub use utils::crypto::*;
pub use utils::duration::{IggyDuration, SEC_IN_MICRO};
pub use utils::expiry::IggyExpiry;
pub use utils::hash::*;
pub use utils::net::validate_api_url;
pub use utils::net::validate_server_address;
pub use utils::personal_access_token_expiry::PersonalAccessTokenExpiry;
pub use utils::random_id;
pub use utils::serde_secret;
pub use utils::text;
pub use utils::timestamp::*;
pub use utils::topic_size::MaxTopicSize;
pub use utils::versioning::SemanticVersion;
pub const MAX_NAME_LENGTH: usize = 255;
pub const MAX_PARTITIONS_COUNT: u32 = 1000;