我希望在我的 iOS 应用程序上重新创建与示例 iOS 应用程序相同的设置。在示例应用程序中,有一个 API 调用 http://{localhost}/{clientId}/example/v1/drives?type=nearby 返回一个供应用程序使用的 EdgeEngineNodes 列表。
我是否需要在我的微服务上实现这一点,或者 edgeEngine 中是否有内置函数调用?
我希望在我的 iOS 应用程序上重新创建与示例 iOS 应用程序相同的设置。在示例应用程序中,有一个 API 调用 http://{localhost}/{clientId}/example/v1/drives?type=nearby 返回一个供应用程序使用的 EdgeEngineNodes 列表。
我是否需要在我的微服务上实现这一点,或者 edgeEngine 中是否有内置函数调用?
Issue: Making a call to edgeEngine local discovery services.
Cause: Getting a list of devices in edgeEngine clusters.
Remedy: Calling edgeEngine localDevices API from the deployed edge microservice. Alternatively calling the same API directly from the iOS application at the service link returned by the mimik client library.
curl -i -H 'Authorization: Bearer <edgeEngine access token>’ http://localhost:<$port-number>/<MCM.BASE_API_PATH>/localDevices
mimik edgeEngine client library for iOS provides an API that returns the current edgeEngine service link:
/**
Service link to the edgeEngine instance. For example when configuring microservices for deployment.
- Returns: Service link to the edgeEngine instance.
- Note: Once the service link has been established, it will never change.
- Note: For example http://127.0.0.1:[port-number]
- Warning: The port number is randomly generated when queried the first time, then stored for subsequent restarts and can never change again.
*/
@objc public func edgeEngineServiceLink() -> String
Note: Please see a full example of how this can be implemented in your edge microservice here: https://developer.mimik.com/first-edge-microservice/#title6