Struct GCGatewayControllerBuilder
pub struct GCGatewayControllerBuilder {
realtime_db: Option<GCArcRealtimeDatabase>,
message_broker: GCMessageBrokerBuilder,
plugins_path: PathBuf,
timeseries_builder: GCTimeseriesBuilder,
build_timeseries: bool,
flush_interval_ms: u64,
}Expand description
The GCGatewayControllerBuilder is a builder for the GCGatewayController Setting that cannot be changed at runtime need be set here.
Fields§
§realtime_db: Option<GCArcRealtimeDatabase>§message_broker: GCMessageBrokerBuilder§plugins_path: PathBuf§timeseries_builder: GCTimeseriesBuilder§build_timeseries: bool§flush_interval_ms: u64Implementations§
§impl GCGatewayControllerBuilder
impl GCGatewayControllerBuilder
pub fn new() -> Self
pub fn new() -> Self
Initializes the gateway builder
pub fn set_plugins_path(&mut self, plugins_path: PathBuf) -> &mut Self
pub fn set_plugins_path(&mut self, plugins_path: PathBuf) -> &mut Self
Set the path where the plugin manager will look for plugins, by default it uses the current directory.
pub fn set_concurrent_queue_size(&mut self, queue_size: usize) -> &mut Self
pub fn set_concurrent_queue_size(&mut self, queue_size: usize) -> &mut Self
Wrapper for GCMessageBrokerBuilder::set_concurrent_queue_size.
pub fn set_concurrent_threads(&mut self, sub_thread_count: u16) -> &mut Self
pub fn set_concurrent_threads(&mut self, sub_thread_count: u16) -> &mut Self
pub fn set_concurrent_blocking(&mut self, is_blocking: bool) -> &mut Self
pub fn set_concurrent_blocking(&mut self, is_blocking: bool) -> &mut Self
Wrapper for GCMessageBrokerBuilder::set_concurrent_blocking.
pub fn set_realtime_database(
&mut self,
realtime_db: GCArcRealtimeDatabase,
) -> &mut Self
pub fn set_realtime_database( &mut self, realtime_db: GCArcRealtimeDatabase, ) -> &mut Self
Set an external realtime database
pub fn register_broadcast_subscriber(
&mut self,
subscriber: Arc<dyn GCDatapointSubscriber>,
is_concurrent: bool,
) -> &mut Self
pub fn register_broadcast_subscriber( &mut self, subscriber: Arc<dyn GCDatapointSubscriber>, is_concurrent: bool, ) -> &mut Self
Register a subscriber to all datapoints
pub fn set_timeseries_host(
&mut self,
host: impl Into<String>,
port: u16,
) -> &mut Self
pub fn set_timeseries_host( &mut self, host: impl Into<String>, port: u16, ) -> &mut Self
Set TimeSeries Database fields
pub fn set_timeseries_flush_interval(&mut self, ms: u64) -> &mut Self
pub fn set_timeseries_flush_interval(&mut self, ms: u64) -> &mut Self
Set timeseries database flush interval
pub fn set_timeseries_sender( self, sender: Box<dyn TimeseriesSender>, ) -> GCGatewayController
pub fn build_with_sender(
self,
sender: Box<dyn TimeseriesSender>,
) -> GCGatewayController
pub fn build_with_sender( self, sender: Box<dyn TimeseriesSender>, ) -> GCGatewayController
Build the controller with a custom timeseries sender (useful for testing).
pub fn build(self) -> GCGatewayController
pub fn build(self) -> GCGatewayController
Build the controller
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GCGatewayControllerBuilder
impl !RefUnwindSafe for GCGatewayControllerBuilder
impl Send for GCGatewayControllerBuilder
impl Sync for GCGatewayControllerBuilder
impl Unpin for GCGatewayControllerBuilder
impl UnsafeUnpin for GCGatewayControllerBuilder
impl !UnwindSafe for GCGatewayControllerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more