Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkgs/sdk/server/src/Components.cs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ public static StreamingDataSourceBuilder StreamingDataSource() =>
/// <see cref="ConfigurationBuilder.DataStore"/> in the configuration.
/// </summary>
/// <returns>a configuration builder</returns>
/// TODO: SDK-1678: Internal until ready for use.
internal static DataSystemModes DataSystem() => new DataSystemModes();
public static DataSystemModes DataSystem() => new DataSystemModes();
}
}
3 changes: 1 addition & 2 deletions pkgs/sdk/server/src/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ public class Configuration
/// It is not suitable for production usage. Do not use it. You have been warned.
/// </para>
/// </summary>
/// TODO: SDK-1678: Internal until ready for use.
internal DataSystemBuilder DataSystem { get; }
public DataSystemBuilder DataSystem { get; }

#endregion

Expand Down
3 changes: 1 addition & 2 deletions pkgs/sdk/server/src/ConfigurationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ public ConfigurationBuilder WrapperInfo(WrapperInfoBuilder wrapperInfo)
/// </remarks>
/// <param name="dataSystemBuilder">the data system builder</param>
/// <returns>the same builder</returns>
/// TODO: SDK-1678: Internal until ready for use.
internal ConfigurationBuilder DataSystem(DataSystemBuilder dataSystemBuilder)
public ConfigurationBuilder DataSystem(DataSystemBuilder dataSystemBuilder)
{
_dataSystem = dataSystemBuilder;
return this;
Expand Down
14 changes: 11 additions & 3 deletions pkgs/sdk/server/src/Integrations/DataSystemBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ namespace LaunchDarkly.Sdk.Server.Integrations
/// It is not suitable for production usage. Do not use it. You have been warned.
/// </para>
/// </summary>
internal sealed class DataSystemBuilder
public sealed class DataSystemBuilder
{
// TODO: SDK-1678: Internal until ready for use.

private readonly List<IComponentConfigurer<IDataSource>> _initializers =
new List<IComponentConfigurer<IDataSource>>();

Expand Down Expand Up @@ -89,6 +87,16 @@ public DataSystemBuilder FDv1FallbackSynchronizer(IComponentConfigurer<IDataSour
return this;
}

/// <summary>
/// Configures the persistent data store.
/// </summary>
/// <param name="persistentStore">the persistent data store</param>
/// <param name="mode">the mode for the persistent data store</param>
/// <returns>a reference to the builder</returns>
/// <remarks>
/// The SDK will use the persistent data store to store feature flag data.
/// </remarks>
/// <seealso cref="DataSystemConfiguration.DataStoreMode"/>
public DataSystemBuilder PersistentStore(IComponentConfigurer<IDataStore> persistentStore,
DataSystemConfiguration.DataStoreMode mode)
{
Expand Down
3 changes: 1 addition & 2 deletions pkgs/sdk/server/src/Integrations/DataSystemComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ namespace LaunchDarkly.Sdk.Server.Integrations
/// It is not suitable for production usage. Do not use it. You have been warned.
/// </para>
/// </summary>
internal static class DataSystemComponents
public static class DataSystemComponents
{
// TODO: SDK-1678: Internal until ready for use.

/// <summary>
/// Get a builder for a polling data source.
Expand Down
3 changes: 1 addition & 2 deletions pkgs/sdk/server/src/Integrations/DataSystemModes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ namespace LaunchDarkly.Sdk.Server.Integrations
/// It is not suitable for production usage. Do not use it. You have been warned.
/// </para>
/// </summary>
internal sealed class DataSystemModes
public sealed class DataSystemModes
{
// This implementation is non-static to allow for easy usage with "Components".
// Where we can return an instance of this object, and the user can chain into their desired configuration.
// TODO: SDK-1678: Internal until ready for use.

/// <summary>
/// Configure's LaunchDarkly's recommended flag data acquisition strategy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ namespace LaunchDarkly.Sdk.Server.Integrations
/// .FDv1FallbackSynchronizer(DataSystemComponents.FDv1Polling()));
/// </code>
/// </example>
internal sealed class FDv2PollingDataSourceBuilder : IComponentConfigurer<IDataSource>, IDiagnosticDescription
public sealed class FDv2PollingDataSourceBuilder : IComponentConfigurer<IDataSource>, IDiagnosticDescription
{
// TODO: SDK-1678: Internal until ready for use.

/// <summary>
/// The default value for <see cref="PollInterval(TimeSpan)"/>: 30 seconds.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ namespace LaunchDarkly.Sdk.Server.Integrations
/// .FDv1FallbackSynchronizer(DataSystemComponents.FDv1Polling()));
/// </code>
/// </example>
internal sealed class FDv2StreamingDataSourceBuilder : IComponentConfigurer<IDataSource>, IDiagnosticDescription
public sealed class FDv2StreamingDataSourceBuilder : IComponentConfigurer<IDataSource>, IDiagnosticDescription
{
// TODO: SDK-1678: Internal until ready for use.

/// <summary>
/// The default value for <see cref="InitialReconnectDelay(TimeSpan)"/>: 1000 milliseconds.
/// </summary>
Expand Down Expand Up @@ -92,7 +90,8 @@ public IDataSource Build(LdClientContext context)
public LdValue DescribeConfiguration(LdClientContext context) =>
LdValue.BuildObject()
.WithStreamingProperties(
StandardEndpoints.IsCustomUri(_serviceEndpointsOverride ?? context.ServiceEndpoints, e => e.StreamingBaseUri),
StandardEndpoints.IsCustomUri(_serviceEndpointsOverride ?? context.ServiceEndpoints,
e => e.StreamingBaseUri),
false,
_initialReconnectDelay
)
Expand Down
2 changes: 1 addition & 1 deletion pkgs/sdk/server/src/LaunchDarkly.ServerSdk.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--x-release-please-start-version-->
<Version>8.10.4</Version>
<Version>8.11.0-beta.1</Version>
<!--x-release-please-end-->
<!-- The BUILDFRAMEWORKS variable allows us to override the target frameworks with a
single framework that we are testing; this allows us to test with older SDK
Expand Down
4 changes: 1 addition & 3 deletions pkgs/sdk/server/src/Subsystems/DataSystemConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ namespace LaunchDarkly.Sdk.Server.Subsystems
/// It is not suitable for production usage. Do not use it. You have been warned.
/// </para>
/// </summary>
internal sealed class DataSystemConfiguration
public sealed class DataSystemConfiguration
{
// TODO: SDK-1678: Internal until ready for use.

/// <summary>
/// The persistent data store mode.
/// </summary>
Expand Down
4 changes: 1 addition & 3 deletions pkgs/sdk/server/src/Subsystems/ISelectorSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ namespace LaunchDarkly.Sdk.Server.Subsystems
/// <summary>
/// Interface for a selector source. Selectors are used to identify versioned payloads.
/// </summary>
internal interface ISelectorSource
public interface ISelectorSource
{
// TODO: SDK-1678: Internal until ready for use.

/// <summary>
/// Get the current selector.
/// </summary>
Expand Down
3 changes: 1 addition & 2 deletions pkgs/sdk/server/src/Subsystems/LdClientContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ public sealed class LdClientContext
/// <summary>
/// The configured selector source.
/// </summary>
/// TODO: SDK-1678: Internal until ready for use.
internal ISelectorSource SelectorSource { get; }
public ISelectorSource SelectorSource { get; }

/// <summary>
/// Constructs a new instance with only the public properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ public async Task FirstInitializerFailsSecondInitializerSucceedsWithSelectorSwit
Assert.Equal(DataSourceState.Valid, statusUpdates[4].State);

// Verify that the data source is initialized
// TODO: uncomment this check once Initialized is implemented
// Assert.True(dataSource.Initialized);
Assert.True(dataSource.Initialized);

// Verify that Apply was called twice: once for second initializer, once for synchronizer
// Verify the first Apply call was with second initializer dummy data
Expand Down Expand Up @@ -330,8 +329,7 @@ public async Task FirstInitializerFailsSecondInitializerSucceedsWithoutSelectorS
Assert.Equal(DataSourceState.Valid, statusUpdates[6].State);

// Verify that the data source is initialized
// TODO: uncomment this check once Initialized is implemented
// Assert.True(dataSource.Initialized);
Assert.True(dataSource.Initialized);

// Verify that Apply was called twice: once for second initializer, once for synchronizer
// Verify the first Apply call was with second initializer dummy data
Expand Down Expand Up @@ -595,8 +593,7 @@ public async Task AllInitializersFailSwitchesToSynchronizers()
Assert.Equal(DataSourceState.Valid, statusUpdates[4].State);

// Verify that the data source is initialized
// TODO: uncomment this check once Initialized is implemented
// Assert.True(dataSource.Initialized);
Assert.True(dataSource.Initialized);

// Verify that Apply was called once with synchronizer dummy data
var changeSet = capturingSink.Applies.ExpectValue(TimeSpan.FromSeconds(1));
Expand Down
Loading