orbiter/core/autodetect.go
Gianluca Arbezzano db7f674976 Bootstrap autodetection and swarm zero conf
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.
2017-03-14 23:49:53 +00:00

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.
}