Skip to content

Commit 2796d59

Browse files
Correct broken references in servicediscovery.rst (#2187)
* Correct broken service discovery references Signed-off-by: Emmanuel Ferdman <[email protected]> * Fix internal references of the links --------- Signed-off-by: Emmanuel Ferdman <[email protected]> Co-authored-by: Raman Maksimchuk <[email protected]>
1 parent e4bc9ff commit 2796d59

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

docs/features/servicediscovery.rst

+20-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. service-discovery:
2-
31
Service Discovery
42
=================
53

@@ -282,7 +280,7 @@ Then add the following to your ``ConfigureServices`` method.
282280
283281
s.AddOcelot().AddEureka();
284282
285-
Then in order to get this working add the following to **ocelot.json**:
283+
Then in order to get this working add the following to `ocelot.json`_:
286284

287285
.. code-block:: json
288286
@@ -309,7 +307,7 @@ Ocelot will now register all the necessary services when it starts up and if you
309307
One of the services polls Eureka every 30 seconds (default) and gets the latest service state and persists this in memory.
310308
When Ocelot asks for a given service it is retrieved from memory so performance is not a big problem.
311309

312-
Ocelot will use the scheme (``http``, ``https``) set in Eureka if these values are not provided in **ocelot.json**
310+
Ocelot will use the scheme (``http``, ``https``) set in Eureka if these values are not provided in `ocelot.json`_.
313311

314312
.. _sd-dynamic-routing:
315313

@@ -443,7 +441,7 @@ This is done by implementing the ``IServiceDiscoveryProvider`` interface, as sho
443441
}
444442
}
445443
446-
And set its class name as the provider type in **ocelot.json**:
444+
And set its class name as the provider type in `ocelot.json`_:
447445

448446
.. code-block:: json
449447
@@ -464,36 +462,43 @@ Finally, in the application's **ConfigureServices** method, register a ``Service
464462
services.AddSingleton(serviceDiscoveryFinder);
465463
services.AddOcelot();
466464
465+
.. _sd-custom-provider-sample:
466+
467467
Custom Provider Sample
468468
^^^^^^^^^^^^^^^^^^^^^^
469469

470470
In order to introduce a basic template for a custom Service Discovery provider, we've prepared a good sample:
471471

472-
| **Link**: `samples <https://github.com/ThreeMammals/Ocelot/tree/main/samples>`_ / `OcelotServiceDiscovery <https://github.com/ThreeMammals/Ocelot/tree/main/samples/OcelotServiceDiscovery>`_
473-
| **Solution**: `Ocelot.Samples.ServiceDiscovery.sln <https://github.com/ThreeMammals/Ocelot/blob/main/samples/OcelotServiceDiscovery/Ocelot.Samples.ServiceDiscovery.sln>`_
472+
| **Link**: `samples <https://github.com/ThreeMammals/Ocelot/tree/main/samples>`_ / `ServiceDiscovery <https://github.com/ThreeMammals/Ocelot/tree/main/samples/ServiceDiscovery>`_
473+
| **Solution**: `Ocelot.Samples.ServiceDiscovery.sln <https://github.com/ThreeMammals/Ocelot/blob/main/samples/ServiceDiscovery/Ocelot.Samples.ServiceDiscovery.sln>`_
474474
475475
This solution contains the following projects:
476476

477-
- `ApiGateway <#apigateway>`_
478-
- `DownstreamService <#downstreamservice>`_
477+
- :ref:`sd-cps-api-gateway`
478+
- :ref:`sd-cps-downstream-service`
479479

480480
This solution is ready for any deployment. All services are bound, meaning all ports and hosts are prepared for immediate use (running in Visual Studio).
481481

482-
All instructions for running this solution are in `README.md <https://github.com/ThreeMammals/Ocelot/blob/main/samples/OcelotServiceDiscovery/README.md>`_.
482+
All instructions for running this solution are in `README.md <https://github.com/ThreeMammals/Ocelot/blob/main/samples/ServiceDiscovery/README.md>`_.
483+
484+
485+
.. _sd-cps-downstream-service:
483486

484487
DownstreamService
485488
"""""""""""""""""
486489

487-
This project provides a single downstream service that can be reused across `ApiGateway <#apigateway>`_ routes.
490+
This project provides a single downstream service that can be reused across :ref:`sd-cps-api-gateway` routes.
488491
It has multiple **launchSettings.json** profiles for your favorite launch and hosting scenarios: Visual Studio running sessions, Kestrel console hosting, and Docker deployments.
489492

493+
.. _sd-cps-api-gateway:
494+
490495
ApiGateway
491496
""""""""""
492497

493-
This project includes a custom *Service Discovery* provider and it only has route(s) to `DownstreamService <#downstreamservice>`_ services in the **ocelot.json** file.
498+
This project includes a custom *Service Discovery* provider and it only has route(s) to :ref:`sd-cps-downstream-service` services in the `ocelot.json <https://github.com/ThreeMammals/Ocelot/blob/main/samples/ServiceDiscovery/ApiGateway/ocelot.json>`__ file.
494499
You can add more routes!
495500

496-
The main source code for the custom provider is in the `ServiceDiscovery <https://github.com/ThreeMammals/Ocelot/tree/main/samples/OcelotServiceDiscovery/ApiGateway/ServiceDiscovery>`_ folder:
501+
The main source code for the custom provider is in the `ServiceDiscovery <https://github.com/ThreeMammals/Ocelot/tree/main/samples/ServiceDiscovery/ApiGateway/ServiceDiscovery>`__ folder:
497502
the ``MyServiceDiscoveryProvider`` and ``MyServiceDiscoveryProviderFactory`` classes.
498503
You are welcome to design and develop them!
499504

@@ -537,8 +542,8 @@ But you can leave this ``Type`` option for compatibility between both designs.
537542
""""
538543

539544
.. [#f1] :ref:`di-the-addocelot-method` adds default ASP.NET services to DI container. You could call another extended :ref:`di-addocelotusingbuilder-method` while configuring services to develop your own :ref:`di-custom-builder`. See more instructions in the ":ref:`di-addocelotusingbuilder-method`" section of :doc:`../features/dependencyinjection` feature.
540-
.. [#f2] *"Consul Configuration Key"* feature was requested in issue `346`_ as a part of version `7.0.0`_.
541-
.. [#f3] Customization of *"Consul Service Builder"* was implemented as a part of bug `954`_ fixing and the feature was delivered in version `23.3`_.
545+
.. [#f2] :ref:`sd-consul-configuration-key` feature was requested in issue `346`_ as a part of version `7.0.0`_.
546+
.. [#f3] Customization of :ref:`sd-consul-service-builder` was implemented as a part of bug `954`_ fixing and the feature was delivered in version `23.3`_.
542547
543548
.. _ocelot.json: https://github.com/ThreeMammals/Ocelot/blob/main/test/Ocelot.ManualTest/ocelot.json
544549
.. _Consul: https://www.consul.io/

0 commit comments

Comments
 (0)