MCPcopy Create free account

hub / github.com/algorealmInc/SwarmNL / functions

Functions233 in github.com/algorealmInc/SwarmNL

↓ 115 callersMethodinsert
Push [`StreamId`]s into buffer. Returns `false` if the buffer is full and request cannot be stored.
swarm-nl/src/core/prelude.rs:243
↓ 40 callersMethodquery_network
Perform an atomic `send` and `recieve` to and from the network layer. This function is atomic and blocks until the result of the request is returned f
swarm-nl/src/core/mod.rs:1007
↓ 28 callersMethodjoin_repl_network
Join a replica network and get up to speed with the current network data state. If the consistency model is eventual, the node's buffer will almost i
swarm-nl/src/core/mod.rs:1139
↓ 25 callersMethodwith_tcp
Configure the TCP/IP port. Note: Port must range between [`MIN_PORT`] and [`MAX_PORT`].
swarm-nl/src/setup.rs:74
↓ 24 callersMethodreplicate
Send data to replica nodes.
swarm-nl/src/core/mod.rs:1213
↓ 22 callersFunctionsetup_node
Create a determininstic node.
swarm-nl/src/core/tests/replication.rs:47
↓ 21 callersMethodgenerate_keypair_from_protobuf
Generate a Cryptographic Keypair from a protobuf format. This will override any already set keypair. # Panics This function will panic if the `u8`
swarm-nl/src/setup.rs:137
↓ 21 callersMethodwith_udp
Configure the UDP port. Note: Port must range between [`MIN_PORT`] and [`MAX_PORT`]
swarm-nl/src/setup.rs:85
↓ 20 callersMethodnext_event
Return the next event in the network event queue.
swarm-nl/src/core/mod.rs:868
↓ 19 callersMethodbuild
Build the [`Core`] data structure. Handles the configuration of the libp2p Swarm structure and the selected transport protocols, behaviours and node
swarm-nl/src/core/mod.rs:399
↓ 19 callersFunctionsetup_node_1
Used to create a detereministic node.
swarm-nl/src/core/tests/layer_communication.rs:36
↓ 18 callersMethodjoin_network
Join a shard network.
swarm-nl/src/core/sharding.rs:63
↓ 17 callersMethodconsume_repl_data
Consume data in replication buffer.
swarm-nl/src/core/mod.rs:1128
↓ 15 callersMethodnext
Generate a new random stream id, using the current as reference.
swarm-nl/src/core/prelude.rs:215
↓ 15 callersMethodrecv_from_network
Explicitly retrieve the reponse to a request sent to the network layer. This function is decoupled from the [`Core::send_to_network()`] method so as t
swarm-nl/src/core/mod.rs:932
↓ 15 callersMethodsend_to_network
Send data to the network layer and recieve a unique `StreamId` to track the request. If the internal stream buffer is full, `None` will be returned.
swarm-nl/src/core/mod.rs:893
↓ 14 callersMethodwith_bootnodes
Configure available bootnodes.
swarm-nl/src/setup.rs:58
↓ 12 callersMethodpush
Append an item to the queue.
swarm-nl/src/core/prelude.rs:710
↓ 12 callersMethodremove
Remove a [`StreamId`] from the buffer.
swarm-nl/src/core/prelude.rs:279
↓ 12 callersFunctionsetup_node
Create a determininstic node
swarm-nl/src/core/tests/sharding.rs:113
↓ 11 callersFunctionget_unix_timestamp
Get unix timestamp as string.
swarm-nl/src/util.rs:189
↓ 11 callersMethodwith_rpc
Configure the RPC protocol for the network.
swarm-nl/src/core/mod.rs:328
↓ 10 callersMethodwith_gossipsub
Configure the `Gossipsub` protocol for the network. # Panics This function panics if `Gossipsub` cannot be configured properly.
swarm-nl/src/core/mod.rs:365
↓ 9 callersMethodwith_replication
Configure the `Replication` protocol for the network.
swarm-nl/src/core/mod.rs:306
↓ 6 callersMethodpeer_id
Return the node's `PeerId`.
swarm-nl/src/core/mod.rs:854
↓ 6 callersFunctionsetup_core_builder
Set up a default node helper
swarm-nl/src/core/tests/node_behaviour.rs:19
↓ 6 callersFunctionsetup_node_2
Used to create a node to peer with node_1.
swarm-nl/src/core/tests/layer_communication.rs:55
↓ 6 callersMethodshard
Send data to peers in the appropriate logical shard. It returns the data if the node is a member of the shard after replicating it to fellow nodes in
swarm-nl/src/core/sharding.rs:159
↓ 5 callersMethodevents
Return an iterator to the buffered network layer events and consume them.
swarm-nl/src/core/mod.rs:859
↓ 5 callersMethodpop_front
Pop the front (earliest data) from the queue
swarm-nl/src/core/replication.rs:348
↓ 5 callersMethodpush
Push a new [ReplBufferData] item into the buffer.
swarm-nl/src/core/replication.rs:183
↓ 4 callersMethodconsistency_model
Return the configured [`ConsistencyModel`] for data synchronization.
swarm-nl/src/core/replication.rs:158
↓ 4 callersMethodgenerate_keypair
Generate a Cryptographic Keypair for node identity creation and message signing. An RSA keypair cannot be generated on-the-fly. It has to be generate
swarm-nl/src/setup.rs:106
↓ 4 callersMethodkeypair
Return a node's cryptographic keypair.
swarm-nl/src/setup.rs:165
↓ 4 callersFunctionread_ini_file
Read an INI file containing bootstrap config information.
swarm-nl/src/util.rs:23
↓ 4 callersFunctionsample_event
Sample network event for testing.
swarm-nl/src/core/tests/layer_communication.rs:108
↓ 4 callersMethodsave_keypair_offline
Serialize keypair to protobuf format and write to config file on disk. This could be useful for saving a keypair for future use when going offline. I
swarm-nl/src/core/mod.rs:826
↓ 4 callersMethodwith_network_id
Explicitly configure the network (protocol) id. Note that it must be of the format "/protocol-name/version" otherwise it will default to "/swarmnl/1.
swarm-nl/src/core/mod.rs:250
↓ 3 callersFunctionappend_to_file
Utility function to append content to a file.
examples/sharding/hash-based/src/main.rs:133
↓ 3 callersFunctionclean_up_temp_file
Helper to clean up temp file
swarm-nl/src/util.rs:347
↓ 3 callersMethodfetch
Fetch data from the shard network. It returns `None` if the node is a memnber of the shard with the data, meaning the node should read it locally.
swarm-nl/src/core/sharding.rs:224
↓ 3 callersMethodinto_inner
Return the inner list we're keeping track of.
swarm-nl/src/core/prelude.rs:670
↓ 3 callersMethodlisten_on
Configure the IP address to listen on. If none is specified, the default value is `Ipv4Addr::new(0, 0, 0, 0)`. See: [`DEFAULT_IP_ADDRESS`].
swarm-nl/src/core/mod.rs:267
↓ 3 callersMethodpop
Remove an item from the top of the queue.
swarm-nl/src/core/prelude.rs:705
↓ 3 callersMethodreplicate_buffer
Clone a replica node's current buffer image. This is necessary in case of joining a replica network with a strong consistency model.
swarm-nl/src/core/mod.rs:1189
↓ 3 callersFunctionrun_node
#[cfg(feature = "first-node")]
examples/replication/strong-consistency/src/main.rs:81
↓ 3 callersFunctionrun_node
#[cfg(feature = "first-node")]
examples/replication/eventual-consistency/src/main.rs:83
↓ 3 callersFunctionrun_node
#[cfg(feature = "first-node")]
examples/replication/peer-cloning/src/main.rs:86
↓ 3 callersFunctionrun_node
( name: &str, ports_1: (Port, Port), ports_2: (Port, Port), ports_3: (Port, Port), peer_ids: (PeerId, Pee
examples/http-client/src/main.rs:89
↓ 3 callersFunctionrun_node
( name: &str, ports_1: (Port, Port), ports_2: (Port, Port), ports_3: (Port, Port), peer_ids: (PeerId, Pee
examples/ipfs/src/main.rs:92
↓ 3 callersFunctionrun_node
#[cfg(feature = "first-node")]
examples/sharding/range-based/src/main.rs:178
↓ 3 callersFunctionrun_node
#[cfg(feature = "first-node")]
examples/sharding/hash-based/src/main.rs:199
↓ 3 callersFunctionsetup_node
Setup a node using default config
swarm-nl/src/core/replication.rs:777
↓ 3 callersMethodwith_idle_connection_timeout
Configure how long to keep a connection alive (in seconds) once it is idling.
swarm-nl/src/core/mod.rs:272
↓ 3 callersMethodwith_sharding
Configure the `Sharding` protocol for the network.
swarm-nl/src/core/mod.rs:312
↓ 3 callersFunctionwrite_config
Write value into config file.
swarm-nl/src/util.rs:87
↓ 2 callersMethodbootnodes
Return the configured bootnodes for the network.
swarm-nl/src/setup.rs:175
↓ 2 callersFunctioncreate_test_ini_file
Used to test saving keypair to file
swarm-nl/src/core/tests/node_behaviour.rs:31
↓ 2 callersFunctioncreate_test_ini_file_without_keypair
Helper to create an INI file without a keypair and a valid range for ports.
swarm-nl/src/util.rs:284
↓ 2 callersMethodexit_network
Exit a shard network.
swarm-nl/src/core/sharding.rs:107
↓ 2 callersFunctionhandle_gossipsub_incoming_message
Handle the arrival of a gossip message.
examples/simple-game/src/main.rs:84
↓ 2 callersMethodinit_sharding
Setup the necessary preliminaries for the sharding protocol
swarm-nl/src/core/mod.rs:1018
↓ 2 callersMethodleave_repl_network
Leave a replica network. The messages on the internal replica queue are not discarded so as to aid speedy recorvery in case of reconnection.
swarm-nl/src/core/mod.rs:1181
↓ 2 callersMethodlocate_shard
Locate the shard corresponding to the given key.
examples/sharding/hash-based/src/main.rs:126
↓ 2 callersMethodlocate_shard
Locate the shard corresponding to the given key.
swarm-nl/src/core/tests/sharding.rs:103
↓ 2 callersFunctionpopulate_queue
Helper function to populate a queue.
swarm-nl/src/core/tests/layer_communication.rs:117
↓ 2 callersMethodreplica_peers
Return the number of replica peers in a network, with the node exclusive.
swarm-nl/src/core/mod.rs:873
↓ 2 callersFunctionstring_to_hashmap
Parse string into a hashmap.
swarm-nl/src/util.rs:116
↓ 2 callersFunctionstring_to_vec
Parse string into a vector.
swarm-nl/src/util.rs:104
↓ 2 callersMethodsync_with_eventual_consistency
Synchronize the data in the buffer queue using eventual consistency.
swarm-nl/src/core/replication.rs:477
↓ 2 callersFunctionunmarshal_messages
Unmarshall data recieved as RPC during the execution of the eventual consistency algorithm to fill in missing messages in the node's buffer.
swarm-nl/src/util.rs:147
↓ 1 callersMethodblacklist
Return the `PeerId`'s of nodes that are to be blacklisted.
swarm-nl/src/setup.rs:180
↓ 1 callersFunctionbyte_vec_to_string_vec
Convert a [ByteVector] to a [StringVector].
swarm-nl/src/util.rs:199
↓ 1 callersMethodcmp
(&self, other: &Self)
swarm-nl/src/core/replication.rs:99
↓ 1 callersFunctioncreate_test_ini_file_with_keypair
Helper to create an INI file with keypair
swarm-nl/src/util.rs:303
↓ 1 callersMethoddrain
Drain the contents of the queue.
swarm-nl/src/core/prelude.rs:724
↓ 1 callersFunctiongenerate_rsa_keypair_files
helper to generate RSA keypair files commands taken from https://docs.rs/libp2p-identity/0.2.8/libp2p_identity/struct.Keypair.html#example-generating-
swarm-nl/src/setup.rs:202
↓ 1 callersMethodhash_key
Compute a simple hash for the key.
examples/sharding/hash-based/src/main.rs:105
↓ 1 callersMethodinit
Initialize a replica networks data buffer. This occurs immediately after joining a new network.
swarm-nl/src/core/replication.rs:170
↓ 1 callersMethodports
Return the configured ports in a tuple i.e (TCP Port, UDP port).
swarm-nl/src/setup.rs:170
↓ 1 callersMethodread_file
Reads a file's content from the working directory.
examples/sharding/hash-based/src/main.rs:75
↓ 1 callersFunctionrun_node_1
Run node 1.
examples/file-sharing-app/src/main.rs:127
↓ 1 callersFunctionrun_node_1
Run node 1
examples/simple-game/src/main.rs:169
↓ 1 callersFunctionrun_node_2
Run node 2.
examples/file-sharing-app/src/main.rs:205
↓ 1 callersFunctionrun_node_2
Run node 2
examples/simple-game/src/main.rs:295
↓ 1 callersFunctionsetup_core_builder_1
(buffer: &mut [u8], ports: (u16, u16))
swarm-nl/src/core/tests/layer_communication.rs:94
↓ 1 callersFunctionsetup_node
Setup first node using default config.
examples/echo-server/src/main.rs:13
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/replication/strong-consistency/src/main.rs:42
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/replication/eventual-consistency/src/main.rs:44
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/replication/peer-cloning/src/main.rs:47
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/http-client/src/main.rs:51
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/ipfs/src/main.rs:54
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/sharding/range-based/src/main.rs:133
↓ 1 callersFunctionsetup_node
Create a determininstic node
examples/sharding/hash-based/src/main.rs:154
↓ 1 callersFunctionsetup_node_1
Used to create a detereministic node 1.
examples/file-sharing-app/src/main.rs:75
↓ 1 callersFunctionsetup_node_1
Used to create a detereministic node 1.
examples/simple-game/src/main.rs:118
↓ 1 callersFunctionsetup_node_2
Setup node 2.
examples/file-sharing-app/src/main.rs:96
↓ 1 callersFunctionsetup_node_2
Setup node 2.
examples/simple-game/src/main.rs:141
↓ 1 callersFunctionshard_image_to_bytes
Marshall the shard network image into a [ByteVector].
swarm-nl/src/util.rs:212
↓ 1 callersFunctionstring_to_peer_id
Convert a peer ID string to [`PeerId`].
swarm-nl/src/util.rs:133
next →1–100 of 233, ranked by callers