MCPcopy Create free account

hub / github.com/NicolasLM/nucleon / functions

Functions37 in github.com/NicolasLM/nucleon

↓ 8 callersMethodreregister
Re-register interest in events with the event_loop
src/tcplb.rs:627
↓ 7 callersMethodremove
(&mut self, backend_str: &str)
src/backend.rs:45
↓ 5 callersMethodget
(&mut self)
src/backend.rs:31
↓ 5 callersMethodterminate_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 callersMethodaccept
Accept all pending connections
src/tcplb.rs:170
↓ 2 callersMethodconnect_to_backend_server
Create a new TCP socket to a backend server
src/tcplb.rs:254
↓ 2 callersMethodcreate_connection_from_sock
Create a Connection instance from a socket
src/tcplb.rs:260
↓ 2 callersMethodderegister
De-register every interest in events for this connection
src/tcplb.rs:639
↓ 2 callersMethoddestroy_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 callersMethodread_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 callersMethodregister
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 callersMethodtry_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 callersMethodaccept_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 callersMethodadd
(&mut self, backend_str: &str)
src/backend.rs:39
↓ 1 callersFunctioncreate_sync_thread
(backend: Arc<Mutex<RoundRobinBackend>>, redis_url: String)
src/sync.rs:8
↓ 1 callersMethodfind_connection_by_token
Find a connection in the slab using the given token.
src/tcplb.rs:340
↓ 1 callersMethodflush_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 callersMethodflush_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 callersFunctionhandle_message
(backend: Arc<Mutex<RoundRobinBackend>>, msg: redis::Msg)
src/sync.rs:27
↓ 1 callersMethodhandle_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 callersMethodlink_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 callersMethodpush_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 callersMethodread
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 callersMethodsend_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 callersFunctionsubscribe_to_redis
(url: &str)
src/sync.rs:18
↓ 1 callersMethodwrite
Try to flush all send queue Returns true when everything is flushed, false otherwise
src/tcplb.rs:550
↓ 1 callersMethodwrite_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
Methoddrop
(&mut self)
src/tcplb.rs:474
Functionmain
()
src/main.rs:18
Methodnew
(backends_str: Vec<String>)
src/backend.rs:16
Methodnew
Create an instance of our proxy
src/tcplb.rs:43
Methodready
Method called when a event from the event loop is notified
src/tcplb.rs:391
Functiontest_add_to_rrb_backend
()
src/backend.rs:82
Functiontest_empty_rrb_backend
()
src/backend.rs:74
Functiontest_remove_from_rrb_backend
()
src/backend.rs:92
Functiontest_rrb_backend
()
src/backend.rs:59
Methodtimeout
Method called when a timeout is fired Only used for backend server connection timeout
src/tcplb.rs:382