Skip to main content

rustfs_notify/
lib.rs

1// Copyright 2024 RustFS Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! RustFS Notify - A flexible and extensible event notification system for object storage.
16//!
17//! This library provides a Rust implementation of a storage bucket notification system.
18//! It supports sending events to various targets
19//! (like Webhook and MQTT) and includes features like event persistence and retry on failure.
20
21mod bucket_config_manager;
22mod config_manager;
23mod error;
24mod event;
25pub mod factory;
26mod global;
27pub mod integration;
28mod lifecycle;
29mod notification_system_subscriber;
30pub mod notifier;
31mod pipeline;
32pub mod registry;
33mod rule_engine;
34pub mod rules;
35mod runtime_facade;
36mod runtime_view;
37mod services;
38mod status_view;
39mod storage_api;
40
41pub use bucket_config_manager::NotifyBucketConfigManager;
42pub use config_manager::{NotifyConfigManager, runtime_target_id_for_subsystem};
43pub use error::{LifecycleError, NotificationError};
44pub use event::{Event, EventArgs, EventArgsBuilder, NotifyObjectInfo};
45pub use global::{
46    ensure_live_events, initialize, initialize_live_events, is_notification_system_initialized, notification_metrics_snapshot,
47    notification_system, notification_target_metrics, notifier_global, reconcile,
48};
49pub use integration::{NotificationMetricSnapshot, NotificationSystem, NotificationTargetMetricSnapshot};
50pub use lifecycle::{NotificationLifecycleTransition, NotificationRuntimeState};
51pub use pipeline::{LiveEventHistory, NotifyEventBridge, NotifyPipeline};
52pub use rule_engine::NotifyRuleEngine;
53pub use rules::BucketNotificationConfig;
54pub use runtime_facade::NotifyRuntimeFacade;
55pub use runtime_view::NotifyRuntimeView;
56pub use services::NotifyServices;
57pub use status_view::NotifyStatusView;
58pub use storage_api::NotifyStore;
59pub(crate) use storage_api::crate_boundary::{
60    read_existing_notify_server_config_no_lock, read_notify_server_config_snapshot, resolve_notify_object_store_handle,
61    save_notify_server_config_snapshot, with_notify_server_config_read_lock,
62};