    protocol DiscoveryController : Sendable

Manages Discovery Candidates for all Structures in a User Account.

This protocol is used to manage the Discovery Candidates for all Structures in a User Account.
This includes fetching, caching and freshing the candidates.
Note
This protocol exists to facilitate eventual SRL migration.
- `


  ### [candidates(for:includeDescendants:timeout:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DiscoveryController#/s:13GoogleHomeSDK19DiscoveryControllerP10candidates3for18includeDescendants7timeoutAA5Query_pAA16AnyNodeCandidateV7ElementRts_XPAA9StructureV_SbSdSgtF)


  ` Default implementation Returns the Discovery candidates for the given Structure.
  Note

  Initially the Discovery API is non streaming. The expected usage is:

      let candidates = try await discoveryController.candidates(for: structure, includeDescendants: false).first()

  #### Default Implementation

  Returns the Discovery candidates for the given Structure.

  #### Declaration

  Swift

      func candidates(for structure: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Structure.html, includeDescendants: Bool, timeout: TimeInterval?) -> any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyNodeCandidate.html>

  #### Parameters

  |---|---|
  | ` includeDescendants ` | Whether to include candidates for all the objects within the specified Structure. |
  | ` timeout ` | The timeout duration in seconds for the initial candidate emission, or nil for no timeout. |

  #### Return Value

  The Discovery candidates for the given Structure.
- `


  ### [candidates(for:timeout:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DiscoveryController#/s:13GoogleHomeSDK19DiscoveryControllerP10candidates3for7timeoutAA5Query_pAA16AnyNodeCandidateV7ElementRts_XPAA0B6DeviceV_SdSgtKF)


  ` Default implementation Returns the Discovery candidates for the given Device.
  Note

  Initially the Discovery API is non streaming. The expected usage is:

      let candidates = try await discoveryController.candidates(for: device).first()

  #### Default Implementation

  Returns the Discovery candidates for the given Device.

  #### Declaration

  Swift

      func candidates(for device: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html, timeout: TimeInterval?) throws -> any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyNodeCandidate.html>

  #### Parameters

  |---|---|
  | ` timeout ` | The timeout duration in seconds for the initial candidate emission, or nil for no timeout. |

  #### Return Value

  The Discovery candidates for the given home object.