You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing design is not the best as it currently exposes functions that the user should not have access to.
ArconState
set_key / set_timestamp are exposed to users. This is something that only the internal runtime should be able to modify/call.
Backend
For the state constructor, users should not have access to Backend itself, but some form of wrapper around it with limited exposed functions.
structWriteContext{key:u64,timestamp:u64}pubstructBackendContainer<B:Backend>{cratecontext:WriteContext,crateinner:Arc<B>}OperatorBuilder{operator:Arc::new(|| ...),state:Arc::new(|c:BackendContainer| ...),// Here instead of Backendconf:Default::default(),}
Index
Right now indexes do not have an explicit constructor function and all of them expect Arc<Backend> input.
The following might be a good option instead.
The existing design is not the best as it currently exposes functions that the user should not have access to.
ArconState
set_key
/set_timestamp
are exposed to users. This is something that only the internal runtime should be able to modify/call.Backend
For the state constructor, users should not have access to
Backend
itself, but some form of wrapper around it with limited exposed functions.Index
Right now indexes do not have an explicit constructor function and all of them expect
Arc<Backend>
input.The following might be a good option instead.
The text was updated successfully, but these errors were encountered: