### Verify .NET SDK and Runtime Installation Source: https://github.com/steeltoeoss/steeltoe/blob/main/AGENTS.md Use these commands to check your installed .NET SDK and Runtime versions. Ensure you have the required versions for development. ```bash dotnet --list-sdks dotnet --list-runtimes ``` -------------------------------- ### PostgreSQL configuration settings Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Example appsettings.json configuration for the PostgreSQL connector. ```json { "steeltoe": { "client": { "postgresql": { "default": { "connectionString": "Host=localhost;Database=mydb;Username=postgres;Password=secret" } } } } } ``` -------------------------------- ### RabbitMQ configuration settings Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Example appsettings.json configuration for the RabbitMQ connector. ```json { "steeltoe": { "client": { "rabbitmq": { "default": { "connectionString": "amqp://guest:guest@localhost:5672" } } } } } ``` -------------------------------- ### Appsettings.json for MySQL Connector Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Example appsettings.json configuration for the MySQL connector, specifying connection details. ```json { "steeltoe": { "client": { "mysql": { "default": { "connectionString": "Server=localhost;Database=mydb;User=root;Password=secret" } } } } } ``` -------------------------------- ### Appsettings.json with Encrypted Values Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Example JSON structure for appsettings.json demonstrating how to enable encryption and specify an encrypted configuration value. ```json { "encrypt": { "enabled": true, "key": "my-secret-key" }, "database": { "password": "{cipher}ENCRYPTED_PASSWORD_HERE" } } ``` -------------------------------- ### Appsettings.json for Redis Connector Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Example appsettings.json configuration for the Redis connector, specifying connection details. ```json { "steeltoe": { "client": { "redis": { "default": { "connectionString": "localhost:6379,password=secret" } } } } } ``` -------------------------------- ### Quick Build and Test Commands Source: https://github.com/steeltoeoss/steeltoe/blob/main/AGENTS.md Execute these commands for rapid iteration during development. They build and test the project using default configurations. ```bash dotnet build dotnet test ``` -------------------------------- ### GET ICompositeConfigurationSource.Sources Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/Abstractions/PublicAPI.Shipped.txt Retrieves the list of configuration sources associated with the composite configuration source. ```APIDOC ## GET ICompositeConfigurationSource.Sources ### Description Retrieves the collection of IConfigurationSource objects currently managed by the ICompositeConfigurationSource. ### Method GET ### Endpoint ICompositeConfigurationSource.Sources ### Response #### Success Response (200) - **Sources** (IList) - A list of configuration sources. ``` -------------------------------- ### Constructor: ServiceInstancesResolver Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Discovery/src/HttpClients/PublicAPI.Shipped.txt Initializes a new instance of the ServiceInstancesResolver class using discovery clients and a logger. ```APIDOC ## Constructor: ServiceInstancesResolver ### Description Initializes a new instance of the ServiceInstancesResolver class. This constructor requires a collection of discovery clients and a logger instance to facilitate service resolution. ### Method Constructor ### Parameters #### Path Parameters - **discoveryClients** (IEnumerable) - Required - A collection of discovery clients used to locate service instances. - **logger** (ILogger) - Required - The logger instance for tracking resolution activities. ``` -------------------------------- ### Enable Prometheus Metrics Endpoint Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Exposes metrics in Prometheus format. Requires the Steeltoe.Management.Prometheus package. ```csharp using Steeltoe.Management.Prometheus; var builder = WebApplication.CreateBuilder(args); // Add Prometheus actuator with automatic middleware builder.Services.AddPrometheusActuator(); // With custom pipeline configuration builder.Services.AddPrometheusActuator( configureMiddleware: true, configurePrometheusPipeline: pipeline => pipeline.UseAuthorization()); var app = builder.Build(); // Or manually configure the middleware app.UsePrometheusActuator(); app.Run(); // Metrics available at: // GET /actuator/prometheus ``` -------------------------------- ### Configure and Run a Steeltoe Cloud-Native Application Source: https://context7.com/steeltoeoss/steeltoe/llms.txt This C# code sets up a web application with Steeltoe components for configuration, service discovery, database connection, and health monitoring. It requires specific NuGet packages and configuration in appsettings.json. ```csharp using Steeltoe.Bootstrap.AutoConfiguration; using Steeltoe.Configuration.ConfigServer; using Steeltoe.Configuration.Placeholder; using Steeltoe.Connectors.PostgreSql; using Steeltoe.Discovery.Eureka; using Steeltoe.Management.Endpoint.Actuators.All; using Steeltoe.Management.Prometheus; var builder = WebApplication.CreateBuilder(args); // Configuration builder.Configuration .AddConfigServer() .AddPlaceholderResolver(); // Services builder.Services.AddEurekaDiscoveryClient(); builder.Services.AddPostgreSql(builder.Configuration); builder.Services.AddAllActuators(); builder.Services.AddPrometheusActuator(); // HttpClient with service discovery builder.Services.AddHttpClient("inventory-service", client => { client.BaseAddress = new Uri("http://inventory-service/"); }).AddServiceDiscovery(); var app = builder.Build(); app.MapGet("/", () => "Cloud-Native Application Running"); app.Run(); ``` -------------------------------- ### AddSpringBootFromCommandLine Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/SpringBoot/PublicAPI.Shipped.txt Adds Spring Boot-style command-line configuration to the IConfigurationBuilder. ```APIDOC ## AddSpringBootFromCommandLine ### Description Configures the IConfigurationBuilder to include settings provided via command-line arguments, following Spring Boot conventions. ### Parameters - **builder** (IConfigurationBuilder) - Required - The configuration builder instance. - **args** (string[]) - Required - The command-line arguments. - **loggerFactory** (ILoggerFactory) - Optional - The logger factory for diagnostic output. ``` -------------------------------- ### Provide Configuration via Command-Line Arguments Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/SpringBoot/README.md Pass Spring Boot configuration settings directly as command-line arguments when running a .NET application. This is a convenient way to override or set specific properties. ```bash c:\projects\sample> dotnet run -- spring.cloud.stream.input.binding=barfoo barfoo info: Microsoft.Hosting.Lifetime[0] ... ``` -------------------------------- ### ConfigServerClientOptions Class Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/ConfigServer/PublicAPI.Shipped.txt Options for configuring the Config Server client. ```APIDOC ## ConfigServerClientOptions Class ### Description Provides options for configuring the connection and authentication details for the Spring Cloud Config Server client. ### Properties - **AccessTokenUri** (string?) - The URI for obtaining an access token. - **ClientId** (string?) - The client ID for OAuth2 authentication. - **ClientSecret** (string?) - The client secret for OAuth2 authentication. - **DisableTokenRenewal** (bool) - A flag to disable automatic token renewal. ``` -------------------------------- ### Configure Config Server Client Options Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/ConfigServer/PublicAPI.Shipped.txt Configures the default options for the Config Server client. ```APIDOC ## ConfigureConfigServerClientOptions ### Description Configures the default options for the Config Server client within the `IServiceCollection`. ### Method `ConfigureConfigServerClientOptions` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Returns the modified `IServiceCollection`. #### Response Example None ``` -------------------------------- ### AddKubernetesServiceBindings with all options Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/Kubernetes.ServiceBindings/PublicAPI.Shipped.txt Adds Kubernetes service bindings to the configuration builder with optional parameters for customization. ```APIDOC ## AddKubernetesServiceBindings (Full Overload) ### Description Adds Kubernetes service bindings to the configuration builder. This overload allows for detailed configuration including optional settings, reload behavior, key filtering, and custom service binding readers and loggers. ### Method `static` extension method on `Microsoft.Extensions.Configuration.IConfigurationBuilder` ### Endpoint N/A (Configuration Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None #### Method Parameters - **builder** (`Microsoft.Extensions.Configuration.IConfigurationBuilder`) - Required - The configuration builder to extend. - **optional** (`bool`) - Optional - Indicates if the service bindings are optional. - **reloadOnChange** (`bool`) - Optional - Indicates if the configuration should reload on changes. - **ignoreKeyPredicate** (`System.Predicate`) - Optional - A predicate to ignore certain keys. - **serviceBindingsReader** (`Steeltoe.Configuration.Kubernetes.ServiceBindings.IServiceBindingsReader`) - Required - The reader for service bindings. - **loggerFactory** (`Microsoft.Extensions.Logging.ILoggerFactory`) - Required - The logger factory for logging. ### Request Example ```csharp // Example usage (conceptual) var configurationBuilder = new ConfigurationBuilder(); var serviceBindingsReader = new MyServiceBindingsReader(); // Implement IServiceBindingsReader var loggerFactory = new LoggerFactory(); // Implement ILoggerFactory configurationBuilder.AddKubernetesServiceBindings(true, true, key => key.StartsWith("ignore_"), serviceBindingsReader, loggerFactory); ``` ### Response #### Success Response (IConfigurationBuilder) - Returns the modified `Microsoft.Extensions.Configuration.IConfigurationBuilder` instance. #### Response Example N/A (Method returns builder instance) ``` -------------------------------- ### Register and use SQL Server connector Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Registers a SQL Server connection using Microsoft.Data.SqlClient and demonstrates querying data via a ConnectorFactory. ```csharp using Steeltoe.Connectors.SqlServer; using Microsoft.Data.SqlClient; var builder = WebApplication.CreateBuilder(args); // Add SQL Server connector builder.Services.AddSqlServer(builder.Configuration); var app = builder.Build(); app.MapGet("/orders", async (ConnectorFactory factory) => { var connector = factory.Get(); await using var connection = (SqlConnection)connector.GetConnection(); await connection.OpenAsync(); await using var command = new SqlCommand("SELECT * FROM Orders", connection); await using var reader = await command.ExecuteReaderAsync(); var orders = new List(); while (await reader.ReadAsync()) { orders.Add(new { Id = reader.GetInt32(0), Total = reader.GetDecimal(1) }); } return orders; }); app.Run(); ``` -------------------------------- ### WindowsNetworkFileShare Constructor Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Common/src/Net/PublicAPI.Shipped.txt Initializes a new instance of the WindowsNetworkFileShare class with the specified network path and credentials. ```APIDOC ## Constructor: WindowsNetworkFileShare ### Description Initializes a new instance of the WindowsNetworkFileShare class. ### Parameters - **networkName** (string) - Required - The network path to the file share. - **credentials** (System.Net.NetworkCredential) - Required - The credentials used to access the network share. ``` -------------------------------- ### Configure Consul Service Discovery Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Registers the application with a Consul agent. Requires the Steeltoe.Discovery.Consul package. ```csharp using Steeltoe.Discovery.Consul; var builder = WebApplication.CreateBuilder(args); // Add Consul discovery client builder.Services.AddConsulDiscoveryClient(); var app = builder.Build(); app.Run(); ``` ```json { "consul": { "host": "localhost", "port": 8500, "discovery": { "enabled": true, "register": true, "serviceName": "my-service", "hostName": "localhost", "port": 5000, "healthCheckPath": "/health", "healthCheckInterval": "10s" } } } ``` -------------------------------- ### Bootstrap AutoConfiguration in .NET Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Automatically configures Steeltoe packages in your application. Use `AddSteeltoe()` with `IHostBuilder` or `IHostApplicationBuilder`. You can also exclude specific assemblies from autoconfiguration. ```csharp using Steeltoe.Bootstrap.AutoConfiguration; // Using IHostBuilder var builder = Host.CreateDefaultBuilder(args) .AddSteeltoe(); // Using IHostApplicationBuilder (.NET 8+) var builder = Host.CreateApplicationBuilder(args); builder.AddSteeltoe(); // Exclude specific assemblies from autoconfiguration var assemblyNamesToExclude = new HashSet { SteeltoeAssemblyNames.SteeltoeManagementEndpoint, SteeltoeAssemblyNames.SteeltoeDiscoveryEureka }; builder.AddSteeltoe(assemblyNamesToExclude); var app = builder.Build(); app.Run(); ``` -------------------------------- ### Add Spring Boot Configuration to .NET Host Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/SpringBoot/README.md Configure the .NET host to load Spring Boot configuration from environment variables and command-line arguments. Ensure necessary using statements are present. ```csharp using Steeltoe.Configuration.SpringBoot; ... internal static class Program { private static void Main(string[] args) { IHost host = Host .CreateDefaultBuilder() .ConfigureAppConfiguration((hostBuilderContext, configurationBuilder) => { configurationBuilder.AddSpringBootFromEnvironmentVariable(); // Can be used together or independently configurationBuilder.AddSpringBootFromCommandLine(hostBuilderContext.Configuration); }) .Build(); var configuration = host.Services.GetService(); Console.WriteLine(configuration.GetValue("spring:cloud:stream:input:binding")); host.Run(); } } ``` -------------------------------- ### SqlServer Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with SQL Server. ```APIDOC ## SQL Server Configuration ### SqlServerOptions Represents the configuration options for connecting to SQL Server. - **SqlServerOptions()**: Constructor for SqlServerOptions. ``` ```APIDOC ## SQL Server Extensions ### SqlServerConfigurationBuilderExtensions Provides extension methods for configuring SQL Server connections within a Steeltoe application. ### SqlServerHostApplicationBuilderExtensions Provides extension methods for configuring SQL Server connections at the host application level. ### SqlServerServiceCollectionExtensions Provides extension methods for adding SQL Server services to the dependency injection container. ``` -------------------------------- ### PostgreSql Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with PostgreSQL. ```APIDOC ## PostgreSQL Configuration ### PostgreSqlOptions Represents the configuration options for connecting to PostgreSQL. - **PostgreSqlOptions()**: Constructor for PostgreSqlOptions. ``` ```APIDOC ## PostgreSQL Extensions ### PostgreSqlConfigurationBuilderExtensions Provides extension methods for configuring PostgreSQL connections within a Steeltoe application. ### PostgreSqlHostApplicationBuilderExtensions Provides extension methods for configuring PostgreSQL connections at the host application level. ### PostgreSqlServiceCollectionExtensions Provides extension methods for adding PostgreSQL services to the dependency injection container. ``` -------------------------------- ### HttpClientHandlerFactory Methods Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Common/src/Http/PublicAPI.Shipped.txt Methods for initializing and configuring HttpClientHandler instances. ```APIDOC ## HttpClientHandlerFactory.Create() ### Description Creates a new instance of a System.Net.Http.HttpClientHandler. ### Response - **HttpClientHandler** (object) - The created handler instance. ## HttpClientHandlerFactory.Using(System.Net.Http.HttpClientHandler handler) ### Description Configures the factory to use a specific HttpClientHandler instance. ### Parameters - **handler** (HttpClientHandler) - Required - The handler instance to be used by the factory. ### Response - **HttpClientHandlerFactory** (object) - The factory instance configured with the provided handler. ``` -------------------------------- ### RabbitMQ Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with RabbitMQ. ```APIDOC ## RabbitMQ Configuration ### RabbitMQOptions Represents the configuration options for connecting to RabbitMQ. - **RabbitMQOptions()**: Constructor for RabbitMQOptions. ``` ```APIDOC ## RabbitMQ Extensions ### RabbitMQConfigurationBuilderExtensions Provides extension methods for configuring RabbitMQ connections within a Steeltoe application. ### RabbitMQHostApplicationBuilderExtensions Provides extension methods for configuring RabbitMQ connections at the host application level. ### RabbitMQServiceCollectionExtensions Provides extension methods for adding RabbitMQ services to the dependency injection container. ``` -------------------------------- ### DynamicSerilogLoggerProvider Configuration Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Logging/src/DynamicSerilog/PublicAPI.Shipped.txt Details on how to configure the DynamicSerilogLoggerProvider, including its constructor and options. ```APIDOC ## Steeltoe.Logging.DynamicSerilog.DynamicSerilogLoggerProvider ### Description Represents the logger provider for Dynamic Serilog, responsible for managing Serilog logging within the Steeltoe application. ### Constructor `DynamicSerilogLoggerProvider(IOptionsMonitor serilogOptionsMonitor, IEnumerable messageProcessors)` Initializes a new instance of the `DynamicSerilogLoggerProvider` class. - **serilogOptionsMonitor** (IOptionsMonitor) - Required - Monitors for changes in Serilog options. - **messageProcessors** (IEnumerable) - Required - A collection of dynamic message processors to be used by the logger. ``` -------------------------------- ### Configure Eureka Service Discovery Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Registers the application with a Eureka server. Requires the Steeltoe.Discovery.Eureka package. ```csharp using Steeltoe.Discovery.Eureka; var builder = WebApplication.CreateBuilder(args); // Add Eureka discovery client builder.Services.AddEurekaDiscoveryClient(); var app = builder.Build(); app.Run(); ``` ```json { "eureka": { "client": { "serviceUrl": "http://localhost:8761/eureka/", "shouldRegisterWithEureka": true, "shouldFetchRegistry": true, "validateCertificates": false }, "instance": { "appName": "my-service", "hostName": "localhost", "port": 5000, "instanceId": "my-service:5000" } } } ``` -------------------------------- ### MySql Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with MySQL. ```APIDOC ## MySQL Configuration ### MySqlOptions Represents the configuration options for connecting to MySQL. - **MySqlOptions()**: Constructor for MySqlOptions. ``` ```APIDOC ## MySQL Extensions ### MySqlConfigurationBuilderExtensions Provides extension methods for configuring MySQL connections within a Steeltoe application. ### MySqlHostApplicationBuilderExtensions Provides extension methods for configuring MySQL connections at the host application level. ### MySqlServiceCollectionExtensions Provides extension methods for adding MySQL services to the dependency injection container. ``` -------------------------------- ### CloudFoundryApplicationOptions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/CloudFoundry/PublicAPI.Shipped.txt Configuration options for Cloud Foundry applications. ```APIDOC ## CloudFoundryApplicationOptions ### Description Represents the configuration options for a Cloud Foundry application. ### Properties - **ApplicationName** (string) - The name of the application. - **Api** (string) - The Cloud Foundry API endpoint. - **ApplicationId** (string) - The unique identifier for the application. ``` -------------------------------- ### Register and use RabbitMQ connector Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Registers a RabbitMQ connection and demonstrates publishing messages to a queue. ```csharp using Steeltoe.Connectors.RabbitMQ; using RabbitMQ.Client; var builder = WebApplication.CreateBuilder(args); // Add RabbitMQ connector builder.Services.AddRabbitMQ(builder.Configuration); var app = builder.Build(); app.MapPost("/messages", async ( ConnectorFactory factory, string message) => { var connector = factory.Get(); using var connection = (IConnection)connector.GetConnection(); using var channel = await connection.CreateChannelAsync(); await channel.QueueDeclareAsync("myqueue", durable: true, exclusive: false, autoDelete: false); var body = System.Text.Encoding.UTF8.GetBytes(message); await channel.BasicPublishAsync("", "myqueue", body); return "Message sent"; }); app.Run(); ``` -------------------------------- ### WebHostBuilderExtensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Bootstrap/src/AutoConfiguration/PublicAPI.Shipped.txt Details related to `WebHostBuilderExtensions` for integrating Steeltoe auto-configuration with `IWebHostBuilder`. ```APIDOC ## WebHostBuilderExtensions ### Description Provides extension methods for `IWebHostBuilder` to incorporate Steeltoe's auto-configuration. ### Method Extension Method ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```csharp public static IWebHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); webBuilder.AddSteeltoe(); // Steeltoe integration }); ``` ### Response #### Success Response (200) N/A (Modifies the builder) #### Response Example N/A ``` -------------------------------- ### BootstrapLoggerFactory Methods Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Common/src/Logging/PublicAPI.Shipped.txt Methods for creating and managing the BootstrapLoggerFactory instance. ```APIDOC ## BootstrapLoggerFactory.CreateConsole ### Description Creates a new BootstrapLoggerFactory configured for console output. ### Parameters - **configure** (System.Action) - Optional - An action to configure the logging builder. ## BootstrapLoggerFactory.CreateEmpty ### Description Creates a new empty BootstrapLoggerFactory. ### Parameters - **configure** (System.Action) - Required - An action to configure the logging builder. ## BootstrapLoggerFactory.AddProvider ### Description Adds an ILoggerProvider to the factory. ### Parameters - **provider** (Microsoft.Extensions.Logging.ILoggerProvider) - Required - The provider to add. ## BootstrapLoggerFactory.CreateLogger ### Description Creates a logger for the specified category. ### Parameters - **categoryName** (string) - Required - The category name for the logger. ## BootstrapLoggerFactory.Upgrade ### Description Upgrades the bootstrap logger factory to a full ILoggerFactory. ### Parameters - **loggerFactory** (Microsoft.Extensions.Logging.ILoggerFactory) - Required - The target logger factory. ``` -------------------------------- ### Steeltoe Application Configuration (appsettings.json) Source: https://context7.com/steeltoeoss/steeltoe/llms.txt This JSON configuration file defines application settings for Steeltoe, including service name, Config Server URI, Eureka client details, actuator exposure, and PostgreSQL connection string. ```json { "spring": { "application": { "name": "my-service" }, "cloud": { "config": { "uri": "http://config-server:8888", "failFast": true } } }, "eureka": { "client": { "serviceUrl": "http://eureka-server:8761/eureka/" }, "instance": { "appName": "my-service", "port": 8080 } }, "management": { "endpoints": { "actuator": { "exposure": { "include": ["*"] } } } }, "steeltoe": { "client": { "postgresql": { "default": { "connectionString": "${database:url}" } } } } } ``` -------------------------------- ### Eureka Instance Options Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Discovery/src/Eureka/PublicAPI.Shipped.txt Configuration options for how the client instance is registered and represented in Eureka. ```APIDOC ## Eureka Instance Options ### Description Configuration options for the Eureka client instance, defining its registration details and network properties. ### Method N/A (Configuration Class) ### Endpoint N/A ### Parameters #### Properties - **AppGroupName** (string?) - Gets or sets the application group name. - **AppName** (string?) - Gets or sets the application name. - **AutoScalingGroupName** (string?) - Gets or sets the auto-scaling group name. - **DataCenterInfo** (DataCenterInfo!) - Gets or sets the data center information. - **HealthCheckUrl** (string?) - Gets or sets the health check URL. - **HealthCheckUrlPath** (string?) - Gets or sets the health check URL path. - **HomePageUrl** (string?) - Gets or sets the home page URL. - **HomePageUrlPath** (string?) - Gets or sets the home page URL path. - **HostName** (string?) - Gets or sets the host name. - **InstanceId** (string?) - Gets or sets the instance ID. - **IPAddress** (string?) - Gets or sets the IP address. - **IsInstanceEnabledOnInit** (bool) - Gets or sets a value indicating whether the instance is enabled on initialization. - **IsNonSecurePortEnabled** (bool) - Gets or sets a value indicating whether the non-secure port is enabled. - **IsSecurePortEnabled** (bool) - Gets or sets a value indicating whether the secure port is enabled. - **LeaseExpirationDurationInSeconds** (int) - Gets or sets the lease expiration duration in seconds. ``` -------------------------------- ### HostBuilderExtensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Bootstrap/src/AutoConfiguration/PublicAPI.Shipped.txt Details related to `HostBuilderExtensions` for integrating Steeltoe auto-configuration with `IHostBuilder`. ```APIDOC ## HostBuilderExtensions ### Description Provides extension methods for `IHostBuilder` to incorporate Steeltoe's auto-configuration. ### Method Extension Method ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```csharp public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .AddSteeltoe(); // Steeltoe integration ``` ### Response #### Success Response (200) N/A (Modifies the builder) #### Response Example N/A ``` -------------------------------- ### ConfigServerClientOptions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/ConfigServer/PublicAPI.Shipped.txt Provides configuration settings for the Steeltoe ConfigServer client. ```APIDOC ## ConfigServerClientOptions ### Description Configuration options for the Steeltoe ConfigServer client. ### Properties - **Discovery** (ConfigServerDiscoveryOptions) - Gets or sets discovery options. - **Enabled** (bool) - Gets or sets a value indicating whether the ConfigServer client is enabled. - **Environment** (string?) - Gets or sets the environment name. - **FailFast** (bool) - Gets or sets a value indicating whether to fail fast if the ConfigServer is unavailable. - **Headers** (IDictionary) - Gets or sets custom headers to send with requests. - **Health** (ConfigServerHealthOptions) - Gets or sets health check options. - **Label** (string?) - Gets or sets the label to use for configuration. - **Name** (string?) - Gets or sets the application name. - **Password** (string?) - Gets or sets the password for authentication. - **PollingInterval** (TimeSpan) - Gets or sets the interval for polling configuration changes. - **Retry** (ConfigServerRetryOptions) - Gets or sets retry options. - **Timeout** (int) - Gets or sets the timeout in seconds for requests. - **Token** (string?) - Gets or sets the authentication token. - **TokenRenewRate** (int) - Gets or sets the token renewal rate in seconds. - **TokenTtl** (int) - Gets or sets the token time-to-live in seconds. - **Uri** (string?) - Gets or sets the URI of the ConfigServer. - **Username** (string?) - Gets or sets the username for authentication. - **ValidateCertificates** (bool) - Gets or sets a value indicating whether to validate SSL certificates. - **ValidateCertificatesAlt** (bool) - Gets or sets a value indicating whether to validate alternative SSL certificates. ``` -------------------------------- ### AddKubernetesServiceBindings (Default) Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/Kubernetes.ServiceBindings/PublicAPI.Shipped.txt Adds Kubernetes service bindings with default settings. ```APIDOC ## AddKubernetesServiceBindings (Default Overload) ### Description Adds Kubernetes service bindings to the configuration builder using default settings. This is the simplest overload to use. ### Method `static` extension method on `Microsoft.Extensions.Configuration.IConfigurationBuilder` ### Endpoint N/A (Configuration Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None #### Method Parameters - **builder** (`Microsoft.Extensions.Configuration.IConfigurationBuilder`) - Required - The configuration builder to extend. ### Request Example ```csharp // Example usage (conceptual) var configurationBuilder = new ConfigurationBuilder(); configurationBuilder.AddKubernetesServiceBindings(); ``` ### Response #### Success Response (IConfigurationBuilder) - Returns the modified `Microsoft.Extensions.Configuration.IConfigurationBuilder` instance. #### Response Example N/A (Method returns builder instance) ``` -------------------------------- ### AddCloudFoundryConfiguration Host Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/CloudFoundry/PublicAPI.Shipped.txt Extension methods for IWebHostBuilder, IHostBuilder, and IHostApplicationBuilder to add Cloud Foundry configuration. ```APIDOC ## AddCloudFoundryConfiguration ### Description Configures the host to include Cloud Foundry settings. ### Method Static Extension Method ### Parameters - **builder** (IWebHostBuilder/IHostBuilder/IHostApplicationBuilder) - Required - The host builder to extend. - **loggerFactory** (ILoggerFactory) - Optional - Factory for creating loggers. ``` -------------------------------- ### MySQL Configuration Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Provides methods to configure MySQL connections using IConfigurationBuilder. ```APIDOC ## ConfigureMySql ### Description Configures the MySQL connection for the application. ### Method `static` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp builder.ConfigureMySql(); builder.ConfigureMySql(configureAction => { // Configure options here }); ``` ### Response #### Success Response (200) Returns the `IConfigurationBuilder` for chaining. #### Response Example N/A ``` -------------------------------- ### AddCloudFoundry Configuration Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/CloudFoundry/PublicAPI.Shipped.txt Extension methods for IConfigurationBuilder to integrate Cloud Foundry configuration settings. ```APIDOC ## AddCloudFoundry ### Description Adds Cloud Foundry configuration providers to the IConfigurationBuilder. ### Method Static Extension Method ### Parameters - **builder** (IConfigurationBuilder) - Required - The configuration builder to extend. - **settingsReader** (ICloudFoundrySettingsReader) - Optional - Custom reader for settings. - **loggerFactory** (ILoggerFactory) - Optional - Factory for creating loggers. ``` -------------------------------- ### Register and use PostgreSQL connector Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Registers a PostgreSQL connection using Npgsql and demonstrates querying data via a ConnectorFactory. ```csharp using Steeltoe.Connectors.PostgreSql; using Npgsql; var builder = WebApplication.CreateBuilder(args); // Add PostgreSQL connector builder.Services.AddPostgreSql(builder.Configuration); var app = builder.Build(); app.MapGet("/products", async (ConnectorFactory factory) => { var connector = factory.Get(); await using var connection = (NpgsqlConnection)connector.GetConnection(); await connection.OpenAsync(); await using var command = new NpgsqlCommand("SELECT * FROM products", connection); await using var reader = await command.ExecuteReaderAsync(); var products = new List(); while (await reader.ReadAsync()) { products.Add(new { Id = reader.GetInt32(0), Name = reader.GetString(1) }); } return products; }); app.Run(); ``` -------------------------------- ### Configure Certificate Authorization Policies Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Defines authorization policies for verifying client certificates against Cloud Foundry organization and space. Requires adding certificate authentication and authorization policies. ```csharp using Steeltoe.Security.Authorization.Certificate; var builder = WebApplication.CreateBuilder(args); builder.Services.AddAuthentication() .AddCertificate(); builder.Services.AddAuthorization(auth => { auth.AddOrgAndSpacePolicies(); }); var app = builder.Build(); app.UseCertificateForwarding(); app.UseAuthentication(); app.UseAuthorization(); // Require same organization app.MapGet("/org-only", () => "Same organization access") .RequireAuthorization(CertificateAuthorizationPolicies.SameOrg); // Require same space app.MapGet("/space-only", () => "Same space access") .RequireAuthorization(CertificateAuthorizationPolicies.SameSpace); app.Run(); ``` -------------------------------- ### MySQL Host Application Builder Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Provides methods to add MySQL services to the host application builder. ```APIDOC ## AddMySql (HostApplicationBuilder) ### Description Adds the MySQL service to the host application builder. ### Method `static` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp builder.AddMySql(); builder.AddMySql(configureAction => { // Configure options here }, addAction => { // Add options here }); ``` ### Response #### Success Response (200) Returns the `IHostApplicationBuilder` for chaining. #### Response Example N/A ``` -------------------------------- ### Redis Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with Redis. ```APIDOC ## Redis Configuration ### RedisOptions Represents the configuration options for connecting to Redis. - **RedisOptions()**: Constructor for RedisOptions. ``` ```APIDOC ## Redis Extensions ### RedisConfigurationBuilderExtensions Provides extension methods for configuring Redis connections within a Steeltoe application. ### RedisHostApplicationBuilderExtensions Provides extension methods for configuring Redis connections at the host application level. ### RedisServiceCollectionExtensions Provides extension methods for adding Redis services to the dependency injection container. ``` -------------------------------- ### Steeltoe Common Application Instance Info Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Common/src/Common/PublicAPI.Shipped.txt Represents information about a running application instance. ```APIDOC ## Steeltoe.Common.ApplicationInstanceInfo ### Description Provides information about the current application instance. ### Constructors - **ApplicationInstanceInfo()**: Initializes a new instance of the `ApplicationInstanceInfo` class. ``` -------------------------------- ### CloudFoundryApplicationOptions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/CloudFoundry/PublicAPI.Shipped.txt Provides access to Cloud Foundry application details. ```APIDOC ## CloudFoundryApplicationOptions ### Description Represents the configuration options for a Cloud Foundry application. ### Properties - **ApplicationVersion** (string?): The version of the application. - **InstanceId** (string?): The unique identifier for the application instance. - **InstanceIndex** (int): The index of the application instance. - **InstanceIP** (string?): The IP address of the application instance. - **InstancePort** (int): The port the application instance is listening on. - **InternalIP** (string?): The internal IP address of the application instance. - **Limits** (Steeltoe.Configuration.CloudFoundry.ApplicationLimits?): Limits applied to the application. - **OrganizationId** (string?): The ID of the Cloud Foundry organization. - **OrganizationName** (string?): The name of the Cloud Foundry organization. - **ProcessId** (string?): The ID of the application process. - **ProcessType** (string?): The type of the application process. - **SpaceId** (string?): The ID of the Cloud Foundry space. - **SpaceName** (string?): The name of the Cloud Foundry space. - **Start** (string?): The start command for the application. - **StartedAtTimestamp** (long): The timestamp when the application started. - **Uris** (System.Collections.Generic.IList!): A list of URIs bound to the application. ``` -------------------------------- ### CloudFoundrySettingsReader API Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/CloudFoundry/PublicAPI.Shipped.txt Provides access to various Cloud Foundry environment settings. ```APIDOC ## ICloudFoundrySettingsReader Interface ### Description Represents a reader for Cloud Foundry specific settings and service information. ### Methods #### Get Application JSON - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the JSON representation of the application configuration. - **Return Type**: string? (Nullable string) #### Get Instance ID - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the unique identifier for the Cloud Foundry application instance. - **Return Type**: string? (Nullable string) #### Get Instance Index - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the index of the current application instance within the CF deployment. - **Return Type**: string? (Nullable string) #### Get Instance Internal IP - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the internal IP address assigned to the application instance. - **Return Type**: string? (Nullable string) #### Get Instance IP - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the public IP address assigned to the application instance. - **Return Type**: string? (Nullable string) #### Get Instance Port - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the port assigned to the application instance. - **Return Type**: string? (Nullable string) #### Get Services JSON - **Endpoint**: N/A (Property Access) - **Description**: Retrieves the JSON representation of the bound services for the application. - **Return Type**: string? (Nullable string) #### Get Services - **Endpoint**: N/A (Property Access) - **Description**: Retrieves a dictionary of bound services, categorized by service name, where each service contains a list of its configurations. - **Return Type**: System.Collections.Generic.IDictionary!>! ``` -------------------------------- ### Configure OpenID Connect for Cloud Foundry Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Security/src/Authentication.OpenIdConnect/PublicAPI.Shipped.txt This snippet demonstrates how to configure OpenID Connect authentication for a Steeltoe application using the `ConfigureOpenIdConnectForCloudFoundry` extension method. This is particularly useful for applications deployed on Cloud Foundry. ```APIDOC ## ConfigureOpenIdConnectForCloudFoundry ### Description Configures OpenID Connect authentication for Cloud Foundry environments. ### Method Extension Method ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Assuming 'builder' is an instance of Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder.ConfigureOpenIdConnectForCloudFoundry(); ``` ### Response #### Success Response (200) Returns the modified `Microsoft.AspNetCore.Authentication.AuthenticationBuilder` instance. #### Response Example N/A (Method returns builder instance) ``` -------------------------------- ### AddSteeltoe with IHostApplicationBuilder Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Bootstrap/src/AutoConfiguration/PublicAPI.Shipped.txt Methods for adding Steeltoe auto-configuration to an IHostApplicationBuilder. ```APIDOC ## AddSteeltoe with IHostApplicationBuilder ### Description Adds Steeltoe auto-configuration to the host application builder. ### Method `AddSteeltoe` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example usage within a .NET application var builder = Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); // Assuming 'builder' is an IHostApplicationBuilder instance // builder.AddSteeltoe(); // Example call ``` ### Response #### Success Response (200) Returns the modified `IHostApplicationBuilder` instance. #### Response Example N/A (In-place modification) ``` ```APIDOC ## AddSteeltoe with IHostApplicationBuilder and LoggerFactory ### Description Adds Steeltoe auto-configuration to the host application builder, allowing for custom logging configuration. ### Method `AddSteeltoe` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example usage with LoggerFactory var builder = Host.CreateDefaultBuilder(args); var loggerFactory = LoggerFactory.Create(configure => configure.AddConsole()); // Assuming 'builder' is an IHostApplicationBuilder instance // builder.AddSteeltoe(loggerFactory); ``` ### Response #### Success Response (200) Returns the modified `IHostApplicationBuilder` instance. #### Response Example N/A (In-place modification) ``` ```APIDOC ## AddSteeltoe with IHostApplicationBuilder and Excluded Assemblies ### Description Adds Steeltoe auto-configuration to the host application builder, excluding specified assemblies. ### Method `AddSteeltoe` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example usage with excluded assemblies var excludedAssemblies = new HashSet { "Steeltoe.Configuration.ConfigServer" }; var builder = Host.CreateDefaultBuilder(args); // Assuming 'builder' is an IHostApplicationBuilder instance // builder.AddSteeltoe(excludedAssemblies); ``` ### Response #### Success Response (200) Returns the modified `IHostApplicationBuilder` instance. #### Response Example N/A (In-place modification) ``` ```APIDOC ## AddSteeltoe with IHostApplicationBuilder, Excluded Assemblies, and LoggerFactory ### Description Adds Steeltoe auto-configuration to the host application builder, excluding specified assemblies and allowing for custom logging configuration. ### Method `AddSteeltoe` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example usage with excluded assemblies and LoggerFactory var excludedAssemblies = new HashSet { "Steeltoe.Configuration.ConfigServer" }; var builder = Host.CreateDefaultBuilder(args); var loggerFactory = LoggerFactory.Create(configure => configure.AddConsole()); // Assuming 'builder' is an IHostApplicationBuilder instance // builder.AddSteeltoe(excludedAssemblies, loggerFactory); ``` ### Response #### Success Response (200) Returns the modified `IHostApplicationBuilder` instance. #### Response Example N/A (In-place modification) ``` -------------------------------- ### ConfigServerDiscoveryOptions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Configuration/src/ConfigServer/PublicAPI.Shipped.txt Configuration settings for service discovery integration with ConfigServer. ```APIDOC ## ConfigServerDiscoveryOptions ### Description Options for configuring service discovery when connecting to the ConfigServer. ### Properties - **Enabled** (bool) - Gets or sets a value indicating whether discovery is enabled. - **ServiceId** (string?) - Gets or sets the service ID of the ConfigServer. ``` -------------------------------- ### CosmosDb Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with Azure Cosmos DB. ```APIDOC ## Cosmos DB Configuration ### CosmosDbOptions Represents the configuration options for connecting to Azure Cosmos DB. - **CosmosDbOptions()**: Constructor for CosmosDbOptions. - **Database** (string?): Gets or sets the name of the database to connect to. ``` ```APIDOC ## Cosmos DB Extensions ### CosmosDbConfigurationBuilderExtensions Provides extension methods for configuring Cosmos DB connections within a Steeltoe application. ### CosmosDbHostApplicationBuilderExtensions Provides extension methods for configuring Cosmos DB connections at the host application level. ### CosmosDbServiceCollectionExtensions Provides extension methods for adding Cosmos DB services to the dependency injection container. ``` -------------------------------- ### Integrate Service Discovery with HttpClient Source: https://context7.com/steeltoeoss/steeltoe/llms.txt Enables load-balanced service discovery for named HttpClients. Supports custom load balancer implementations. ```csharp using Steeltoe.Discovery.HttpClients; using Steeltoe.Discovery.HttpClients.LoadBalancers; var builder = WebApplication.CreateBuilder(args); // Add discovery client (Eureka or Consul) builder.Services.AddEurekaDiscoveryClient(); // Configure HttpClient with service discovery builder.Services.AddHttpClient("order-service", client => { client.BaseAddress = new Uri("http://order-service/"); }) .AddServiceDiscovery(); // Uses RandomLoadBalancer by default // With specific load balancer builder.Services.AddHttpClient("inventory-service", client => { client.BaseAddress = new Uri("http://inventory-service/"); }) .AddServiceDiscovery(); var app = builder.Build(); app.MapGet("/orders", async (IHttpClientFactory factory) => { var client = factory.CreateClient("order-service"); var response = await client.GetAsync("/api/orders"); return await response.Content.ReadAsStringAsync(); }); app.Run(); ``` -------------------------------- ### TaskHostExtensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Management/src/Tasks/PublicAPI.Shipped.txt Extension methods for IWebHost and IHost to check for and execute application tasks. ```APIDOC ## TaskHostExtensions ### Description Provides methods to interact with application tasks within a host environment. ### Methods - **HasApplicationTask(IWebHost host)**: Returns a boolean indicating if an application task is present. - **HasApplicationTask(IHost host)**: Returns a boolean indicating if an application task is present. - **RunWithTasksAsync(IWebHost host, CancellationToken cancellationToken)**: Executes tasks associated with the host. - **RunWithTasksAsync(IHost host, CancellationToken cancellationToken)**: Executes tasks associated with the host. ``` -------------------------------- ### MongoDb Options and Extensions Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt Configuration options and extension methods for integrating Steeltoe Connectors with MongoDB. ```APIDOC ## MongoDB Configuration ### MongoDbOptions Represents the configuration options for connecting to MongoDB. - **MongoDbOptions()**: Constructor for MongoDbOptions. - **Database** (string?): Gets or sets the name of the database to connect to. ``` ```APIDOC ## MongoDB Extensions ### MongoDbConfigurationBuilderExtensions Provides extension methods for configuring MongoDB connections within a Steeltoe application. ### MongoDbHostApplicationBuilderExtensions Provides extension methods for configuring MongoDB connections at the host application level. ### MongoDbServiceCollectionExtensions Provides extension methods for adding MongoDB services to the dependency injection container. ``` -------------------------------- ### InetOptions Configuration Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Common/src/Common/PublicAPI.Shipped.txt Configuration options for network settings including hostname, IP address, and interface preferences. ```APIDOC ## InetOptions ### Description Provides configuration properties for network-related settings. ### Properties - **DefaultHostname** (string?) - Get/Set the default hostname. - **DefaultIPAddress** (string?) - Get/Set the default IP address. - **IgnoredInterfaces** (string?) - Get/Set the list of ignored network interfaces. - **PreferredNetworks** (string?) - Get/Set the preferred network list. - **SkipReverseDnsLookup** (bool) - Get/Set whether to skip reverse DNS lookups. - **UseOnlySiteLocalInterfaces** (bool) - Get/Set whether to restrict to site-local interfaces only. ``` -------------------------------- ### SQL Server Connector Configuration Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Connectors/src/Connectors/PublicAPI.Shipped.txt APIs for configuring and adding SQL Server connectors. ```APIDOC ## Configure SQL Server (IConfigurationBuilder) ### Description Configures SQL Server settings for the configuration builder. ### Method `static ConfigureSqlServer` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp builder.ConfigureSqlServer(configureAction); ``` ### Response #### Success Response (200) `Microsoft.Extensions.Configuration.IConfigurationBuilder!` #### Response Example None ``` ```APIDOC ## Add SQL Server (IHostApplicationBuilder) ### Description Adds a SQL Server connector to the host application builder. ### Method `static AddSqlServer` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp builder.AddSqlServer(configureAction, addAction); ``` ### Response #### Success Response (200) `Microsoft.Extensions.Hosting.IHostApplicationBuilder!` #### Response Example None ``` ```APIDOC ## Add SQL Server (IServiceCollection) ### Description Adds a SQL Server connector to the service collection. ### Method `static AddSqlServer` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp services.AddSqlServer(configuration, addAction); ``` ### Response #### Success Response (200) `Microsoft.Extensions.DependencyInjection.IServiceCollection!` #### Response Example None ``` -------------------------------- ### InstanceInfo Class Source: https://github.com/steeltoeoss/steeltoe/blob/main/src/Discovery/src/Eureka/PublicAPI.Shipped.txt Details regarding the InstanceInfo class which manages service instance metadata and status. ```APIDOC ## InstanceInfo ### Description Represents the information about a service instance registered with Eureka. ### Properties - **Metadata** (IReadOnlyDictionary) - Instance metadata - **NonSecurePort** (int) - Non-secure port number - **SecurePort** (int) - Secure port number - **Status** (InstanceStatus) - Current instance status - **VipAddress** (string) - Virtual IP address ### Methods - **ToServiceInstance()** - Converts the instance info to a common IServiceInstance. ```