Skip to main content

client

Function client 

Source
pub const fn client(service: &'static str) -> Client
Expand description

A client for service, for service-to-service calls: its requests take the service’s paths, and carry the trace and Request Context of the context they are sent in.

It is const, so it can be a static, and looks the service up when it is first used. Like base_url, it makes the calling service depend on service, so the name must be a string literal and the call made directly, in a service.

ⓘ
static ORDERS: encore::services::Client = encore::services::client("orders");