Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #37 from ustulation/allow-unregistered-getter-client
Browse files Browse the repository at this point in the history
allow unregistered getters
  • Loading branch information
hitman401 committed Sep 9, 2015
2 parents 80f7036 + 190dd1b commit 3ef5169
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dns_operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ impl DnsOperations {
})
}

/// Create a new instance of DnsOperations. This is used for an unregistered client and will
/// have very limited set of functionalities - mostly reads. This is ideal for browsers etc.,
/// which only want to fetch from the Network, not mutate it.
/// It is intended that only one of this be created as it operates on global data such as
/// files.
pub fn new_unregistered(unregistered_client: ::std::sync::Arc<::std::sync::Mutex<::safe_client::client::Client>>) -> DnsOperations {
DnsOperations {
client: unregistered_client,
}
}

/// Register one's own Dns - eg., pepsico.com, spandansharma.com, krishnakumar.in etc
pub fn register_dns(&self,
long_name : String,
Expand Down

0 comments on commit 3ef5169

Please sign in to comment.