Class BowireKubernetesCatalogueServiceCollectionExtensions
- Namespace
- Kuestenlogik.Bowire.Catalogue.Kubernetes
- Assembly
- Kuestenlogik.Bowire.Catalogue.Kubernetes.dll
Wires the Kubernetes catalogue provider so it picks up its IConfiguration-bound options instead of running with the parameterless-ctor defaults (#305 Phase D).
public static class BowireKubernetesCatalogueServiceCollectionExtensions
- Inheritance
-
BowireKubernetesCatalogueServiceCollectionExtensions
- Inherited Members
Remarks
Order matters: call AddBowireKubernetesCatalogue(IServiceCollection, IConfiguration)
BEFORE AddBowireCatalogue so the
BowireKubernetesCatalogueOptions binding is in
place when the accessor singleton is built — same convention as
the core http / consul providers.
The core BuildAccessor falls through 3rd-party providers to
the parameterless-ctor instance; this extension replaces the
accessor's provider with an options-aware
KubernetesCatalogueProvider when
Bowire:Discovery:Catalogue:Provider == "kubernetes".
Methods
AddBowireKubernetesCatalogue(IServiceCollection, IConfiguration)
Bind Bowire:Discovery:Catalogue:Kubernetes and replace
the parameterless-ctor provider in the
BowireCatalogueProviderAccessor with one that
reads options from configuration on every fetch.
public static IServiceCollection AddBowireKubernetesCatalogue(this IServiceCollection services, IConfiguration configuration)
Parameters
servicesIServiceCollectionconfigurationIConfiguration
Returns
AddBowireKubernetesCatalogue(IServiceCollection, Action<BowireKubernetesCatalogueOptions>)
Overload for hosts that don't bind IConfiguration.
public static IServiceCollection AddBowireKubernetesCatalogue(this IServiceCollection services, Action<BowireKubernetesCatalogueOptions> configure)
Parameters
servicesIServiceCollectionconfigureAction<BowireKubernetesCatalogueOptions>