|
| prometheus_broker (actor_config &cfg) |
|
| prometheus_broker (actor_config &cfg, io::doorman_ptr ptr) |
|
const char * | name () const override |
|
behavior | make_behavior () override |
|
template<class F , class... Ts> |
infer_handle_from_fun_t< F > | fork (F fun, connection_handle hdl, Ts &&... xs) |
|
void | initialize () override |
|
template<class... Args> |
auto | mail (Args &&... args) |
| Starts a new message.
|
|
template<class T , class... Ts> |
void | become (T &&arg, Ts &&... args) |
| Changes the behavior of this actor.
|
|
void | unbecome () |
| Removes the last added behavior.
|
|
| abstract_broker (abstract_broker &&)=delete |
|
| abstract_broker (const abstract_broker &&)=delete |
|
abstract_broker & | operator= (abstract_broker &&)=delete |
|
abstract_broker & | operator= (const abstract_broker &&)=delete |
|
bool | enqueue (mailbox_element_ptr, scheduler *) override |
|
void | launch (scheduler *eu, bool lazy, bool hide) override |
|
void | on_cleanup (const error &reason) override |
|
resume_result | resume (scheduler *, size_t) override |
|
template<class Handle > |
void | halt (Handle hdl) |
| Suspends activities on hdl unconditionally.
|
|
template<class Handle > |
void | trigger (Handle hdl) |
| Allows activities on hdl unconditionally (default).
|
|
template<class Handle > |
void | trigger (Handle hdl, size_t num_events) |
| Allows num_events activities on hdl .
|
|
void | configure_read (connection_handle hdl, receive_policy::config cfg) |
| Modifies the receive policy for a given connection.
|
|
void | ack_writes (connection_handle hdl, bool enable) |
| Enables or disables write notifications for a given connection.
|
|
byte_buffer & | wr_buf (connection_handle hdl) |
| Returns the write buffer for a given connection.
|
|
void | write (connection_handle hdl, size_t bs, const void *buf) |
| Writes data into the buffer for a given connection.
|
|
void | write (connection_handle hdl, span< const std::byte > buf) |
| Writes buf into the buffer for a given connection.
|
|
void | flush (connection_handle hdl) |
| Sends the content of the buffer for a given connection.
|
|
void | ack_writes (datagram_handle hdl, bool enable) |
| Enables or disables write notifications for a given datagram socket.
|
|
byte_buffer & | wr_buf (datagram_handle hdl) |
| Returns the write buffer for a given sink.
|
|
void | enqueue_datagram (datagram_handle, byte_buffer) |
| Enqueue a buffer to be sent as a datagram via a given endpoint.
|
|
void | write (datagram_handle hdl, size_t data_size, const void *data) |
| Writes data into the buffer of a given sink.
|
|
void | flush (datagram_handle hdl) |
| Sends the content of the buffer to a UDP endpoint.
|
|
middleman & | parent () |
| Returns the middleman instance this broker belongs to.
|
|
void | add_scribe (scribe_ptr ptr) |
| Adds the uninitialized scribe instance ptr to this broker.
|
|
connection_handle | add_scribe (network::native_socket fd) |
| Creates and assigns a new scribe from given native socked fd .
|
|
expected< connection_handle > | add_tcp_scribe (const std::string &host, uint16_t port) |
| Tries to connect to host on given port and creates a new scribe describing the connection afterwards.
|
|
void | move_scribe (scribe_ptr ptr) |
| Moves the initialized scribe instance ptr from another broker to this broker.
|
|
void | add_doorman (doorman_ptr ptr) |
| Adds a doorman instance to this broker.
|
|
accept_handle | add_doorman (network::native_socket fd) |
| Creates and assigns a new doorman from given native socked fd .
|
|
void | move_doorman (doorman_ptr ptr) |
| Adds a doorman instance to this broker.
|
|
expected< std::pair< accept_handle, uint16_t > > | add_tcp_doorman (uint16_t port=0, const char *in=nullptr, bool reuse_addr=false) |
| Tries to open a local port and creates a doorman managing it on success.
|
|
void | add_datagram_servant (datagram_servant_ptr ptr) |
| Adds a datagram_servant to this broker.
|
|
void | add_hdl_for_datagram_servant (datagram_servant_ptr ptr, datagram_handle hdl) |
| Adds the datagram_servant under an additional hdl .
|
|
datagram_handle | add_datagram_servant (network::native_socket fd) |
| Creates and assigns a new datagram_servant from a given socket fd .
|
|
datagram_handle | add_datagram_servant_for_endpoint (network::native_socket fd, const network::ip_endpoint &ep) |
| Creates and assigns a new datagram_servant from a given socket fd for the remote endpoint ep .
|
|
expected< datagram_handle > | add_udp_datagram_servant (const std::string &host, uint16_t port) |
| Creates a new datagram_servant for the remote endpoint host and port .
|
|
expected< std::pair< datagram_handle, uint16_t > > | add_udp_datagram_servant (uint16_t port=0, const char *in=nullptr, bool reuse_addr=false) |
| Tries to open a local port and creates a datagram_servant managing it on success.
|
|
void | move_datagram_servant (datagram_servant_ptr ptr) |
| Moves an initialized datagram_servant instance ptr from another broker to this one.
|
|
std::string | remote_addr (connection_handle hdl) |
| Returns the remote address associated with hdl or empty string if hdl is invalid.
|
|
uint16_t | remote_port (connection_handle hdl) |
| Returns the remote port associated with hdl or 0 if hdl is invalid.
|
|
std::string | local_addr (accept_handle hdl) |
| Returns the local address associated with hdl or empty string if hdl is invalid.
|
|
uint16_t | local_port (accept_handle hdl) |
| Returns the local port associated with hdl or 0 if hdl is invalid.
|
|
accept_handle | hdl_by_port (uint16_t port) |
| Returns the handle associated with given local port or none .
|
|
datagram_handle | datagram_hdl_by_port (uint16_t port) |
| Returns the dgram handle associated with given local port or none .
|
|
std::string | remote_addr (datagram_handle hdl) |
| Returns the remote address associated with hdl or an empty string if hdl is invalid.
|
|
uint16_t | remote_port (datagram_handle hdl) |
| Returns the remote port associated with hdl or 0 if hdl is invalid.
|
|
uint16_t | local_port (datagram_handle hdl) |
| Returns the remote port associated with hdl or 0 if hdl is invalid.
|
|
bool | remove_endpoint (datagram_handle hdl) |
| Remove the endpoint hdl from the broker.
|
|
void | close_all () |
| Closes all connections and acceptors.
|
|
template<class Handle > |
bool | close (Handle hdl) |
| Closes the connection or acceptor identified by handle .
|
|
template<class Handle > |
bool | valid (Handle hdl) |
| Checks whether hdl is assigned to broker.
|
|
const char * | name () const override |
|
subtype_t | subtype () const noexcept override |
|
size_t | num_connections () const noexcept |
| Returns the number of open connections.
|
|
size_t | num_doormen () const noexcept |
| Returns the number of attached doorman for accepting incoming connections.
|
|
std::vector< connection_handle > | connections () const |
| Returns all handles of all scribe instances attached to this broker.
|
|
network::multiplexer & | backend () |
| Returns the multiplexer running this broker.
|
|
Makes system metrics in the Prometheus format available via HTTP 1.1.