You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, let's say I want to parse a configuration file to build my tonic server:
// Let's exclude the file parsing code since it's not the focus herestructMyTonicConfig{http1:bool,concurrency_limit:Option<usize>,keep_alive:Option<std::time::Duration>,}fnbuild_tonic_by_config(config:MyTonicConfig) -> tonic::transport::Server{letmut my_tonic_server = Server::builder();if config.http1{
my_tonic_server = my_tonic_server.accept_http1(true);}ifletSome(concurrency_limit) = config.concurrency_limit{
my_tonic_server = my_tonic_server.concurrency_limit_per_connection(concurrency_limit);}
my_tonic_server = my_tonic_server.http2_keepalive_timeout(config.keep_alive);
my_tonic_server
}
I would like to be able to inspect the resulting tonic server to be sure my code is working as expected, but I can't find any getter for tonic::transportation::Server fields.
Similar, but I think more complicated, scenario I think is applicable for Router and Routes.
Proposal
The simplest solution I can think is to add getters for tonic::transportaion:Server
Alternatives
Implement an "expect" like method that can compare tonic::transportaion:Server fields value with given test value.
Implement PartialEq/Eq for tonic::transportaion:Server
The text was updated successfully, but these errors were encountered:
Feature Request
Motivation
For example, let's say I want to parse a configuration file to build my tonic server:
I would like to be able to inspect the resulting tonic server to be sure my code is working as expected, but I can't find any getter for
tonic::transportation::Server
fields.Similar, but I think more complicated, scenario I think is applicable for Router and Routes.
Proposal
The simplest solution I can think is to add getters for
tonic::transportaion:Server
Alternatives
tonic::transportaion:Server
fields value with given test value.PartialEq
/Eq
fortonic::transportaion:Server
The text was updated successfully, but these errors were encountered: