4545///
4646/// **Dynamic providers**: Implement `watch` methods to emit real-time updates from
4747/// polling, file system monitoring, or other change detection mechanisms.
48+ @available ( Configuration 1 . 0 , * )
4849public protocol ConfigProvider : Sendable {
4950
5051 /// The human-readable name of the configuration provider.
@@ -137,6 +138,7 @@ public protocol ConfigProvider: Sendable {
137138/// Snapshots enable consistent reads of multiple related configuration keys by
138139/// capturing the provider's state at a specific moment. This prevents the underlying
139140/// data from changing between individual key lookups.
141+ @available ( Configuration 1 . 0 , * )
140142public protocol ConfigSnapshotProtocol : Sendable {
141143
142144 /// The human-readable name of the configuration provider that created this snapshot.
@@ -159,6 +161,7 @@ public protocol ConfigSnapshotProtocol: Sendable {
159161}
160162
161163/// The result of looking up a configuration value in a provider.
164+ @available ( Configuration 1 . 0 , * )
162165public struct LookupResult : Sendable , Equatable , Hashable {
163166
164167 /// The provider-specific encoding of the configuration key.
@@ -181,6 +184,7 @@ public struct LookupResult: Sendable, Equatable, Hashable {
181184}
182185
183186/// The supported configuration value types.
187+ @available ( Configuration 1 . 0 , * )
184188@frozen public enum ConfigType : String , Sendable , Equatable , Hashable {
185189
186190 /// A string value.
@@ -215,6 +219,7 @@ public struct LookupResult: Sendable, Equatable, Hashable {
215219}
216220
217221/// The raw content of a configuration value.
222+ @available ( Configuration 1 . 0 , * )
218223@frozen public enum ConfigContent : Sendable , Equatable , Hashable {
219224
220225 /// A string value.
@@ -433,6 +438,7 @@ public struct LookupResult: Sendable, Equatable, Hashable {
433438/// Configuration values include the actual content and a flag indicating whether
434439/// the value contains sensitive information. Secret values are protected from
435440/// accidental disclosure in logs and debug output.
441+ @available ( Configuration 1 . 0 , * )
436442public struct ConfigValue : Sendable , Equatable , Hashable {
437443
438444 /// The configuration content.
@@ -451,6 +457,7 @@ public struct ConfigValue: Sendable, Equatable, Hashable {
451457 }
452458}
453459
460+ @available ( Configuration 1 . 0 , * )
454461extension ConfigValue : CustomStringConvertible {
455462 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
456463 public var description : String {
@@ -462,55 +469,63 @@ extension ConfigValue: CustomStringConvertible {
462469 }
463470}
464471
472+ @available ( Configuration 1 . 0 , * )
465473extension ConfigValue : ExpressibleByStringLiteral {
466474 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
467475 public init ( stringLiteral value: String ) {
468476 self = . init( . string( value) , isSecret: false )
469477 }
470478}
471479
480+ @available ( Configuration 1 . 0 , * )
472481extension ConfigContent : ExpressibleByStringLiteral {
473482 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
474483 public init ( stringLiteral value: String ) {
475484 self = . string( value)
476485 }
477486}
478487
488+ @available ( Configuration 1 . 0 , * )
479489extension ConfigValue : ExpressibleByIntegerLiteral {
480490 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
481491 public init ( integerLiteral value: Int ) {
482492 self = . init( . int( value) , isSecret: false )
483493 }
484494}
485495
496+ @available ( Configuration 1 . 0 , * )
486497extension ConfigContent : ExpressibleByIntegerLiteral {
487498 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
488499 public init ( integerLiteral value: Int ) {
489500 self = . int( value)
490501 }
491502}
492503
504+ @available ( Configuration 1 . 0 , * )
493505extension ConfigValue : ExpressibleByFloatLiteral {
494506 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
495507 public init ( floatLiteral value: Double ) {
496508 self = . init( . double( value) , isSecret: false )
497509 }
498510}
499511
512+ @available ( Configuration 1 . 0 , * )
500513extension ConfigContent : ExpressibleByFloatLiteral {
501514 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
502515 public init ( floatLiteral value: Double ) {
503516 self = . double( value)
504517 }
505518}
506519
520+ @available ( Configuration 1 . 0 , * )
507521extension ConfigValue : ExpressibleByBooleanLiteral {
508522 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
509523 public init ( booleanLiteral value: Bool ) {
510524 self = . init( . bool( value) , isSecret: false )
511525 }
512526}
513527
528+ @available ( Configuration 1 . 0 , * )
514529extension ConfigContent : ExpressibleByBooleanLiteral {
515530 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
516531 public init ( booleanLiteral value: Bool ) {
0 commit comments