Struct GCRuntimeHandler
pub struct GCRuntimeHandler {
rest_client: GCRuntimeRestClient,
host: IpAddr,
rest_port: u16,
tcp_port: u16,
runtime_id: String,
is_fail_fast: bool,
}Fields§
§rest_client: GCRuntimeRestClient§host: IpAddr§rest_port: u16§tcp_port: u16§runtime_id: String§is_fail_fast: boolIf true, whenever there is an error while pushing the configuration to the runtime, the process will fail immediately without trying to push the rest of the configuration.
Implementations§
§impl GCRuntimeHandler
impl GCRuntimeHandler
pub fn new( host: IpAddr, rest_port: u16, tcp_port: u16, runtime_id: String, is_fail_fast: bool, ) -> Self
pub fn runtime_id(&self) -> &String
pub fn runtime_id(&self) -> &String
Gets the runtime identifier.
pub fn rest_client(&self) -> &GCRuntimeRestClient
pub fn rest_client(&self) -> &GCRuntimeRestClient
Get runtime client
pub async fn sync(
&self,
db: &GCConfigDatabase,
) -> Result<(), RuntimeManagerError>
pub async fn sync( &self, db: &GCConfigDatabase, ) -> Result<(), RuntimeManagerError>
Synchronizes the runtime configuration with the configuration database.
pub async fn get_remote_config_state(
&self,
config_builder: GCConfigStateBuilder<'_, '_>,
) -> Result<GCConfigState, RuntimeManagerError>
pub async fn get_remote_config_state( &self, config_builder: GCConfigStateBuilder<'_, '_>, ) -> Result<GCConfigState, RuntimeManagerError>
Gets the current state of the runtime configuration.
async fn push_additions( &self, diff: &GCRuntimeDifference<'_>, ) -> Result<(), RuntimeManagerError>
async fn push_updates( &self, diff: &GCRuntimeDifference<'_>, ) -> Result<(), RuntimeManagerError>
async fn push_removals( &self, diff: &GCRuntimeDifference<'_>, ) -> Result<(), RuntimeManagerError>
pub async fn push_configuration(
&self,
diff: GCRuntimeDifference<'_>,
) -> Result<(), RuntimeManagerError>
pub async fn push_configuration( &self, diff: GCRuntimeDifference<'_>, ) -> Result<(), RuntimeManagerError>
Pushes the runtime configuration to the runtime.
If an error occurs, the function will return immediately if is_fail_fast is set to true.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GCRuntimeHandler
impl !RefUnwindSafe for GCRuntimeHandler
impl Send for GCRuntimeHandler
impl Sync for GCRuntimeHandler
impl Unpin for GCRuntimeHandler
impl !UnwindSafe for GCRuntimeHandler
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