pub struct DaemonApiClient<Stub = Channel<DaemonApiRequest, DaemonApiResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl DaemonApiClient
impl DaemonApiClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<DaemonApiRequest, DaemonApiResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<DaemonApiRequest, DaemonApiResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> DaemonApiClient<Stub>
impl<Stub> DaemonApiClient<Stub>
Sourcepub fn aranya_local_addr(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<SocketAddr>, RpcError>> + '_
pub fn aranya_local_addr( &self, ctx: Context, ) -> impl Future<Output = Result<Result<SocketAddr>, RpcError>> + '_
Gets local address the Aranya sync server is bound to.
Sourcepub fn get_key_bundle(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
pub fn get_key_bundle( &self, ctx: Context, ) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
Gets the public key bundle for this device
Sourcepub fn get_device_id(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<DeviceId>, RpcError>> + '_
pub fn get_device_id( &self, ctx: Context, ) -> impl Future<Output = Result<Result<DeviceId>, RpcError>> + '_
Gets the public device id.
Sourcepub fn add_sync_peer(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
interval: Duration,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_sync_peer( &self, ctx: Context, addr: Addr, team: TeamId, interval: Duration, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Adds the peer for automatic periodic syncing.
Sourcepub fn remove_sync_peer(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_sync_peer( &self, ctx: Context, addr: Addr, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Removes the peer from automatic syncing.
Sourcepub fn add_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
add a team to the local device store that was created by someone else. Not an aranya action/command.
Sourcepub fn remove_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
remove a team from the local device store.
Sourcepub fn create_team(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<TeamId>, RpcError>> + '_
pub fn create_team( &self, ctx: Context, ) -> impl Future<Output = Result<Result<TeamId>, RpcError>> + '_
Create a new graph/team with the current device as the owner.
Sourcepub fn close_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn close_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Close the team.
Sourcepub fn add_device_to_team(
&self,
ctx: Context,
team: TeamId,
keys: KeyBundle,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_device_to_team( &self, ctx: Context, team: TeamId, keys: KeyBundle, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Add device to the team.
Sourcepub fn remove_device_from_team(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_device_from_team( &self, ctx: Context, team: TeamId, device: DeviceId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Remove device from the team.
Sourcepub fn assign_role(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
role: Role,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_role( &self, ctx: Context, team: TeamId, device: DeviceId, role: Role, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Assign a role to a device.
Sourcepub fn revoke_role(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
role: Role,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn revoke_role( &self, ctx: Context, team: TeamId, device: DeviceId, role: Role, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Revoke a role from a device.
Sourcepub fn assign_net_identifier(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
name: NetIdentifier,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_net_identifier( &self, ctx: Context, team: TeamId, device: DeviceId, name: NetIdentifier, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Assign a network identifier to a device.
Sourcepub fn remove_net_identifier(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
name: NetIdentifier,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_net_identifier( &self, ctx: Context, team: TeamId, device: DeviceId, name: NetIdentifier, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Remove a network identifier from a device.
Sourcepub fn create_label(
&self,
ctx: Context,
team: TeamId,
label: Label,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn create_label( &self, ctx: Context, team: TeamId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Create a fast channels label.
Sourcepub fn delete_label(
&self,
ctx: Context,
team: TeamId,
label: Label,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn delete_label( &self, ctx: Context, team: TeamId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Delete a fast channels label.
Sourcepub fn assign_label(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
label: Label,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_label( &self, ctx: Context, team: TeamId, device: DeviceId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Assign a fast channels label to a device.
Sourcepub fn revoke_label(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
label: Label,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn revoke_label( &self, ctx: Context, team: TeamId, device: DeviceId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Revoke a fast channels label from a device.
Sourcepub fn create_bidi_channel(
&self,
ctx: Context,
team: TeamId,
peer: NetIdentifier,
node_id: NodeId,
label: Label,
) -> impl Future<Output = Result<Result<(AfcId, AfcCtrl)>, RpcError>> + '_
pub fn create_bidi_channel( &self, ctx: Context, team: TeamId, peer: NetIdentifier, node_id: NodeId, label: Label, ) -> impl Future<Output = Result<Result<(AfcId, AfcCtrl)>, RpcError>> + '_
Create a fast channel.
Trait Implementations§
Source§impl<Stub: Clone> Clone for DaemonApiClient<Stub>
impl<Stub: Clone> Clone for DaemonApiClient<Stub>
Source§fn clone(&self) -> DaemonApiClient<Stub>
fn clone(&self) -> DaemonApiClient<Stub>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more