pub struct Server { /* private fields */ }
Expand description

A gRPC Server that implements the tokio-console wire format.

Client applications, such as the tokio-console CLI connect to the gRPC server, and stream data about the runtime’s history (such as a list of the currently active tasks, or statistics summarizing polling times). A Server also interprets commands from a client application, such a request to focus in on a specific task, and translates that into a stream of details specific to that task.

Implementations

A Server by default binds socket address 127.0.0.1 to service remote procedure calls.

Note that methods like init and spawn will parse the socket address from the TOKIO_CONSOLE_BIND environment variable before falling back on constructing a socket address from this default.

See also Builder::server_addr.

A Server by default binds port 6669 to service remote procedure calls.

Note that methods like init and spawn will parse the socket address from the TOKIO_CONSOLE_BIND environment variable before falling back on constructing a socket address from this default.

See also Builder::server_addr.

Starts the gRPC service with the default gRPC settings.

To configure gRPC server settings before starting the server, use serve_with instead. This method is equivalent to calling serve_with and providing the default gRPC server settings:

server.serve_with(tonic::transport::Server::default()).await

Starts the gRPC service with the given tonic gRPC transport server builder.

The builder parameter may be used to configure gRPC-specific settings prior to starting the server.

This spawns both the server task and the event aggregation worker task on the current async runtime.

Trait Implementations

Server streaming response type for the WatchUpdates method.

Server streaming response type for the WatchTaskDetails method.

Produces a stream of updates representing the behavior of the instrumented async runtime.

Produces a stream of updates describing the activity of a specific task.

Registers that the console observer wants to pause the stream.

Registers that the console observer wants to resume the stream.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more