Azure / service-fabric-rs

Service Fabric Rust
MIT License
7 stars 7 forks source link

[FabricClient] Support FabricClient user notification callback #70

Closed youyuanwu closed 2 months ago

youyuanwu commented 2 months ago

Support service notification callback and client connection notification callbacks. You can construct FabricClient with callbacks lambda functions like this:

let fc = FabricClientBuilder::new()
        .with_on_service_notification(move |notification| {
            Ok(())
        })
        .with_on_client_connect(move |gw| {
            Ok(())
        })
        .with_on_client_disconnect(move |_| {
             Ok(())
        })
        .with_client_role(mssf_core::types::ClientRole::User).build()

with_on_service_notification callback is configured by register_service_notification_filter API.