我希望在我的iOS应用程序上重新创建与sample iOS app相同的设置。在示例应用程序中,有一个API调用http://{localhost}/{clientId}/example/v1/drives?type=nearby,它返回应用程序要使用的EdgeEngineNodes列表。
我需要在我的微服务上实现这一点吗?还是在edgeEngine中有一个内置的函数调用?
发布于 2021-09-27 17:15:22
问题:调用edgeEngine本地发现服务。
原因:获取edgeEngine群集中的设备列表。
补救措施:从已部署的边缘微服务调用edgeEngine localDevices接口。或者,在mimik客户端库返回的服务链接处直接从iOS应用程序调用相同的API。
curl -i -H 'Authorization: Bearer <edgeEngine access token>’ http://localhost:<$port-number>/<MCM.BASE_API_PATH>/localDevicesiOS的mimik客户端库提供了一个返回当前edgeEngine服务链接的edgeEngine:
/**
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注意:请在此处查看如何在您的边缘微服务中实现此功能的完整示例:https://developer.mimik.com/first-edge-microservice/#title6
https://stackoverflow.com/questions/69340654
复制相似问题