Skip to content

Commit e6e5428

Browse files
committed
cleanup
Signed-off-by: Gal Ovadia <ggalovadia@gmail.com>
1 parent 4f2d468 commit e6e5428

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

rust/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,14 @@ pub mod listener_tls_detector;
6464
// Implements a system for defining egress policies by hostname.
6565
pub mod egress_policies;
6666

67-
// Program initialization function called before any filters are created.
68-
// Return true to indicate successful initialization, false to fail module loading.
67+
/// This implements the [`envoy_proxy_dynamic_modules_rust_sdk::ProgramInitFunction`].
68+
///
69+
/// This is called exactly once when the module is loaded. It can be used to
70+
/// initialize global state as well as check the runtime environment to ensure that
71+
/// the module is running in a supported environment.
72+
///
73+
/// Returning `false` will cause Envoy to reject the config hence the
74+
/// filter will not be loaded.
6975
fn program_init() -> bool {
7076
envoy_log_info!("Rust dynamic module initialized");
7177
true

0 commit comments

Comments
 (0)