|
using | Key = std::map< std::string, Blob > |
|
using | KeySpec = std::map< std::string, size_t > |
|
using | LookupCallback = std::function< void(std::vector< std::shared_ptr< Value > > &values, const Prefix &p)> |
|
typedef void(* | LookupCallbackRaw) (std::vector< std::shared_ptr< Value >> *values, Prefix *p, void *user_data) |
|
using | LookupCallbackSimple = std::function< void(std::vector< std::shared_ptr< Value > > &values)> |
|
typedef void(* | LookupCallbackSimpleRaw) (std::vector< std::shared_ptr< Value >> *values, void *user_data) |
|
|
| Pht (std::string name, KeySpec k_spec, std::shared_ptr< DhtRunner > dht) |
|
void | lookup (Key k, LookupCallback cb={}, DoneCallbackSimple done_cb={}, bool exact_match=true) |
|
void | lookup (Key k, LookupCallbackSimple cb={}, DoneCallbackSimple done_cb={}, bool exact_match=true) |
|
void | insert (Key k, Value v, DoneCallbackSimple done_cb={}) |
|
|
static LookupCallback | bindLookupCb (LookupCallbackRaw raw_cb, void *user_data) |
|
static LookupCallbackSimple | bindLookupCbSimple (LookupCallbackSimpleRaw raw_cb, void *user_data) |
|
|
static constexpr const size_t | MAX_NODE_ENTRY_COUNT {16} |
|
Definition at line 288 of file pht.h.
◆ insert()
void dht::indexation::Pht::insert |
( |
Key |
k, |
|
|
Value |
v, |
|
|
DoneCallbackSimple |
done_cb = {} |
|
) |
| |
|
inline |
Wrapper function which call the private one.
- Parameters
-
k | : Key to insert [i.e map of string, blob] |
v | : Value to insert |
done_cb | : Callbakc which going to be call when all the insert is done |
Definition at line 348 of file pht.h.
◆ lookup()
void dht::indexation::Pht::lookup |
( |
Key |
k, |
|
|
LookupCallback |
cb = {} , |
|
|
DoneCallbackSimple |
done_cb = {} , |
|
|
bool |
exact_match = true |
|
) |
| |
Lookup a key for a value.
The documentation for this class was generated from the following file:
- /usr/src/RPM/BUILD/opendht-1.8.1/include/opendht/indexation/pht.h