Struct sda_client::SdaClient
[−]
[src]
pub struct SdaClient { pub agent: Agent, // some fields omitted }
Primary object for interacting with the SDA service.
For instance used by participants to provide input to aggregations and by clerks to perform their clerking tasks.
Fields
agent: Agent
Agent to be used when e.g. identifying with the service.
Methods
impl SdaClient
[src]
fn new_agent(keystore: Arc<Keystore>) -> SdaClientResult<Agent>
Create a new agent, including mandatory signature keypair.
impl SdaClient
[src]
fn new(agent: Agent,
keystore: Arc<Keystore>,
service: Arc<SdaService>)
-> SdaClient
keystore: Arc<Keystore>,
service: Arc<SdaService>)
-> SdaClient
Create a new client.
Trait Implementations
impl Maintenance for SdaClient
[src]
fn upload_agent(&self) -> SdaClientResult<()>
Upload agent to service.
fn new_encryption_key(&self) -> SdaClientResult<EncryptionKeyId>
Create new encryption key in keystore.
fn upload_encryption_key(&self, key: &EncryptionKeyId) -> SdaClientResult<()>
Upload encryption key to service.
impl Participating for SdaClient
[src]
fn participate(&self,
input: Vec<i64>,
aggregation: &AggregationId)
-> SdaClientResult<()>
input: Vec<i64>,
aggregation: &AggregationId)
-> SdaClientResult<()>
Helper method combining new_participation
and upload_participation
.
fn new_participation(&self,
input: &ParticipantInput,
aggregation_id: &AggregationId)
-> SdaClientResult<Participation>
input: &ParticipantInput,
aggregation_id: &AggregationId)
-> SdaClientResult<Participation>
Create a new participation to the given aggregation. Read more
fn upload_participation(&self, input: &Participation) -> SdaClientResult<()>
Upload participation to the service.
impl Clerking for SdaClient
[src]
fn clerk_once(&self) -> SdaClientResult<bool>
Execute clerking process once: download, process, and upload the next job pending on the service, if any.
fn run_chores(&self, max_iterations: isize) -> SdaClientResult<()>
This is the typical method clerks should use. Execute routine chores, including registration and clerking. Read more
impl Receiving for SdaClient
[src]
fn upload_aggregation(&self, aggregation: &Aggregation) -> SdaClientResult<()>
Upload aggregation to service.
fn begin_aggregation(&self,
aggregation_id: &AggregationId)
-> SdaClientResult<()>
aggregation_id: &AggregationId)
-> SdaClientResult<()>
Opens the aggregation for participations. Read more
fn end_aggregation(&self, aggregation: &AggregationId) -> SdaClientResult<()>
Closes the aggregation for participations.
fn reveal_aggregation(&self,
aggregation_id: &AggregationId)
-> SdaClientResult<RecipientOutput>
aggregation_id: &AggregationId)
-> SdaClientResult<RecipientOutput>
Downloads result from service and decrypts it.