pub struct HelperServiceClient<Stub = Channel<HelperServiceRequest, HelperServiceResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl HelperServiceClient
impl HelperServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<HelperServiceRequest, HelperServiceResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<HelperServiceRequest, HelperServiceResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> HelperServiceClient<Stub>
impl<Stub> HelperServiceClient<Stub>
Sourcepub fn route_add(
&self,
ctx: Context,
subnet: String,
iface: String,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn route_add( &self, ctx: Context, subnet: String, iface: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Adds a host route for subnet via iface.
Idempotent: returns Ok if the route already exists.
Sourcepub fn route_remove(
&self,
ctx: Context,
subnet: String,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn route_remove( &self, ctx: Context, subnet: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Removes the host route for subnet.
Idempotent: returns Ok if the route is already absent.
Sourcepub fn dns_install(
&self,
ctx: Context,
domain: String,
port: u16,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn dns_install( &self, ctx: Context, domain: String, port: u16, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Installs a DNS resolver file for domain pointing to 127.0.0.1:port.
Sourcepub fn dns_uninstall(
&self,
ctx: Context,
domain: String,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn dns_uninstall( &self, ctx: Context, domain: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Removes the DNS resolver file for domain.
Sourcepub fn dns_status(
&self,
ctx: Context,
domain: String,
) -> impl Future<Output = Result<Result<bool, String>, RpcError>> + '_
pub fn dns_status( &self, ctx: Context, domain: String, ) -> impl Future<Output = Result<Result<bool, String>, RpcError>> + '_
Checks if a DNS resolver file is installed for domain.
Sourcepub fn socket_link(
&self,
ctx: Context,
target: String,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn socket_link( &self, ctx: Context, target: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Creates /var/run/docker.sock symlink pointing to target.
Sourcepub fn socket_unlink(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn socket_unlink( &self, ctx: Context, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Removes the /var/run/docker.sock symlink.
Sourcepub fn cli_link(
&self,
ctx: Context,
name: String,
target: String,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn cli_link( &self, ctx: Context, name: String, target: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Creates /usr/local/bin/{name} symlink pointing to target.
Used to expose Docker CLI tools from the app bundle.
Sourcepub fn cli_unlink(
&self,
ctx: Context,
name: String,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn cli_unlink( &self, ctx: Context, name: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Removes /usr/local/bin/{name} symlink if it points inside an ArcBox bundle.
Sourcepub fn version(
&self,
ctx: Context,
) -> impl Future<Output = Result<String, RpcError>> + '_
pub fn version( &self, ctx: Context, ) -> impl Future<Output = Result<String, RpcError>> + '_
Returns the helper version string.
Sourcepub fn hosts_alias_install(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn hosts_alias_install( &self, ctx: Context, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
Appends the fixed 127.0.0.1 ArcBox alias to /etc/hosts so the
guest-data NFS mount can use ArcBox:/ as its source (Finder shows
a mount by its source host name). Takes no arguments — the helper
never writes caller-controlled hosts entries.
Trait Implementations§
Source§impl<Stub: Clone> Clone for HelperServiceClient<Stub>
impl<Stub: Clone> Clone for HelperServiceClient<Stub>
Source§fn clone(&self) -> HelperServiceClient<Stub>
fn clone(&self) -> HelperServiceClient<Stub>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more