mirror of
https://github.com/spaytac/orbiter.git
synced 2026-01-22 05:14:41 +00:00
Fixed #9 This PR bootstrap the autodetection feature: 1. It works when the configuration file is not setup. Right know I am not going to manage the merge of double sources (autodetection and configuration file). 2. At the moment only Docker Swarm will support this feature.
22 lines
592 B
Go
22 lines
592 B
Go
package core
|
|
|
|
import "github.com/gianarb/orbiter/autoscaler"
|
|
|
|
// This function use diferent strategies to get information from
|
|
// the system itself to configure the autoloader.
|
|
// They can be environment variables for example or other systems.
|
|
func Autodetect() (Core error) {
|
|
scalers := autoscaler.Autoscalers{}
|
|
var core Core
|
|
autoDetectSwarmMode(&scalers)
|
|
return core, nil
|
|
}
|
|
|
|
func autoDetectSwarmMode(a *autoscaler.Autoscalers) {
|
|
// Create Docker Client by EnvVar and check if it's working.
|
|
|
|
// Get List of Services
|
|
|
|
// Check which services has labels and register them to orbiter.
|
|
}
|