
nearby/consumer/polaris.yaml and nearby/provider/polaris.yaml files.nearby/consumer/polaris.yaml as an example).global:serverConnector:addresses:- 10.0.4.6:8091location:# Set the geographic information provider plugin for the polaris-go process to the Tencent Cloud plugin# If the current process is in CVM or TKE, it can automatically obtain the location information of the current process.## If automatic acquisition fails, you can set the plugin to env and then inject the following environment variables in linux.# POLARIS_INSTANCE_ZONE: Set the zone information, for example ap-guangzhou# POLARIS_INSTANCE_CAMPUS: Set the IDC information, for example ap-guangzhou-3provider: qcloudconsumer:serviceRouter:# Service Routing Chainchain:# Routing Policy Based on Caller and Callee Service Rules (Default Routing Policy)- ruleBasedRouter# Nearby Routing Policy- nearbyBasedRouter# Description: Configuration of the service routing pluginplugin:nearbyBasedRouter:# Description: Minimum matching level for nearby routing# Scope: region (large area), zone (area), campus (data center park)matchLevel: campus


${app.port} with the listening port of the consumer (default: 18080), and ${add.address} with the exposed IP address of the consumer.curl -L -X GET 'http://${add.address}:${app.port}/echo'Expected return value: Hello, I'm RouteNearbyEchoServer Provider, MyLocInfo's : xxx, host : xxx:xxx
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan