github.com/fanux/shipyard@v0.0.0-20161009071005-6515ce223235/controller/plugin/client/client.go (about)

     1  package client
     2  
     3  import "log"
     4  
     5  type Client interface {
     6  	GetPluginInfo(pluginName string) (Plugin, error)
     7  	GetPluginStrategies(pluginName string) ([]Strategy, error)
     8  
     9  	/*
    10  		[
    11  			{
    12  				"app":"ats",
    13  				"num":20,
    14  			},
    15  			{
    16  				"app":"hadoop",
    17  				"num":10
    18  			}
    19  		]
    20  	*/
    21  	ScaleApps(appscale []AppScale) error
    22  
    23  	// TODO add message listen interface, for example the manager disable or enale plugins
    24  }
    25  
    26  func NewClient(host, port string) Client {
    27  	log.Printf("new api client info:%s%s", host, port)
    28  	return Api{host, port}
    29  }