Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NicolasLM/nucleon
/ functions
Functions
37 in github.com/NicolasLM/nucleon
⨍
Functions
37
◇
Types & classes
4
↓ 8 callers
Method
reregister
Re-register interest in events with the event_loop
src/tcplb.rs:627
↓ 7 callers
Method
remove
(&mut self, backend_str: &str)
src/backend.rs:45
↓ 5 callers
Method
get
(&mut self)
src/backend.rs:31
↓ 5 callers
Method
terminate_connection
Terminate a connection as well as its other end Makes sure to flush all pending queues before dropping the other end of a connection.
src/tcplb.rs:297
↓ 2 callers
Method
accept
Accept all pending connections
src/tcplb.rs:170
↓ 2 callers
Method
connect_to_backend_server
Create a new TCP socket to a backend server
src/tcplb.rs:254
↓ 2 callers
Method
create_connection_from_sock
Create a Connection instance from a socket
src/tcplb.rs:260
↓ 2 callers
Method
deregister
De-register every interest in events for this connection
src/tcplb.rs:639
↓ 2 callers
Method
destroy_connection
Clean the environment and drop connection While terminate_connection() handles corner cases, this method does not, it only cleans and drops.
src/tcplb.rs:327
↓ 2 callers
Method
read_token
Read as much as it can of a token Stops when we read everything the kernel had for us or the other end send queue is full.
src/tcplb.rs:72
↓ 2 callers
Method
register
Register interest in read events with the event_loop This will let the event loop get notified on events happening on this connection.
src/tcplb.rs:615
↓ 2 callers
Method
try_next_server
Try to connect to the next backend server Resets the timeout to prevent multiple timeouts to be set concurrently.
src/tcplb.rs:347
↓ 1 callers
Method
accept_one
Accept a single pending connections Once connection is accepted, it creates a new connection to the backend and links both connections together. Ret
src/tcplb.rs:185
↓ 1 callers
Method
add
(&mut self, backend_str: &str)
src/backend.rs:39
↓ 1 callers
Function
create_sync_thread
(backend: Arc<Mutex<RoundRobinBackend>>, redis_url: String)
src/sync.rs:8
↓ 1 callers
Method
find_connection_by_token
Find a connection in the slab using the given token.
src/tcplb.rs:340
↓ 1 callers
Method
flush_readable_tokens
Try to flush the list of readable tokens Loops on all readable tokens and remove them from the list if we flushed completely the kernel buffer.
src/tcplb.rs:106
↓ 1 callers
Method
flush_send_queue
Flush the send queue of a token Drop the connection if we sent everything and other end is gone
src/tcplb.rs:148
↓ 1 callers
Function
handle_message
(backend: Arc<Mutex<RoundRobinBackend>>, msg: redis::Msg)
src/sync.rs:27
↓ 1 callers
Method
handle_write_event
Handle a write event from the event loop We assume that getting a write event means the TCP connection phase is finished.
src/tcplb.rs:134
↓ 1 callers
Method
link_connections_together
Link two Connection together This makes it easy to know to which Connection send the data we receive on another Connection. A Connection is not inter
src/tcplb.rs:278
↓ 1 callers
Method
push_to_readable_tokens
Put a token in the list of readable tokens Once token is in the list, it is no longer interested in readable events from the event_loop.
src/tcplb.rs:62
↓ 1 callers
Method
read
Read buffers from the kernel Reads at most 'nb_buffers' buffers. Returns a tuple of (bool, Vec) wrapped in a Result. True if kernel has no more data
src/tcplb.rs:509
↓ 1 callers
Method
send_messages
Queue an outgoing message to the client This will cause the connection to register interests in write events with the event loop.
src/tcplb.rs:604
↓ 1 callers
Function
subscribe_to_redis
(url: &str)
src/sync.rs:18
↓ 1 callers
Method
write
Try to flush all send queue Returns true when everything is flushed, false otherwise
src/tcplb.rs:550
↓ 1 callers
Method
write_one_buf
Write one buffer to the socket Returns true if the totality of the buffer was sent, false if the kernel did not accept everything.
src/tcplb.rs:568
Method
drop
(&mut self)
src/tcplb.rs:474
Function
main
()
src/main.rs:18
Method
new
(backends_str: Vec<String>)
src/backend.rs:16
Method
new
Create an instance of our proxy
src/tcplb.rs:43
Method
ready
Method called when a event from the event loop is notified
src/tcplb.rs:391
Function
test_add_to_rrb_backend
()
src/backend.rs:82
Function
test_empty_rrb_backend
()
src/backend.rs:74
Function
test_remove_from_rrb_backend
()
src/backend.rs:92
Function
test_rrb_backend
()
src/backend.rs:59
Method
timeout
Method called when a timeout is fired Only used for backend server connection timeout
src/tcplb.rs:382