GoCloud modular & scalable
Basic Information
Pull Request: https://github.com/cloudlibz/gocloud/pull/101
Goal
- way to call: GoCloud.<ServiceType>.<Functionality>
- development scalable
Implemented
Separately
Now we can develop each module of each provider separately
Example 1
Digital Ocean does not support container service. so
gocloud.DigitalOceanProvider().Compute()
gocloud.DigitalOceanProvider().Storage()
gocloud.DigitalOceanProvider().LoadBalancer()
gocloud.DigitalOceanProvider().DNS()
gocloud.DigitalOceanProvider()
can only call these four.
Example 2
development for Vultr support is only compute module done. so now there is only .Compute()
gocloud.VultrProvider().Compute()
Example 3
For Machine Learning, in gocloud, only Amazon provider implemented interface for Machine Learning
. Now we can access the Amazon provider 's ML by
gocloud.AmazonProvider().MachineLearning().CreateMLModel()
gocloud.AmazonProvider().MachineLearning().DeleteMLModel()
gocloud.AmazonProvider().MachineLearning().GetMLModel() gocloud.AmazonProvider().MachineLearning().UpdateMLModel()
Now we don’t need to add function definitions for all the modules in all the cloud providers even if that provider doesn’t support that particular module.
Unified API
If different cloud providers provide the same service, such as compute storage dns, we implement the functionalities from same unified interface.
So this ensures that the API we provide is uniform